@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;600;800&family=Space+Grotesk:wght@500;700;800&display=swap');

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Space Grotesk', 'Plus Jakarta Sans', sans-serif;
}

body {
    background-color: #080808;
    color: #f8fafc;
    min-height: 100vh;
    overflow-x: hidden;
}

body:not(.edit-mode) .edit-only-field,
body:not(.edit-mode) .prod-actions,
body:not(.edit-mode) .img-edit-overlay {
    display: none !important;
}

#templateSelectorView {
    width: 100%;
    min-height: 100vh;
    background-color: #0b0f19;
    padding: 30px 20px 50px 20px;
}

.selector-top-bar {
    max-width: 1400px;
    margin: 0 auto 20px auto;
}

.back-dashboard-btn {
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #1e293b;
    color: #fff;
    padding: 10px 18px;
    border-radius: 8px;
    font-weight: 600;
    transition: 0.2s;
    border: 1px solid #334155;
}

.back-dashboard-btn:hover {
    background: #334155;
    color: #38bdf8;
}

.selector-header {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 50px auto;
}

.selector-header h2 {
    font-size: 36px;
    color: #ffffff;
    font-weight: 800;
    letter-spacing: -1px;
    margin-bottom: 12px;
}

.selector-header p {
    color: #94a3b8;
    font-size: 16px;
}

#templatesGrid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 30px;
    max-width: 1400px;
    margin: 0 auto;
}

.template-card {
    background: #111827;
    border-radius: 16px;
    overflow: hidden;
    cursor: pointer;
    border: 1px solid #1f2937;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
}

.template-card:hover {
    border-color: #f97316;
    transform: translateY(-7px);
    box-shadow: 0 20px 35px -10px rgba(249, 115, 22, 0.3);
}

.template-thumb {
    width: 100%;
    height: 200px;
    background-size: cover;
    background-position: center;
    background-color: #000;
    position: relative;
}

.template-info {
    padding: 22px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    flex-grow: 1;
    gap: 15px;
}

.template-info h3 {
    color: #ffffff;
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 6px;
}

.template-info p {
    color: #94a3b8;
    font-size: 14px;
    line-height: 1.5;
}

.btn-choose-template {
    background: #f97316;
    color: #ffffff;
    border: none;
    padding: 12px;
    border-radius: 10px;
    font-weight: 700;
    cursor: pointer;
    width: 100%;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: background 0.2s;
}

.top-control-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #0f172a;
    padding: 15px 30px;
    border-bottom: 1px solid #1e293b;
    flex-wrap: wrap;
    gap: 15px;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.control-group {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.color-picker-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.color-picker-label input[type="color"] {
    width: 22px;
    height: 22px;
    border: none;
    background: none;
    cursor: pointer;
}

.btn-ctrl {
    background: #1e293b;
    color: #fff;
    border: 1px solid #334155;
    padding: 9px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: 0.2s;
}

.btn-ctrl:hover {
    background: #334155;
}

.btn-ctrl.primary, .custom-btn {
    background: var(--btn-color, #f97316) !important;
    border-color: var(--btn-color, #f97316) !important;
    color: #fff !important;
}

.social-inputs-panel {
    padding: 15px 30px;
    background: #1e293b;
    border-bottom: 1px solid #334155;
}

.social-inputs-panel input {
    padding: 8px 12px;
    border-radius: 6px;
    border: 1px solid #4b5563;
    background: #0f172a;
    color: #fff;
    width: 200px;
}

.save-status-msg {
    text-align: center;
    padding: 8px;
    font-weight: 600;
    font-size: 14px;
}
.save-status-msg.success { background: rgba(16, 185, 129, 0.2); color: #34d399; }
.save-status-msg.error { background: rgba(239, 68, 68, 0.2); color: #f87171; }

.viewport-wrapper {
    width: 100%;
    transition: all 0.3s ease;
    margin: 0 auto;
}

.viewport-wrapper.mobile-view {
    max-width: 414px;
    border: 12px solid #1e293b;
    border-radius: 35px;
    margin: 30px auto;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.7);
    overflow: hidden;
    background-color: var(--bg-color, #080808);
}

.live-store-container {
    width: 100%;
    min-height: 100vh;
    position: relative;
    background-color: var(--bg-color, #080808);
}

.store-header {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    padding: 20px 40px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    background-color: var(--panel-color, rgba(15, 23, 42, 0.8));
    backdrop-filter: blur(10px);
    flex-wrap: wrap;
    gap: 12px;
}

.store-logo {
    font-size: 20px;
    font-weight: 800;
    letter-spacing: 1px;
    color: var(--header-text-color, #fff);
    text-transform: uppercase;
    word-break: break-word;
    max-width: 100%;
}

.nav-menu {
    display: flex !important;
    list-style: none !important;
    gap: 15px !important;
    align-items: center !important;
    flex-wrap: wrap;
    margin: 0;
    padding: 0;
}

.nav-menu li a {
    color: var(--header-text-color, #f8fafc) !important;
    text-decoration: none !important;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    opacity: 0.85;
}

.hero-section {
    padding: 50px 15px;
    text-align: center;
}

.hero-slide {
    max-width: 1100px;
    margin: 0 auto;
    padding: 60px 20px;
    border-radius: 20px;
    background-size: cover;
    background-position: center;
    position: relative;
    box-shadow: 0 25px 50px -12px rgba(0,0,0,0.8);
    overflow: hidden;
}

.hero-slide::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.65);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
}

.hero-tagline {
    display: inline-block;
    font-size: 11px;
    letter-spacing: 2px;
    font-weight: 700;
    color: var(--btn-color, #f97316);
    margin-bottom: 10px;
    text-transform: uppercase;
}

.hero-content h1 {
    font-size: 38px;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 12px;
    text-transform: uppercase;
    color: var(--hero-text-color, #fff);
    word-break: break-word;
}

.hero-content p {
    font-size: 14px;
    letter-spacing: 1px;
    opacity: 0.9;
    margin-bottom: 20px;
    color: var(--hero-text-color, #e2e8f0);
}

.hero-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

.site-action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 700;
    font-size: 12px;
    letter-spacing: 1px;
    text-transform: uppercase;
    cursor: pointer;
}

.site-action-btn.primary {
    background: var(--btn-color, #f97316);
    color: #ffffff;
}

.site-action-btn.secondary {
    background: transparent;
    border: 2px solid #ffffff;
    color: #ffffff;
}

.banner-ticker {
    background: var(--btn-color, #f97316);
    color: #000;
    padding: 12px 0;
    overflow: hidden;
    white-space: nowrap;
    position: relative;
    width: 100%;
}

.ticker-track {
    display: inline-flex;
    gap: 40px;
    animation: marqueeSlide 20s linear infinite;
}

.ticker-track span {
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 13px;
}

@keyframes marqueeSlide {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

.about-section {
    padding: 50px 15px;
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    gap: 30px;
    align-items: center;
    flex-wrap: wrap;
}

.about-img-preview {
    height: 250px;
    background-size: cover;
    background-position: center;
    border-radius: 16px;
    width: 100%;
}

.products-section {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 15px;
}

.section-title {
    font-size: 28px;
    font-weight: 800;
    margin-bottom: 25px;
    color: var(--header-text-color, #fff);
    text-transform: uppercase;
}

.add-product-panel {
    background: rgba(255,255,255,0.03);
    padding: 15px;
    border-radius: 12px;
    margin-bottom: 25px;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
}

.add-product-panel input {
    padding: 8px 12px;
    border-radius: 8px;
    border: 1px solid #334155;
    background: #0f172a;
    color: #fff;
    flex: 1;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 20px;
}

.product-card {
    background: var(--panel-color, rgba(255, 255, 255, 0.03));
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.product-img {
    width: 100%;
    height: 180px;
    background-size: cover;
    background-position: center;
}

.product-info {
    padding: 15px;
    flex-grow: 1;
}

.product-info h3 {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 6px;
    color: var(--header-text-color, #fff);
}

.product-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.product-price {
    font-weight: 800;
    color: var(--btn-color, #f97316);
    font-size: 18px;
}

.buy-now-btn {
    background: var(--btn-color, #f97316);
    color: #fff;
    border: none;
    padding: 8px 14px;
    border-radius: 6px;
    font-weight: 700;
    font-size: 11px;
    cursor: pointer;
    text-transform: uppercase;
}

.prod-actions {
    display: flex;
    gap: 4px;
}

.btn-card-action {
    background: #334155;
    color: #fff;
    border: none;
    padding: 5px 8px;
    border-radius: 6px;
    font-size: 10px;
    cursor: pointer;
    font-weight: 600;
}

.btn-card-action.delete {
    background: rgba(239, 68, 68, 0.25);
    color: #f87171;
}

.img-edit-overlay {
    position: absolute;
    top: 15px;
    right: 15px;
    z-index: 10;
}

.store-footer {
    background: var(--panel-color, #0f172a);
    padding: 50px 20px 25px 20px;
    border-top: 1px solid rgba(255,255,255,0.08);
    margin-top: 60px;
    color: var(--header-text-color, #fff);
}

.footer-top-grid {
    max-width: 1200px;
    margin: 0 auto 35px auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 30px;
}

.footer-brand-col h3 {
    font-size: 20px;
    font-weight: 800;
    margin-bottom: 10px;
}

.footer-brand-col p {
    font-size: 13px;
    opacity: 0.8;
    line-height: 1.5;
}

.footer-links-col h4, .footer-contact-col h4 {
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 14px;
    text-transform: uppercase;
}

.footer-links-col ul {
    list-style: none;
}

.footer-links-col ul li {
    margin-bottom: 8px;
}

.footer-links-col ul li a {
    color: var(--header-text-color, #fff);
    text-decoration: none;
    opacity: 0.8;
    font-size: 13px;
}

.footer-contact-col p {
    font-size: 13px;
    opacity: 0.8;
    margin-bottom: 8px;
}

.social-links-container {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-bottom: 25px;
}

.social-icon-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--btn-color, #f97316);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.footer-bottom-bar {
    text-align: center;
    border-top: 1px solid rgba(255,255,255,0.08);
    padding-top: 20px;
}

.floating-wa-btn {
    position: fixed;
    bottom: 25px;
    right: 25px;
    width: 55px;
    height: 55px;
    background-color: #25d366;
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 25px rgba(37, 211, 102, 0.4);
    z-index: 999;
    text-decoration: none;
}

[contenteditable="true"]:hover {
    outline: 1px dashed var(--btn-color, #f97316);
    cursor: text;
}

@media (max-width: 600px) {
    .store-header {
        flex-direction: column;
        text-align: center;
        padding: 15px;
    }
    .nav-menu {
        justify-content: center;
        gap: 12px;
    }
    .hero-content h1 {
        font-size: 32px;
    }
}