/* =====================================================
   FIRESTONE PIZZA HOUSE
   Family • Party • Togetherness
===================================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --pizza-theme: #a52a2a;
    --pizza-accent: #ffd166;
    --pizza-radius: 24px;
    --pizza-spacing: 72px;
    --pizza-font: Arial, Helvetica, sans-serif;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--pizza-font);
    background: #fff4e6;
    color: #3a1712;
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    display: block;
    width: 100%;
}

/* HEADER */

.pizza-header {
    position: sticky;
    top: 0;
    z-index: 999;
    background: rgba(255, 244, 230, 0.96);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(165, 42, 42, 0.16);
}

.pizza-nav {
    width: min(1180px, 92%);
    min-height: 76px;
    margin: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.pizza-brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.pizza-logo {
    width: 48px;
    height: 48px;
    border-radius: 16px;
    background: linear-gradient(135deg, var(--pizza-theme), var(--pizza-accent));
    display: grid;
    place-items: center;
    color: white;
    font-size: 1.35rem;
}

.pizza-brand strong,
.pizza-brand span {
    display: block;
}

.pizza-brand span {
    color: var(--pizza-theme);
    font-size: 0.72rem;
    font-weight: 900;
    text-transform: uppercase;
}

.pizza-links {
    display: flex;
    gap: 24px;
    font-weight: 900;
}

/* HERO */

.pizza-hero {
    position: relative;
    min-height: 640px;
    padding: 88px 0;
    background:
        url("https://images.unsplash.com/photo-1548369937-47519962c11a?auto=format&fit=crop&w=1800&q=80");
    background-size: cover;
    background-position: center;
    color: white;
    overflow: hidden;
}

.pizza-hero-overlay {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 78% 24%, rgba(255, 209, 102, 0.35), transparent 24%),
        linear-gradient(110deg, rgba(58, 23, 18, 0.92), rgba(165, 42, 42, 0.68), rgba(58, 23, 18, 0.32));
}

.pizza-hero-inner {
    position: relative;
    z-index: 2;
    width: min(1180px, 92%);
    min-height: 470px;
    margin: auto;
    display: grid;
    grid-template-columns: 1.05fr 0.95fr;
    gap: 42px;
    align-items: center;
}

.pizza-badge {
    display: inline-flex;
    padding: 10px 16px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.16);
    font-size: 0.82rem;
    font-weight: 900;
    margin-bottom: 20px;
}

.pizza-copy h1 {
    max-width: 720px;
    font-size: clamp(3rem, 6vw, 5.6rem);
    line-height: 0.95;
    letter-spacing: -0.07em;
}

.pizza-copy p {
    max-width: 610px;
    margin-top: 22px;
    color: rgba(255, 255, 255, 0.86);
    font-size: 1.07rem;
    line-height: 1.75;
}

.pizza-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 28px;
}

.pizza-btn {
    min-height: 46px;
    padding: 0 22px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 950;
}

.pizza-btn.primary {
    background: var(--pizza-accent);
    color: #3a1712;
}

.pizza-btn.secondary {
    border: 2px solid rgba(255, 255, 255, 0.72);
    color: white;
}

/* HERO FEATURE CARD */

.pizza-feature-card {
    justify-self: end;
    width: min(390px, 100%);
    padding: 30px;
    border-radius: 30px;
    background: rgba(255, 244, 230, 0.96);
    color: #3a1712;
    box-shadow: 0 30px 70px rgba(0, 0, 0, 0.24);
    border: 1px solid rgba(255, 209, 102, 0.42);
}

.pizza-feature-card span {
    color: var(--pizza-theme);
    font-size: 0.72rem;
    font-weight: 950;
    text-transform: uppercase;
    letter-spacing: 0.12em;
}

.pizza-feature-card h2 {
    margin: 10px 0;
    font-size: 2rem;
    line-height: 1.05;
}

.pizza-feature-card p {
    color: #6b4b40;
    line-height: 1.6;
}

.pizza-feature-card strong {
    display: inline-flex;
    margin-top: 18px;
    padding: 9px 16px;
    border-radius: 999px;
    background: var(--pizza-theme);
    color: white;
    font-size: 1.2rem;
}

/* EXPERIENCE EDITOR */

.experience-editor-panel {
    padding: 56px 7% 30px;
    background: #fff8ef;
    border-bottom: 1px solid rgba(165, 42, 42, 0.14);
}

.editor-header {
    max-width: 820px;
    margin-bottom: 24px;
}

.editor-header span,
.preview-card span,
.save-draft-section span {
    color: var(--pizza-theme);
    font-size: 0.78rem;
    font-weight: 950;
    text-transform: uppercase;
    letter-spacing: 0.16em;
}

.editor-header h2 {
    margin-top: 10px;
    font-size: clamp(2rem, 4vw, 3.4rem);
    line-height: 1;
    letter-spacing: -0.05em;
}

.editor-header p {
    margin-top: 12px;
    color: #6b7280;
    line-height: 1.7;
}

.editor-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

.editor-card {
    background: white;
    border: 1px solid rgba(165, 42, 42, 0.12);
    border-radius: var(--pizza-radius);
    padding: 16px;
    box-shadow: 0 12px 28px rgba(58, 23, 18, 0.08);
}

.editor-card label {
    display: block;
    margin-bottom: 8px;
    color: var(--pizza-theme);
    font-size: 0.78rem;
    font-weight: 950;
    text-transform: uppercase;
}

.editor-card input,
.editor-card textarea,
.editor-card select {
    width: 100%;
    border: 1px solid rgba(165, 42, 42, 0.18);
    border-radius: 14px;
    padding: 11px 12px;
    font: inherit;
    color: #3a1712;
    background: #fffdf8;
}

.editor-card textarea {
    min-height: 92px;
    resize: vertical;
}

.editor-card input[type="color"] {
    height: 48px;
    padding: 5px;
}

.editor-card input[type="range"] {
    padding: 0;
}

/* BUNDLES */

.pizza-container {
    width: min(1180px, 92%);
    margin: auto;
}

.pizza-bundles {
    padding: 0 0 20px;
}

.bundle-grid {
    margin-top: -60px;
    position: relative;
    z-index: 5;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 22px;
}

.bundle-grid article {
    padding: 24px;
    border-radius: var(--pizza-radius);
    background: white;
    box-shadow: 0 16px 38px rgba(58, 23, 18, 0.12);
    border: 1px solid rgba(165, 42, 42, 0.12);
}

.bundle-grid span {
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    border-radius: 15px;
    background: rgba(255, 209, 102, 0.36);
    font-size: 1.3rem;
    margin-bottom: 14px;
}

.bundle-grid h3 {
    margin-bottom: 8px;
}

.bundle-grid p {
    color: #6b7280;
    line-height: 1.6;
}

/* SECTIONS */

.pizza-section {
    padding: var(--pizza-spacing) 0;
}

.section-kicker {
    color: var(--pizza-theme);
    font-size: 0.78rem;
    font-weight: 950;
    text-transform: uppercase;
    letter-spacing: 0.16em;
}

.section-title {
    margin-top: 10px;
    font-size: clamp(2.3rem, 4vw, 4rem);
    line-height: 1;
    letter-spacing: -0.06em;
}

.section-text {
    max-width: 720px;
    margin-top: 12px;
    color: #6b7280;
    line-height: 1.7;
}

/* PRODUCTS */

.pizza-grid {
    margin-top: 34px;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 22px;
}

.product-card {
    display: flex;
    flex-direction: column;
    background: white;
    border-radius: var(--pizza-radius);
    overflow: hidden;
    box-shadow: 0 14px 34px rgba(58, 23, 18, 0.1);
    border: 1px solid rgba(165, 42, 42, 0.1);
}

.product-photo {
    height: 145px;
    background: var(--pizza-accent);
    overflow: hidden;
}

.product-photo img {
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.product-body {
    display: flex;
    flex-direction: column;
    flex: 1;
    padding: 18px;
}

.product-body h3 {
    min-height: 44px;
    font-size: 1rem;
    line-height: 1.2;
}

.product-body p {
    min-height: 42px;
    margin-top: 8px;
    color: #6b7280;
    font-size: 0.88rem;
    line-height: 1.45;
}

.product-price {
    margin-top: 14px;
}

.product-price strong {
    color: #3a1712;
    font-size: 1.15rem;
}

.product-price span {
    margin-left: 6px;
    color: #9ca3af;
    font-size: 0.9rem;
    text-decoration: line-through;
}

.product-edit-fields {
    display: grid;
    gap: 8px;
    margin-top: 12px;
}

.product-edit-fields input,
.product-edit-fields textarea {
    width: 100%;
    border: 1px solid rgba(165, 42, 42, 0.18);
    border-radius: 12px;
    padding: 9px 10px;
    font: inherit;
    font-size: 0.82rem;
    background: #fffdf8;
    color: #3a1712;
}

.product-edit-fields textarea {
    min-height: 70px;
    resize: vertical;
}

.qty-control {
    margin: 14px 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.qty-btn {
    width: 32px;
    height: 32px;
    border: 0;
    border-radius: 999px;
    background: #3a1712;
    color: white;
    font-weight: 950;
    cursor: pointer;
}

.qty-value {
    min-width: 24px;
    text-align: center;
    font-weight: 950;
}

.add-cart-btn {
    margin-top: auto;
    width: 100%;
    border: 0;
    border-radius: 999px;
    padding: 12px 14px;
    background: linear-gradient(135deg, var(--pizza-accent), #f77f00);
    color: #3a1712;
    font-weight: 950;
    cursor: pointer;
}

/* CART */

.cart-box {
    margin-top: 34px;
    padding: 26px;
    border-radius: var(--pizza-radius);
    background: white;
    box-shadow: 0 18px 44px rgba(58, 23, 18, 0.1);
}

.cart-item {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    padding: 16px 0;
    border-bottom: 1px solid #e5e7eb;
}

.cart-item span {
    display: block;
    margin-top: 5px;
    color: #6b7280;
    font-size: 0.92rem;
}

.cart-summary {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    margin-top: 20px;
    padding-top: 16px;
    border-top: 2px solid #e5e7eb;
}

.loading-text {
    color: #6b7280;
}

/* EXPERIENCE PREVIEWS */

.experience-preview-section {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 22px;
    width: min(1180px, 92%);
    margin: 0 auto var(--pizza-spacing);
}

.preview-card {
    background: white;
    border: 1px solid rgba(165, 42, 42, 0.12);
    border-radius: var(--pizza-radius);
    padding: 24px;
    box-shadow: 0 14px 34px rgba(58, 23, 18, 0.1);
}

.preview-card h3 {
    margin-top: 8px;
    font-size: 1.5rem;
    color: var(--pizza-theme);
}

.preview-card p {
    color: #6b7280;
    line-height: 1.6;
    margin: 10px 0 18px;
}

.preview-card button,
.save-draft-section button {
    border: none;
    background: var(--pizza-theme);
    color: white;
    border-radius: 999px;
    padding: 12px 18px;
    font-weight: 950;
    cursor: pointer;
}

.save-draft-section {
    width: min(1180px, 92%);
    margin: 0 auto var(--pizza-spacing);
    background: linear-gradient(135deg, #3a1712, var(--pizza-theme));
    color: white;
    border-radius: 30px;
    padding: 34px;
    display: flex;
    justify-content: space-between;
    gap: 24px;
    align-items: center;
}

.save-draft-section h2 {
    margin-top: 8px;
    font-size: 2rem;
    line-height: 1;
}

.save-draft-section p {
    max-width: 680px;
    margin-top: 10px;
    color: rgba(255, 255, 255, 0.86);
    line-height: 1.6;
}

.save-draft-section button {
    background: var(--pizza-accent);
    color: #3a1712;
    white-space: nowrap;
}

/* FOOTER */

.pizza-footer {
    padding: 34px 20px;
    text-align: center;
    background: #3a1712;
    color: white;
    font-weight: 900;
}

/* RESPONSIVE */

@media (max-width: 1100px) {

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

    .experience-preview-section {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 900px) {
    .pizza-hero-inner {
        grid-template-columns: 1fr;
    }

    .pizza-feature-card {
        justify-self: start;
    }

    .bundle-grid,
    .pizza-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 620px) {
    .pizza-nav {
        flex-direction: column;
        align-items: flex-start;
        gap: 14px;
        padding: 14px 0;
    }

    .pizza-links {
        gap: 16px;
        font-size: 0.9rem;
    }

    .pizza-hero {
        min-height: auto;
        padding: 58px 0;
    }

    .bundle-grid,
    .pizza-grid,
    .editor-grid {
        grid-template-columns: 1fr;
    }

    .pizza-actions,
    .cart-summary {
        flex-direction: column;
    }

    .pizza-btn {
        width: 100%;
    }

    .experience-editor-panel {
        padding-left: 5%;
        padding-right: 5%;
    }

    .save-draft-section {
        display: grid;
    }
}

.buildframe-footer {
    width: 100%;
    padding: 14px 5%;
    text-align: center;
    font-size: 0.82rem;
    font-weight: 700;
    color: #cdefff;
    background: #061525;
}

.buildframe-chat {
    position: fixed;
    right: 22px;
    bottom: 22px;
    z-index: 9999;
}

.buildframe-chat-btn {
    width: 58px;
    height: 58px;
    border-radius: 50%;
    border: 1px solid #66d9ff;
    background: #071a2f;
    color: #ffffff;
    font-size: 1.6rem;
    cursor: pointer;
    box-shadow: 0 0 22px rgba(79, 195, 255, 0.55);
}

.buildframe-chat-panel {
    display: block;
    position: absolute;
    right: 0;
    bottom: 72px;
    width: 260px;
    padding: 18px;
    border-radius: 18px;
    background: #071a2f;
    border: 1px solid #66d9ff;
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.28);
    color: #eaf8ff;
}

.buildframe-chat-panel.active {
    display: block;
}

.buildframe-chat-panel strong {
    display: block;
    margin-bottom: 8px;
    color: #ffffff;
}

.buildframe-chat-panel p {
    font-size: 0.88rem;
    line-height: 1.5;
    color: #bfefff;
    margin-bottom: 12px;
}

.buildframe-chat-panel a {
    display: block;
    color: #66d9ff;
    font-weight: 800;
    margin-top: 8px;
    text-decoration: none;
}

.buildframe-logo-bubble {
    position: fixed;
    right: 20px;
    bottom: 20px;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    overflow: hidden;
    z-index: 9999;
    box-shadow: 0 0 20px rgba(79, 195, 255, .6);
    transition: .3s;
}

.buildframe-logo-bubble:hover {
    transform: scale(1.08);
}

.buildframe-logo-bubble img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.buildframe-footer a {
    color: #ffffff !important;
    text-decoration: none !important;
    font-weight: 700;
    cursor: pointer;
}

.buildframe-footer a:hover {
    color: #4fc3ff !important;
    text-decoration: underline !important;
}