/* Page-level layout and responsive breakpoints. Breakpoints land in Phase 2. */

.products-section {
    max-width: var(--container-width);
    margin: 64px auto;
    padding: 0 24px;
}

body.page-index .editorial-list {
    max-width: var(--container-width);
    margin: 0 auto 100px;
    padding: 0 24px;
}

body.page-products .editorial-list {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 24px;
}

body.page-index .editorial-row {
    display: flex;
    align-items: center;
    gap: 64px;
    padding: 64px 0;
    border-bottom: 1px solid var(--color-border);
}

body.page-products .editorial-row {
    display: flex;
    align-items: center;
    gap: 64px;
    padding: 80px 0;
    border-bottom: 1px solid var(--color-border);
}

body.page-index .editorial-row:last-child {
    border-bottom: none;
}

body.page-products .editorial-row:last-child {
    border-bottom: none;
    margin-bottom: 80px;
}

.editorial-row:nth-child(even) {
    flex-direction: row-reverse;
}

.editorial-media {
    flex: 1;
    aspect-ratio: 4/3;
    background-color: var(--color-pastel-green);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
}

.editorial-media svg {
    color: var(--color-green-accent);
    opacity: 0.3;
}

.editorial-info {
    flex: 1;
}

.editorial-title {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 8px;
}

.editorial-price {
    font-size: 18px;
    color: var(--color-text-secondary);
    margin-bottom: 24px;
}

body.page-index .news-section {
    max-width: var(--container-width);
    margin: 0 auto 80px;
    padding: 0 24px;
}

body.page-news .news-section {
    max-width: var(--container-width);
    margin: 80px auto 0;
    padding: 0 24px;
}

.trustpilot-section {
    background: var(--color-pastel-green);
    padding: 80px 0;
    margin-bottom: 0;
}

.trustpilot-container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 24px;
    text-align: center;
}

.trustpilot-header {
    margin-bottom: 40px;
}

.trustpilot-rating {
    font-size: 48px;
    font-weight: 700;
    letter-spacing: -2px;
    margin-bottom: 8px;
}

.trustpilot-stars {
    color: var(--color-green-accent);
    font-size: 24px;
    margin-bottom: 8px;
    letter-spacing: 2px;
}

.trustpilot-count {
    font-size: 14px;
    color: var(--color-text-secondary);
    margin-bottom: 40px;
}

.trustpilot-reviews {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    text-align: left;
}

.trustpilot-review-card {
    background: var(--color-white);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    padding: 24px;
}

.trustpilot-review-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.trustpilot-review-name {
    font-weight: 700;
    font-size: 14px;
}

.trustpilot-review-stars {
    color: var(--color-green-accent);
    font-size: 14px;
    letter-spacing: 1px;
}

.trustpilot-review-text {
    font-size: 14px;
    color: var(--color-text-secondary);
    line-height: 1.6;
}

.trustpilot-review-date {
    font-size: 12px;
    color: var(--color-text-secondary);
    margin-top: 16px;
    opacity: 0.7;
}

.venue-section {
    background: var(--color-white);
    padding: 80px 0;
    border-top: 1px solid var(--color-border);
}

.venue-container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 24px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 64px;
    align-items: center;
}

.venue-visual {
    height: 440px;
    background: var(--color-pastel-green);
    border-radius: var(--radius-md);
    border: 1px solid var(--color-border);
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(46,125,50,0.1);
}

.history-section {
    max-width: var(--container-width);
    margin: 100px auto;
    padding: 0 24px;
}

.history-row {
    display: flex;
    align-items: center;
    gap: 80px;
    padding: 80px 0;
    border-bottom: 1px solid var(--color-border);
}

.history-row:last-child {
    border-bottom: none;
}

.history-row:nth-child(even) {
    flex-direction: row-reverse;
}

.history-media {
    flex: 1;
    aspect-ratio: 4/3;
    background-color: var(--color-pastel-green);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--color-border);
}

.history-media svg {
    color: var(--color-green-accent);
    opacity: 0.2;
}

.history-info {
    flex: 1;
}

.history-year {
    font-size: 14px;
    font-weight: 700;
    color: var(--color-green-accent);
    text-transform: uppercase;
    margin-bottom: 12px;
    display: block;
}

.history-title {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 20px;
    letter-spacing: -1px;
}

.history-text {
    font-size: 16px;
    color: var(--color-text-secondary);
    line-height: 1.7;
}

.team-section {
    background-color: var(--color-pastel-green);
    padding: 100px 0;
}

.team-container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 24px;
}

.team-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
}

.team-card {
    background: var(--color-white);
    border-radius: var(--radius-sm);
    overflow: hidden;
    border: 1px solid var(--color-border);
    transition: var(--transition);
}

.team-image {
    aspect-ratio: 1/1;
    background: var(--color-pastel-green);
    display: flex;
    align-items: center;
    justify-content: center;
    border-bottom: 1px solid var(--color-border);
}

.team-image svg {
    color: var(--color-green-accent);
    opacity: 0.2;
}

.team-content {
    padding: 24px;
}

.team-name {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 4px;
}

.team-role {
    font-size: 13px;
    font-weight: 600;
    color: var(--color-green-accent);
    text-transform: uppercase;
    margin-bottom: 16px;
    display: block;
}

.team-bio {
    font-size: 14px;
    color: var(--color-text-secondary);
    line-height: 1.6;
}

.featured-section {
    max-width: var(--container-width);
    margin: 80px auto 0;
    padding: 0 24px;
}

.social-section {
    background: var(--color-pastel-green);
    padding: 80px 0;
    margin-top: 80px;
}

.editorial-media i {
    font-size: 80px;
    color: var(--color-green-accent);
    opacity: 0.2;
}

.story-section {
    max-width: var(--container-width);
    margin: 80px auto 0;
    padding: 0 24px;
}

.story-media {
    aspect-ratio: 16/9;
    background: var(--color-pastel-green);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
}

.story-media svg {
    color: var(--color-green-accent);
    opacity: 0.3;
}

.story-body {
    max-width: 720px;
    margin: 48px auto 0;
}

.story-body p {
    font-size: 17px;
    color: var(--color-text-secondary);
    line-height: 1.8;
    margin-bottom: 24px;
}

.story-lead {
    font-size: 20px;
    color: var(--color-black);
    font-weight: 500;
}

.story-quote {
    border-left: 3px solid var(--color-green-accent);
    padding-left: 28px;
    margin: 48px 0;
    font-size: 24px;
    font-weight: 700;
    line-height: 1.4;
    letter-spacing: -0.5px;
}

.story-back {
    text-align: center;
    margin: 64px auto 100px;
}

.grid-section {
    max-width: var(--container-width);
    margin: 80px auto;
    padding: 0 24px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.media-box {
    background: var(--color-pastel-green);
    aspect-ratio: 4/3;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--color-border);
}

.media-box svg {
    color: var(--color-green-accent);
    opacity: 0.3;
}

.description-section {
    max-width: var(--container-width);
    margin: 100px auto;
    padding: 0 24px;
    display: flex;
    gap: 64px;
    align-items: flex-start;
}

.desc-content {
    flex: 1.5;
}

.desc-content h2 {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 24px;
    letter-spacing: -1px;
}

.desc-content p {
    color: var(--color-text-secondary);
    font-size: 18px;
    line-height: 1.6;
    margin-bottom: 24px;
}

.pricing-section {
    max-width: var(--container-width);
    margin: 100px auto;
    padding: 0 24px;
}

.photo-wall-section {
    max-width: var(--container-width);
    margin: 100px auto;
    padding: 0 24px;
}

.photo-wall {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-auto-rows: 180px;
    gap: 24px;
}

.photo-tile {
    background: var(--color-pastel-green);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    overflow: hidden;
}

.photo-tile svg {
    color: var(--color-green-accent);
    opacity: 0.3;
    transition: var(--transition);
}

.photo-tile.tall {
    grid-row: span 2;
}

.photo-tile.photo-frame {
    grid-column: 4;
    grid-row: 2 / 4;
}

.photo-tile.wide {
    grid-column: span 2;
}

.pricing-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.price-card {
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    padding: 32px;
    background: var(--color-white);
    display: flex;
    flex-direction: column;
    transition: var(--transition);
}

.price-value {
    font-size: 40px;
    font-weight: 800;
    margin-bottom: 8px;
    letter-spacing: -1px;
}

.price-unit {
    font-size: 14px;
    color: var(--color-text-secondary);
    font-weight: 500;
    margin-bottom: 32px;
}

.price-features {
    list-style: none;
    margin-bottom: 40px;
    flex-grow: 1;
}

.price-features li {
    font-size: 14px;
    color: var(--color-text-secondary);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.cart-container {
    max-width: var(--container-width);
    margin: 60px auto;
    padding: 0 24px;
}

.cart-empty {
    text-align: center;
    padding: 80px 24px;
    background: var(--color-pastel-green);
    border-radius: var(--radius-md);
    margin-bottom: 40px;
}

.cart-empty-icon {
    margin-bottom: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.cart-empty-icon svg {
    width: 64px;
    height: 64px;
    color: var(--color-black);
    opacity: 0.3;
    stroke: currentColor;
}

.cart-empty p {
    color: var(--color-text-secondary);
    font-size: 18px;
    margin-bottom: 32px;
}

.cart-items {
    display: grid;
    gap: 24px;
    margin-bottom: 40px;
}

.cart-item {
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    padding: 24px;
    display: grid;
    grid-template-columns: 100px 1fr auto;
    gap: 24px;
    align-items: center;
}

.item-image {
    width: 100px;
    height: 100px;
    background: var(--color-pastel-green);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
}

.item-image svg {
    color: var(--color-green-accent);
    opacity: 0.3;
}

.item-details h3 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 8px;
}

.item-details p {
    color: var(--color-text-secondary);
    font-size: 14px;
}

.item-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.quantity-control {
    display: flex;
    align-items: center;
    gap: 8px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    padding: 4px;
}

.quantity-btn {
    width: 32px;
    height: 32px;
    border: none;
    background: transparent;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.quantity-btn:hover {
    background: var(--color-pastel-green);
}

.quantity-display {
    width: 40px;
    text-align: center;
    font-weight: 600;
}

.item-price {
    font-size: 18px;
    font-weight: 700;
    min-width: 80px;
    text-align: right;
}

.remove-btn {
    background: none;
    border: none;
    color: var(--color-text-secondary);
    cursor: pointer;
    font-size: 18px;
    transition: var(--transition);
}

.remove-btn:hover {
    color: var(--color-black);
}

.cart-summary {
    border-top: 2px solid var(--color-border);
    padding-top: 24px;
    display: flex;
    justify-content: flex-end;
    gap: 40px;
    align-items: center;
}

.summary-item {
    display: flex;
    gap: 16px;
    align-items: center;
}

.summary-label {
    color: var(--color-text-secondary);
    font-size: 14px;
}

.summary-value {
    font-size: 24px;
    font-weight: 700;
}

.checkout-section {
    max-width: 560px;
    margin: 0 auto 40px;
}

.checkout-form {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    padding: 24px;
}

.checkout-form .full {
    grid-column: 1 / -1;
}

.checkout-form input {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    font-family: var(--font-main);
    font-size: 14px;
}

.checkout-form input:focus {
    outline: none;
    border-color: var(--color-green-accent);
}

.checkout-note {
    grid-column: 1 / -1;
    font-size: 12px;
    color: var(--color-text-secondary);
    margin: 0;
}

.checkout-success {
    text-align: center;
    background: var(--color-pastel-green);
    border-radius: var(--radius-md);
    padding: 48px 24px;
    margin-bottom: 40px;
}

.legal-section {
    max-width: 760px;
    margin: 0 auto;
    padding: 64px 24px 80px;
}

.legal-section h2 {
    font-size: 22px;
    font-weight: 700;
    letter-spacing: -0.5px;
    margin: 40px 0 12px;
}

.legal-section h2:first-child {
    margin-top: 0;
}

.legal-section p,
        .legal-section li {
    font-size: 15px;
    color: var(--color-text-secondary);
    line-height: 1.7;
    margin-bottom: 12px;
}

.legal-section ul {
    padding-left: 20px;
    margin-bottom: 12px;
}

.legal-updated {
    font-size: 13px;
    color: var(--color-text-secondary);
    margin-bottom: 32px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--color-border);
}

/* ---- carried over from the original venue.html (folded into Phase 2 breakpoints) ---- */

/* ===================================================================
   Responsive layer (Phase 2)
   Breakpoints: 1024px (tablet), 768px (phone).
   The two original venue.html photo-wall queries are folded in below
   and their dead `.photo-frame` selector is corrected to match the
   real class (`.photo-tile.photo-frame`).
   =================================================================== */

/* ---------- Navigation ---------- */
.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 44px;
    height: 44px;
    padding: 0 10px;
    background: transparent;
    border: none;
    cursor: pointer;
}
.nav-toggle-bar {
    display: block;
    height: 2px;
    width: 100%;
    background: var(--color-black);
    border-radius: 1px;
    transition: var(--transition);
}

/* ---------- Fluid typography ----------
   Upper bounds are the page's existing desktop size, so desktop rendering is
   unchanged; the fluid range only kicks in below that. */
h1 {
    font-size: clamp(32px, 6vw, 48px);
}
.section-title {
    font-size: clamp(24px, 3.4vw, 28px);
}
.history-title {
    font-size: clamp(22px, 3.4vw, 32px);
}
.featured-title {
    font-size: clamp(22px, 3.4vw, 32px);
}
.social-title {
    font-size: clamp(24px, 4vw, 36px);
}
.price-value {
    font-size: clamp(32px, 5vw, 40px);
}
.trustpilot-rating {
    font-size: clamp(32px, 4vw, 48px);
}
.error-code {
    font-size: clamp(56px, 18vw, 96px);
}

/* ---------- Fixed heights -> viewport-relative ---------- */
.venue-visual {
    height: clamp(280px, 60vh, 440px);
}
.featured-media {
    min-height: 0;
}

/* ---------- Forms ---------- */
.checkout-form input {
    font-size: 16px;
}

/* ---------- Tap targets ---------- */
.quantity-btn {
    min-width: 44px;
    min-height: 44px;
}
.remove-btn {
    min-width: 44px;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* ---------- Empty state (span set by store.js, not inline) ---------- */
.bento-grid .bento-empty {
    grid-column: span 6;
}

/* ============================ TABLET ============================ */
@media (max-width: 1024px) {
    .nav-container {
        gap: 16px;
    }
    nav ul {
        gap: 20px;
    }

    /* These are page-scoped in components.css (body.page-index .bento-grid),
       so the overrides must carry the same specificity or they lose. */
    body.page-index .bento-grid {
        grid-template-columns: repeat(4, 1fr);
    }
    body.page-index .bento-grid .card-large,
    body.page-index .bento-grid .card-wide {
        grid-column: span 2;
    }
    body.page-index .bento-grid .card-tall,
    body.page-index .bento-grid .card-standard {
        grid-column: span 1;
    }
    body.page-index .bento-grid .bento-empty {
        grid-column: span 4;
    }

    body.page-index .news-grid,
    body.page-news .news-grid,
    .team-grid,
    .trustpilot-reviews,
    .pricing-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    /* The venue block is two columns in this band, so the feature list gets
       roughly half the width and wraps labels onto a second line. */
    body.page-index .feature-list {
        grid-template-columns: 1fr;
    }

    /* Fold in the original 900px photo-wall query. */
    .photo-wall {
        grid-template-columns: repeat(2, 1fr);
        grid-auto-rows: 150px;
    }

    .editorial-row,
    .history-row {
        gap: 40px;
    }
}

/* ============================= PHONE ============================= */
@media (max-width: 768px) {
    /* ---- Mobile navigation ---- */
    .nav-toggle {
        display: flex;
    }

    /* The panel is taken out of flow and pinned to the bottom edge of the
       sticky header, so opening it overlays the page instead of growing the
       header and shoving the whole document down. */
    header {
        position: sticky;
    }
    .nav-container {
        position: static;
    }
    .nav-container > .logo {
        margin-inline-end: auto;
    }

    #siteNav {
        display: none;
    }

    /* Overlay panel: out of flow, spanning the viewport, hanging from the
       bottom edge of the sticky header. */
    body.nav-open #siteNav {
        display: flex;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        flex-direction: column;
        padding: 8px 0 16px;
        background: var(--color-white);
        border-bottom: 1px solid var(--color-border);
        box-shadow: 0 12px 24px rgba(0, 0, 0, 0.08);
    }
    body.nav-open #siteNav ul {
        flex-direction: column;
        gap: 0;
    }
    /* Left-align the panel text with the logo's optical edge. */
    body.nav-open #siteNav ul li a {
        display: flex;
        align-items: center;
        min-height: 44px;
        padding: 0 24px;
        border-radius: var(--radius-sm);
    }
    body.nav-open #siteNav ul li a:active {
        background: var(--color-pastel-green);
    }
    /* Language switch stays in the top bar (it is a sibling of the panel and
       cannot stack inside it), so it must stay visible on a phone. */
    .lang-switch {
        display: flex;
        margin-inline-start: auto;
        padding-inline-end: 12px;
    }
    .lang-switch svg {
        width: 16px;
        height: 16px;
    }

    body.nav-open .nav-toggle {
        margin-left: 0;
    }

    /* Bars turn into an X while the panel is open. */
    body.nav-open .nav-toggle-bar:nth-child(1) {
        transform: translateY(7px) rotate(45deg);
    }
    body.nav-open .nav-toggle-bar:nth-child(2) {
        opacity: 0;
    }
    body.nav-open .nav-toggle-bar:nth-child(3) {
        transform: translateY(-7px) rotate(-45deg);
    }

    /* ---- Grid collapse ----
       Page-scoped base rules (body.page-index .bento-grid etc.) have higher
       specificity than a bare class, so every override below repeats the
       body.page-* prefix. Without it these silently lose and the grids stay
       jammed at 2-6 columns on a phone. */
    body.page-index .bento-grid {
        grid-template-columns: repeat(2, 1fr);
        grid-auto-rows: 160px;
    }
    body.page-index .bento-grid .card-large,
    body.page-index .bento-grid .card-wide,
    body.page-index .bento-grid .card-tall,
    body.page-index .bento-grid .card-standard {
        grid-column: span 1;
        grid-row: span 1;
    }
    body.page-index .bento-grid .bento-empty {
        grid-column: span 2;
    }

    body.page-index .news-grid,
    body.page-news .news-grid,
    body.page-index .feature-list,
    .team-grid,
    .trustpilot-reviews,
    .pricing-grid,
    .venue-container,
    .grid-section,
    .checkout-form {
        grid-template-columns: 1fr;
    }

    .cart-item {
        grid-template-columns: 80px 1fr;
    }

    /* ---- Fold in the original 560px photo-wall query ---- */
    .photo-wall {
        grid-template-columns: 1fr;
        grid-auto-rows: 180px;
    }
    .photo-tile.tall,
    .photo-tile.wide,
    .photo-tile.photo-frame {
        grid-row: span 1;
        grid-column: span 1;
    }

    /* ---- Media after text ----
       These rows are image-first in the DOM for the desktop side-by-side
       layout. Once they stack, the heading and copy should lead and the
       image should follow, so it is pushed to the end with `order`.
       `.grid-section` is a grid, `order` applies the same way.
       Product rows (.editorial-row) are deliberately excluded - they stay
       side by side so each product keeps image and copy on one line. */
    .grid-section .media-box,
    .history-media {
        order: 2;
        /* Once the row stacks, align-items:center would shrink these to their
           content width; stretch them back to the full column. */
        align-self: stretch;
        width: 100%;
        flex: none;
    }
    .grid-section > div:not(.media-box),
    .history-info {
        order: 1;
    }

    /* ---- Larger headings on small screens ----
       .section-title / .history-title have page-scoped base rules in
       components.css that outrank the fluid clamp() above, so they stayed at
       their small desktop size on a phone. Restore the scaled-down sizes
       here with matching specificity. */
    body.page-index .section-title,
    body.page-news .section-title,
    .section-title {
        font-size: 30px;
    }
    .history-title {
        font-size: 26px;
    }
    body.page-venue .section-title {
        font-size: 30px;
    }
    body.page-about .section-title {
        font-size: 32px;
    }

    /* ---- Centered text on small screens ----
       Single-column mobile reads as one narrow measure, so left-aligned
       copy leaves a ragged edge right against the screen border. Center the
       text and give the page a consistent gutter. */
    .grid-section,
    .description-section,
    .history-info,
    .editorial-info,
    .news-card-content,
    .featured-content,
    .team-content,
    .price-card,
    .trustpilot-review-card,
    .legal-section,
    .story-body,
    .cart-empty,
    .cart-item {
        text-align: center;
    }

    /* Inline list rows (feature ticks, price bullets): center each icon+label
       pair. The rows themselves stay left-aligned so the icons form one
       clean column instead of scattering. */
    .feature-item,
    .price-features li {
        justify-content: flex-start;
        text-align: left;
    }
    body.page-venue .feature-list,
    body.page-index .feature-list {
        /* Shrink the block to its widest row so it can be centered as one
           unit, and every row shares that width so the ticks line up.
           A fixed width would leave the short labels hugging the left. */
        width: fit-content;
        max-width: 100%;
        margin-left: auto;
        margin-right: auto;
    }
    body.page-venue .feature-item,
    body.page-index .feature-item {
        justify-self: stretch;
        width: 100%;
    }

    /* Bare headings and stand-alone copy inside those containers (venue
       page uses a plain <div>, so its h2/p are not caught above). */
    .grid-section h2,
    .description-section h2,
    .grid-section p,
    .description-section p,
    .venue-container p,
    .venue-container h2,
    .venue-container .btn-primary {
        text-align: center;
    }

    /* The badge is inline-flex, so text-align does not move it - center the
       inline box itself. Needs the body.page-index prefix to outrank the
       page-scoped base rule in components.css. */
    body.page-index .venue-container .status-badge {
        display: flex;
        justify-content: center;
        width: fit-content;
        margin-left: auto;
        margin-right: auto;
    }

    /* Section headers are flex rows; text-align alone does not center the
       flex children, so stack them and center each. The decorative rule is
       a flex-grow sibling, which would otherwise keep the title pinned left. */
    .section-header,
    .section-header--split {
        flex-direction: column;
        justify-content: center;
        align-items: center;
        text-align: center;
        gap: 12px;
    }
    .section-header .section-title,
    .section-header--split .section-title,
    .section-header > span,
    .section-header--split > span {
        text-align: center;
    }

    /* Inline-block CTAs need their wrapper centered, not just the text. */
    .venue-container > div {
        text-align: center;
    }

    /* Section headings and the cart title sit directly in their section. */
    .photo-wall-section .section-title,
    .pricing-section .section-title,
    .team-container .section-title,
    .trustpilot-container .section-title,
    .story-section .section-title,
    .products-section .section-title,
    .cart-container h1 {
        text-align: center;
    }

    /* Footer legal line. */
    .footer-inner,
    .footer-links {
        text-align: center;
    }

    /* Keep a comfortable gutter so no text sits against the screen edge. */
    .grid-section,
    .description-section,
    .history-section,
    .story-section,
    .pricing-section,
    .photo-wall-section,
    .featured-section,
    .products-section,
    .news-section,
    .editorial-list,
    .trustpilot-container,
    .team-container,
    .venue-container,
    .cart-container,
    .social-container {
        padding-left: 24px;
        padding-right: 24px;
    }

    /* ---- Flex rows stack ----
       .editorial-row is excluded: each product keeps its image and copy on
       one horizontal line so the row stays scannable. */
    .history-row,
    .featured-card,
    .description-section,
    .cart-summary {
        flex-direction: column;
        gap: 24px;
    }

    /* Footer keeps one line: logo on the left, legal links on the right.
       Wraps only if the two halves genuinely cannot share the width. */
    .footer-inner {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 8px 24px;
        align-items: center;
        text-align: start;
    }
    .history-row:nth-child(even) {
        flex-direction: column;
    }
    .editorial-row {
        padding: 24px 0;
    }
    .history-row {
        padding: 40px 0;
    }

    /* Product row stays horizontal on a phone: image beside the copy so each
       product keeps one scannable line. The image takes a smaller share so
       the copy column stays wide enough to read. */
    .editorial-row {
        flex-direction: row;
        align-items: center;
        gap: 14px;
    }
    .editorial-row:nth-child(even) {
        flex-direction: row-reverse;
    }
    .editorial-media {
        flex: none;
        width: 34%;
        max-width: 132px;
        min-width: 92px;
        aspect-ratio: 1 / 1;
        order: 0;
    }
    .editorial-info {
        flex: 1;
        min-width: 0;
        order: 0;
    }

    /* Tighten the copy so the row does not grow tall. */
    .editorial-title {
        font-size: 18px;
        margin-bottom: 4px;
    }
    .editorial-price {
        font-size: 15px;
        margin-bottom: 8px;
    }
    .editorial-info p {
        font-size: 13px;
        line-height: 1.5;
        margin-bottom: 12px !important;
    }
    .editorial-info .btn-primary {
        padding: 10px 20px !important;
        font-size: 14px;
    }

    /* The split header is a flex row with a nowrap label; stack it on a
       phone so neither side gets squeezed, and center the stack. */
    .section-header--split {
        flex-direction: column;
        align-items: center;
        gap: 8px;
        text-align: center;
    }
    .section-header--split .section-title {
        font-size: 28px;
    }

    /* ---- Padding ----
       base.css/components.css set these per-page (body.page-index .hero,
       body.page-index footer), so the phone padding needs the same prefix. */
    body.page-index .hero,
    body.page-about .hero,
    body.page-news .hero,
    body.page-products .hero,
    body.page-story .hero,
    body.page-venue .hero {
        /* The hero is the first block and sits directly under the sticky
           header, so it gets noticeably more breathing room above than
           below. */
        padding: 72px 0 56px;
    }
    body.page-privacy .hero,
    body.page-terms .hero,
    body.page-404 .hero {
        padding: 72px 0 56px;
    }

    /* Pages whose first block is not a .hero (cart) get the same top space. */
    body.page-cart main > *:first-child {
        padding-top: 56px;
    }

    body.page-index footer,
    body.page-about footer,
    body.page-news footer,
    body.page-products footer,
    body.page-story footer,
    body.page-venue footer,
    body.page-cart footer {
        padding: 32px 0;
    }
    body.page-cart footer {
        margin-top: 40px;
    }
}

/* about.html sets overflow-x:hidden, which masks real overflow instead of
   fixing it. Now that the flex rows stack, drop it so overflow stays visible. */
@media (min-width: 769px) {
    body.page-about {
        overflow-x: visible;
    }
}
