* {
    box-sizing: border-box;
}

:root {
    --main-color: #5c3b28;
    --dark-color: #001d1d;
    --accent-color: #d19035;
    --soft-color: #fff8f0;
}

body {
    margin: 0;
    font-family: Arial, sans-serif;
    background: #edf0f3;
    color: #111827;
}

button {
    border: none;
    cursor: pointer;
    font-weight: 800;
}

.builder-topbar {
    height: 72px;
    background: #001d1d;
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 24px;
    position: sticky;
    top: 0;
    z-index: 50;
}

.builder-brand {
    color: white;
    text-decoration: none;
    display: flex;
    gap: 10px;
    align-items: center;
}

.builder-brand span {
    font-size: 30px;
}

.builder-actions {
    display: flex;
    gap: 10px;
}

.builder-actions button {
    padding: 11px 16px;
    border-radius: 999px;
    background: #d19035;
    color: white;
}

#previewCustomerBtn {
    background: white;
    color: #111827;
}

#continueWorkspaceBtn {
    background: #19a7a7;
}

.builder-shell {
    display: grid;
    grid-template-columns: 260px 1fr 320px;
    min-height: calc(100vh - 72px);
}

.builder-sidebar {
    background: #0b1f1f;
    color: white;
    padding: 22px;
    position: sticky;
    top: 72px;
    height: calc(100vh - 72px);
    overflow-y: auto;
}

.sidebar-title small {
    color: #d19035;
    font-weight: 900;
    letter-spacing: 1px;
}

.sidebar-title h2 {
    margin-top: 5px;
}

.builder-tab {
    width: 100%;
    display: block;
    text-align: left;
    margin: 8px 0;
    padding: 13px 14px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.08);
    color: white;
}

.builder-tab.active,
.builder-tab:hover {
    background: #d19035;
}

.builder-progress {
    margin-top: 24px;
    padding: 16px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.08);
}

.progress-track {
    height: 10px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 999px;
    margin: 10px 0;
    overflow: hidden;
}

#progressBar {
    width: 10%;
    height: 100%;
    background: #d19035;
}

.builder-canvas {
    padding: 24px;
    overflow: auto;
}

.store-preview {
    background: white;
    border-radius: 28px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.10);
}

.store-header {
    min-height: 78px;
    padding: 18px 36px;
    background: white;
    color: #111827;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    border-bottom: 1px solid #f1f1f1;
}

.store-logo {
    width: 54px;
    height: 54px;
    border-radius: 18px;
    background: var(--main-color);
    color: white;
    display: grid;
    place-items: center;
    font-size: 26px;
    font-weight: 900;
}

.store-nav {
    display: flex;
    gap: 18px;
    flex-wrap: wrap;
}

.store-nav a {
    color: #374151;
    text-decoration: none;
    font-weight: 800;
}

.store-order-btn {
    padding: 12px 18px;
    border-radius: 999px;
    background: var(--main-color);
    color: white;
}

.store-hero {
    min-height: 560px;
    background-size: cover;
    background-position: center;
    position: relative;
    display: flex;
    align-items: center;
}

.store-hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(0, 0, 0, 0.78), rgba(0, 0, 0, 0.28));
}

.store-hero-content {
    position: relative;
    z-index: 1;
    color: white;
    width: min(760px, 92%);
    padding: 70px;
}

#storeTypeBadge {
    display: inline-block;
    padding: 9px 14px;
    background: rgba(255, 255, 255, 0.18);
    border-radius: 999px;
    font-weight: 900;
}

.store-hero h1 {
    font-size: clamp(42px, 6vw, 82px);
    margin: 18px 0 8px;
}

.store-hero h2 {
    font-size: clamp(24px, 3vw, 42px);
    color: var(--accent-color);
    margin: 0 0 16px;
}

.store-hero p {
    font-size: 18px;
    line-height: 1.7;
}

[contenteditable="true"] {
    outline: 2px dashed transparent;
    border-radius: 10px;
    transition: 0.2s ease;
}

[contenteditable="true"]:hover,
[contenteditable="true"]:focus {
    outline-color: var(--accent-color);
    background: rgba(255, 255, 255, 0.14);
}

.hero-buttons {
    display: flex;
    gap: 12px;
    margin-top: 24px;
    flex-wrap: wrap;
}

.hero-buttons button {
    padding: 13px 20px;
    border-radius: 999px;
    background: var(--accent-color);
    color: white;
}

#changeHeroBtn {
    background: white;
    color: #111827;
}

.builder-section {
    padding: 54px 42px;
    background: var(--soft-color);
}

.section-eyebrow,
.mini-label {
    color: var(--main-color);
    font-weight: 900;
    letter-spacing: 1.5px;
    text-transform: uppercase;
}

.section-heading {
    text-align: center;
    margin-bottom: 32px;
}

.section-heading p {
    font-weight: 900;
    color: var(--main-color);
}

.section-heading h2,
.store-about h2,
.store-promo h2,
.store-location h2 {
    font-size: clamp(28px, 3vw, 46px);
    margin: 10px 0;
}

.store-about-grid {
    display: grid;
    grid-template-columns: 1.5fr 0.7fr;
    gap: 28px;
    align-items: center;
}

.store-about-grid p,
.store-promo p,
.store-location p {
    font-size: 18px;
    line-height: 1.7;
    color: #4b5563;
}

.about-card,
.location-card {
    min-height: 180px;
    border-radius: 28px;
    background: white;
    display: grid;
    place-items: center;
    text-align: center;
    padding: 24px;
    box-shadow: 0 14px 28px rgba(0, 0, 0, 0.07);
}

.about-card strong,
.location-card strong {
    font-size: 28px;
    color: var(--main-color);
}

.about-card span,
.location-card span {
    color: #6b7280;
    font-weight: 800;
}

.store-products {
    background: white;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 18px;
}

.product-card {
    background: white;
    padding: 18px;
    border-radius: 22px;
    box-shadow: 0 14px 28px rgba(0, 0, 0, 0.07);
    border: 1px solid #f3f4f6;
}

.product-card img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    border-radius: 16px;
    margin-bottom: 12px;
    background: #f3f4f6;
}

.product-card h3 {
    margin: 8px 0;
}

.product-card p {
    color: #4b5563;
}

.product-price {
    font-weight: 900;
    color: var(--main-color);
}

.product-card button {
    width: 100%;
    padding: 11px;
    border-radius: 999px;
    background: var(--main-color);
    color: white;
    margin-top: 10px;
}

.store-promo {
    background: var(--dark-color);
    color: white;
}

.promo-card {
    max-width: 900px;
    margin: auto;
    border-radius: 34px;
    padding: 44px;
    background: rgba(255, 255, 255, 0.08);
}

.promo-card p {
    color: rgba(255, 255, 255, 0.8);
}

.promo-card button {
    padding: 13px 22px;
    border-radius: 999px;
    background: var(--accent-color);
    color: white;
}

.gallery-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr 0.8fr;
    gap: 16px;
}

.gallery-item {
    min-height: 220px;
    border-radius: 26px;
    background-size: cover;
    background-position: center;
    overflow: hidden;
    box-shadow: 0 14px 28px rgba(0, 0, 0, 0.07);
}

.gallery-item:first-child {
    grid-row: span 2;
    min-height: 460px;
}

.store-reviews {
    background: white;
}

.review-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
}

.review-grid article {
    background: var(--soft-color);
    border-radius: 24px;
    padding: 24px;
}

.review-grid p {
    color: #374151;
    line-height: 1.7;
}

.review-grid strong {
    color: var(--main-color);
}

.checkout-preview {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 28px;
}

.cart-box {
    background: #f9fafb;
    border-radius: 20px;
    padding: 20px;
}

.cart-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
}

.cart-total {
    border-top: 1px solid #ddd;
    padding-top: 12px;
    font-weight: 900;
}

.store-location {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 28px;
    background: white;
}

.store-footer {
    background: var(--dark-color);
    color: white;
    text-align: center;
    padding: 48px 24px;
}

.store-footer h2 {
    margin-top: 0;
    color: var(--accent-color);
}

.store-footer p {
    max-width: 760px;
    margin: auto;
    color: rgba(255, 255, 255, 0.75);
    line-height: 1.7;
}

.settings-panel {
    background: white;
    padding: 22px;
    position: sticky;
    top: 72px;
    height: calc(100vh - 72px);
    overflow-y: auto;
    border-left: 1px solid #e5e7eb;
}

.panel h3 {
    margin-top: 0;
}

.panel-note {
    color: #6b7280;
    line-height: 1.6;
}

.panel.hidden {
    display: none;
}

.panel label {
    display: block;
    font-weight: 900;
    margin-top: 14px;
}

.panel input,
.panel textarea {
    width: 100%;
    margin-top: 6px;
    padding: 12px;
    border: 1px solid #d1d5db;
    border-radius: 12px;
}

.panel textarea {
    min-height: 110px;
}

.panel button {
    width: 100%;
    margin-top: 16px;
    padding: 13px;
    border-radius: 999px;
    background: #001d1d;
    color: white;
}

.panel ul {
    padding-left: 20px;
    line-height: 1.8;
}

.tutorial-step {
    padding: 14px;
    border-radius: 16px;
    background: #f3f4f6;
    margin-bottom: 10px;
}

.tutorial-step strong {
    color: #d19035;
}

.buildframe-footer {
    background: #001d1d;
    color: white;
    text-align: center;
    padding: 20px;
}

.buildframe-footer a {
    color: #19d7d7;
    text-decoration: none;
}

.buildframe-logo-bubble {
    position: fixed;
    right: 18px;
    bottom: 18px;
    width: 58px;
    height: 58px;
    border-radius: 50%;
    background: white;
    display: grid;
    place-items: center;
    box-shadow: 0 18px 38px rgba(0, 0, 0, 0.25);
    z-index: 100;
}

.buildframe-logo-bubble img {
    width: 42px;
    height: 42px;
    object-fit: contain;
}

@media (max-width: 1200px) {
    .builder-shell {
        grid-template-columns: 220px 1fr;
    }

    .settings-panel {
        grid-column: 1 / -1;
        position: static;
        height: auto;
        border-left: none;
        border-top: 1px solid #e5e7eb;
    }
}

@media (max-width: 900px) {
    .builder-topbar {
        height: auto;
        padding: 16px;
        align-items: flex-start;
        gap: 12px;
        flex-direction: column;
    }

    .builder-actions {
        flex-wrap: wrap;
    }

    .builder-shell {
        grid-template-columns: 1fr;
    }

    .builder-sidebar {
        position: static;
        height: auto;
    }

    .store-header,
    .store-nav,
    .store-location,
    .checkout-preview,
    .store-about-grid,
    .review-grid,
    .gallery-grid {
        grid-template-columns: 1fr;
        flex-direction: column;
    }

    .store-hero-content {
        padding: 42px 24px;
    }

    .builder-section {
        padding: 38px 22px;
    }

    .gallery-item:first-child {
        min-height: 260px;
    }
}

.editable-image {
    position: relative;
    cursor: pointer;
}

.product-image-edit img {
    pointer-events: none;
}

.image-edit-badge {
    position: absolute;
    left: 12px;
    bottom: 12px;
    z-index: 5;
    padding: 7px 11px;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.72);
    color: white;
    font-size: 0.72rem;
    font-weight: 900;
    opacity: 0;
    transform: translateY(6px);
    transition: 0.2s ease;
}

.editable-image:hover .image-edit-badge {
    opacity: 1;
    transform: translateY(0);
}

.gallery-item {
    position: relative;
}

/* ==========================================================
   BUILDER LAYOUT SKINS
==========================================================*/

/* ================= COFFEE ================= */

.skin-cozy-coffee .store-hero {
    min-height: 650px;
    border-bottom-left-radius: 80px;
    background-position: center;
}

.skin-cozy-coffee .builder-section {
    background: #faf5ef;
}

.skin-cozy-coffee .product-card {
    border-radius: 30px;
}

/* ================= HEALTHY ================= */

.skin-garden-healthy {
    background: #f6fbf3;
}

.skin-garden-healthy .store-hero {
    min-height: 680px;
    clip-path: ellipse(100% 100% at 50% 0%);
}

.skin-garden-healthy .builder-section {
    background: #eef9ec;
}

.skin-garden-healthy .product-card {
    border-radius: 12px;
    border: 2px solid #dff0d8;
}

/* ================= BBQ ================= */

.skin-country-bbq {
    background: #241710;
}

.skin-country-bbq .store-hero {
    min-height: 700px;
}

.skin-country-bbq .builder-section {
    background: #2f2017;
    color: white;
}

.skin-country-bbq .product-card {
    background: #432d20;
    color: white;
    border-radius: 8px;
}

.skin-country-bbq .product-card p {
    color: #ddd;
}

/* ================= PIZZA ================= */

.skin-family-pizza .store-hero {
    min-height: 600px;
}

.skin-family-pizza .builder-section {
    background: #fff5eb;
}

.skin-family-pizza .product-grid {
    grid-template-columns: repeat(3, 1fr);
}

/* ================= BAKERY ================= */

.skin-boutique-bakery .store-hero {
    min-height: 620px;
}

.skin-boutique-bakery .builder-section {
    background: #fff8fb;
}

.skin-boutique-bakery .product-card {
    border-radius: 35px;
}

/* ================= SEAFOOD ================= */

.skin-coastal-seafood .store-hero {
    min-height: 650px;
}

.skin-coastal-seafood .builder-section {
    background: #eef9ff;
}

/* ================= LUXURY ================= */

.skin-luxury-dining {
    background: #111;
}

.skin-luxury-dining .builder-section {
    background: #1a1a1a;
    color: white;
}

.skin-luxury-dining .product-card {
    background: #252525;
    color: white;
    border: 1px solid gold;
}

/* ================= STREET ================= */

.skin-street-market .builder-section {
    background: #fff8e4;
}

.skin-street-market .product-card {
    transform: rotate(-1deg);
}

.skin-street-market .product-card:nth-child(even) {
    transform: rotate(1deg);
}

/* ================= MILK TEA ================= */

.skin-youth-milktea .builder-section {
    background: #fff8fd;
}

.skin-youth-milktea .product-card {
    border-radius: 28px;
}

/* ================= ASIAN ================= */

.skin-asian-house .builder-section {
    background: #fffdf7;
}

.skin-asian-house .product-card {
    border-radius: 18px;
}

/* ==========================================================
   BUILDFRAME GLOBAL PAYMENT CENTER
==========================================================*/

.payment-center-builder {

    display: grid;

    gap: 28px;

    margin-top: 25px;

}

.payment-method-card {

    background: white;

    border: 1px solid #e5e7eb;

    border-radius: 22px;

    padding: 26px;

    box-shadow: 0 12px 28px rgba(0, 0, 0, .06);

    transition: .25s;

}

.payment-method-card:hover {

    transform: translateY(-2px);

    box-shadow: 0 18px 38px rgba(0, 0, 0, .10);

}

.payment-method-card h5 {

    margin: 0 0 18px;

    font-size: 20px;

    color: var(--main-color);

}

.payment-method-card label {

    display: block;

    margin-top: 14px;

    font-weight: 700;

}

.payment-method-card input[type="text"],

.payment-method-card textarea,

.payment-method-card select {

    width: 100%;

    padding: 12px 14px;

    margin-top: 6px;

    border-radius: 12px;

    border: 1px solid #d1d5db;

    font-size: 15px;

    background: white;

}

.payment-method-card textarea {

    min-height: 110px;

    resize: vertical;

}

.payment-method-card input[type="file"] {

    margin-top: 10px;

    padding: 14px;

    width: 100%;

    border: 2px dashed #d1d5db;

    border-radius: 14px;

    background: #fafafa;

}

.payment-method-card input[type="checkbox"] {

    margin-right: 10px;

    transform: scale(1.15);

}

.payment-method-card hr {

    margin: 25px 0;

    border: none;

    border-top: 1px solid #ececec;

}

.payment-method-card .mini-note {

    margin-top: 8px;

    color: #6b7280;

    font-size: 13px;

}

.payment-method-card .upload-preview {

    margin-top: 12px;

    width: 140px;

    height: 140px;

    border-radius: 16px;

    border: 1px solid #ddd;

    background: #fafafa;

    display: flex;

    align-items: center;

    justify-content: center;

    overflow: hidden;

}

.payment-method-card .upload-preview img {

    width: 100%;

    height: 100%;

    object-fit: contain;

}

.payment-method-card .coming-soon {

    display: inline-block;

    margin-top: 10px;

    padding: 6px 10px;

    border-radius: 999px;

    background: #eef9ff;

    color: #0f766e;

    font-size: 12px;

    font-weight: 700;

}