/*
 * Aperiodical Publishing Co. — Main Stylesheet
 *
 * Font: Museo Sans via Adobe Typekit (kit llj8bsm)
 * Palette: Forest green (#007622), periwinkle hover (#8180ff),
 *          yellow highlight (#fff6c0), off-white body (#fafaf7)
 *
 * Table of contents:
 *   1. Variables & Reset
 *   2. Typography
 *   3. Layout Containers
 *   4. Site Header & Navigation
 *   5. Buttons
 *   6. Store Page — Layout & Sidebar
 *   7. Store Page — Product Items
 *   8. Product Detail Page
 *   9. Product Specifications & Gallery
 *  10. Markdown Content
 *  11. Cart Page
 *  12. Checkout Page
 *  13. Order Confirmation Page
 *  14. Notice Boxes (info, pre-order, test mode)
 *  15. Badges
 *  16. Footer & Utilities
 *  17. Responsive Breakpoints
 */


/* ==========================================================================
   1. VARIABLES & RESET
   ========================================================================== */

:root {
    /* Brand colors */
    --color-primary: #007622;          /* Forest green — headings, links, accents */
    --color-primary-hover: #005a1a;    /* Darker green — button hover states */
    --color-accent: #8180ff;           /* Periwinkle — link hover text */
    --color-highlight: #fff6c0;        /* Pale yellow — link hover background */

    /* Text colors */
    --color-text: #222;                /* Primary body text */
    --color-text-light: #666;          /* Secondary text, descriptions */
    --color-text-muted: #999;          /* Tertiary text, metadata */

    /* Surfaces & borders */
    --color-border: #ddd;
    --color-bg: #fafaf7;              /* Page background (off-white) */
    --color-bg-light: #f2f2ef;        /* Card/sidebar backgrounds */
    --color-white: #fff;

    /* Item dividers — translucent green, subtler than a solid line */
    --color-divider: rgba(0, 118, 34, 0.12);

    /* Typography — Museo Sans from Typekit */
    --font-body: "museo-sans-1", "museo-sans-2", "Helvetica Neue", Arial, Helvetica, sans-serif;
    --font-weight-light: 300;
    --font-weight-bold: 700;
    --font-weight-black: 900;
}

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

body {
    font-family: var(--font-body);
    font-weight: var(--font-weight-light);
    font-size: 18px;
    line-height: 1.6;
    color: var(--color-text);
    background: var(--color-bg);
}

img {
    max-width: 100%;
    height: auto;
}


/* ==========================================================================
   2. TYPOGRAPHY
   ========================================================================== */

h1, h2, h3 {
    font-family: var(--font-body);
    color: var(--color-primary);
}

h1 {
    font-weight: var(--font-weight-black);
    font-size: 1.75rem;
    margin-bottom: 1rem;
}

h2 {
    font-weight: var(--font-weight-black);
    font-size: 1.4rem;
    margin-bottom: 0.75rem;
}

h3 {
    font-weight: var(--font-weight-bold);
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Links: green, turning periwinkle on yellow highlight on hover */
a {
    color: var(--color-primary);
    text-decoration: none;
    transition: color 0.15s, background-color 0.15s;
}

a:hover {
    color: var(--color-accent);
    background-color: var(--color-highlight);
    text-decoration: none;
}

/* Paragraph spacing for body copy areas */
p + p {
    margin-top: 0.75em;
}


/* ==========================================================================
   3. LAYOUT CONTAINERS
   ========================================================================== */

.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Narrower container for cart, checkout, home page */
.container-narrow {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

main {
    padding: 2rem 0;
    min-height: calc(100vh - 200px);
}

.page-title {
    margin-bottom: 1rem;
}


/* ==========================================================================
   4. SITE HEADER & NAVIGATION
   Dark gray bar, sticky at top. White text, no hover highlight.
   ========================================================================== */

.site-header {
    background: #333;
    color: var(--color-white);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.site-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.site-header h1 {
    color: var(--color-white);
    font-weight: var(--font-weight-black);
    font-size: 1.25rem;
    margin: 0;
}

.site-header a {
    color: var(--color-white);
    text-decoration: none;
}

.site-header a:hover {
    color: var(--color-white);
    background: none;
    opacity: 0.85;
}

/* Nav links in header */
.nav-links {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.nav-links a {
    font-weight: var(--font-weight-light);
    font-size: 0.95rem;
    color: #f2f2f2;
    letter-spacing: 0.5px;
    transition: opacity 0.2s;
}

.nav-links a:hover {
    opacity: 0.85;
    background: none;
    color: var(--color-white);
}

/* Cart link in header — pill shape with count badge */
.cart-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.15);
    padding: 0.4rem 0.75rem;
    border-radius: 6px;
}

.cart-count {
    background: var(--color-white);
    color: #333;
    padding: 0.1rem 0.4rem;
    border-radius: 10px;
    font-size: 0.8rem;
    font-weight: var(--font-weight-bold);
}


/* ==========================================================================
   5. BUTTONS
   Uppercase, bold, small text. Green primary, gray secondary.
   ========================================================================== */

.btn {
    display: inline-block;
    font-family: var(--font-body);
    font-weight: var(--font-weight-bold);
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 0.75rem 1.5rem;
    border-radius: 4px;
    border: none;
    cursor: pointer;
    font-size: 0.85rem;
    text-decoration: none;
    text-align: center;
    transition: background 0.2s, transform 0.2s, box-shadow 0.2s;
}

.btn:hover {
    transform: translateY(-1px);
    text-decoration: none;
    background-color: var(--color-primary-hover);
    color: var(--color-white);
}

.btn-primary {
    background: var(--color-primary);
    color: var(--color-white);
}

.btn-primary:hover {
    background: var(--color-primary-hover);
    box-shadow: 0 4px 12px rgba(0, 118, 34, 0.3);
}

.btn-secondary {
    background: var(--color-bg-light);
    color: var(--color-text);
}

.btn-secondary:hover {
    background: #e0dfdc;
    color: var(--color-text);
}

.btn-link {
    background: none;
    color: var(--color-primary);
    padding: 0.75rem 0;
}

.btn-link:hover {
    background: var(--color-highlight);
    color: var(--color-accent);
    text-decoration: none;
    transform: none;
}

/* "Add to Cart" button — used in store items and product detail */
.btn-add-cart {
    width: 100%;
    background: var(--color-primary);
    color: var(--color-white);
    padding: 0.75rem;
    border-radius: 4px;
    font-family: var(--font-body);
    font-weight: var(--font-weight-bold);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.8rem;
    border: none;
    cursor: pointer;
    transition: background 0.2s, transform 0.2s;
}

.btn-add-cart:hover {
    background: var(--color-primary-hover);
    transform: translateY(-1px);
}


/* ==========================================================================
   6. STORE PAGE — LAYOUT & SIDEBAR
   Main content column with a right sidebar for category navigation.
   Sidebar collapses to a hamburger on narrow screens.
   ========================================================================== */

/* Two-column grid: content + sidebar */
.store-layout {
    display: grid;
    grid-template-columns: 1fr 220px;
    gap: 3rem;
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.store-main {
    min-width: 0; /* Prevent grid blowout from long content */
}

/* --- Sidebar --- */

.store-sidebar {
    position: relative;
}

/* Vertical line separating sidebar from content */
.store-sidebar::before {
    content: "";
    position: absolute;
    left: -1.5rem;
    top: 0;
    bottom: 0;
    width: 1px;
    background: var(--color-border);
}

.sidebar-inner {
    position: sticky;
    top: 80px; /* Below the sticky header */
}

.sidebar-title {
    font-weight: var(--font-weight-black);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--color-text-muted);
    margin-bottom: 0.75rem;
}

.sidebar-nav {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-nav li {
    margin-bottom: 0.15rem;
}

.sidebar-nav a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.4rem 0.6rem;
    border-radius: 4px;
    font-size: 0.9rem;
    font-weight: var(--font-weight-light);
    color: var(--color-text);
    text-decoration: none;
    transition: background 0.15s;
}

.sidebar-nav a:hover {
    background: var(--color-highlight);
    color: var(--color-text);
}

.sidebar-nav a.active {
    background: var(--color-bg-light);
    font-weight: var(--font-weight-bold);
    color: var(--color-primary);
}

.sidebar-nav .count {
    font-size: 0.8rem;
    color: var(--color-text-muted);
}

.sidebar-cart {
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--color-border);
}

.sidebar-cart a {
    display: block;
    padding: 0.5rem 0.6rem;
    font-size: 0.9rem;
    font-weight: var(--font-weight-bold);
    color: var(--color-primary);
    text-decoration: none;
}

.sidebar-cart a:hover {
    background: var(--color-highlight);
}

/* Mobile: hamburger button to open sidebar */
.mobile-cat-toggle {
    display: none;
    background: none;
    border: 1px solid var(--color-border);
    border-radius: 4px;
    padding: 0.5rem 1rem;
    font-family: var(--font-body);
    font-size: 0.85rem;
    font-weight: var(--font-weight-bold);
    color: var(--color-text);
    cursor: pointer;
    margin-bottom: 1rem;
}

.mobile-cat-toggle:hover {
    background: var(--color-bg-light);
}

/* Overlay behind mobile sidebar */
.nav-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 98;
}

.nav-overlay.active {
    display: block;
}

/* Category section headings on store page */
.category-section {
    margin-bottom: 2.5rem;
    scroll-margin-top: 80px; /* Offset for sticky header when jumping to section */
}

.category-section h2 {
    font-weight: var(--font-weight-black);
    font-size: 1.1rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--color-primary);
    margin-bottom: 1.25rem;
    padding-bottom: 0.4rem;
    border-bottom: 2px solid var(--color-primary);
}


/* ==========================================================================
   7. STORE PAGE — PRODUCT ITEMS
   Single-column list with floated cover images and text wrap.
   Subtle green-tinted dividers between items.
   ========================================================================== */

.product-item {
    padding: 1.25rem 0;
    border-bottom: 1px solid var(--color-divider);
    overflow: hidden; /* Clear floats */
}

.product-item:last-child {
    border-bottom: none;
}

/* Cover image: floated right, below the title */
.product-item-image {
    float: right;
    margin: 0 0 0.5rem 1.25rem;
}

/* Portrait covers (books): constrain height */
.product-item-image.is-portrait img {
    max-height: 180px;
    width: auto;
}

/* Landscape images (posters, etc.): constrain width */
.product-item-image.is-landscape img {
    max-width: 200px;
    height: auto;
}

.product-item-image img {
    display: block;
    border-radius: 3px;
    background: var(--color-bg-light);
}

.product-item-image a {
    display: block;
}

.product-item-image a:hover {
    background: none;
    opacity: 0.9;
}

/* Item header: title + subtitle */
.product-item-header {
    margin-bottom: 0.3rem;
}

.product-item-header a {
    color: inherit;
    text-decoration: none;
}

.product-item-header a:hover {
    color: var(--color-accent);
    background: var(--color-highlight);
}

.product-item-name {
    font-size: 1.15rem;
    font-weight: var(--font-weight-black);
    line-height: 1.25;
    color: var(--color-text);
    margin: 0;
}

.product-item-subtitle {
    font-size: 0.9rem;
    color: var(--color-text-light);
    font-style: italic;
    margin: 0.1rem 0 0 0;
}

.product-item-author {
    font-size: 0.85rem;
    color: var(--color-text-muted);
    margin: 0.2rem 0 0.4rem 0;
}

/* Description text (rendered markdown) */
.product-item-desc {
    font-size: 0.92rem;
    line-height: 1.5;
    color: var(--color-text-light);
    margin-bottom: 0.5rem;
}

.product-item-desc p {
    margin-bottom: 0.4em;
}

.product-item-desc p:last-child {
    margin-bottom: 0;
}

.product-item-desc a {
    color: var(--color-primary);
}

.product-item-desc a:hover {
    color: var(--color-accent);
    background: var(--color-highlight);
}

/* Price + Add to Cart on same row */
.product-item-footer {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.product-item-price {
    font-size: 1.1rem;
    font-weight: var(--font-weight-black);
    color: var(--color-primary);
}

/* Smaller Add to Cart in store list context */
.product-item-footer .btn-add-cart {
    width: auto;
    padding: 0.35rem 0.7rem;
    font-size: 0.7rem;
}

/* Small inline badges (Bundle, Digital, Pre-order) */
.product-item-badges {
    display: flex;
    gap: 0.3rem;
    margin-bottom: 0.3rem;
    flex-wrap: wrap;
}

.product-item-badge {
    font-size: 0.6rem;
    padding: 0.1rem 0.35rem;
    border-radius: 3px;
    font-weight: var(--font-weight-bold);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: #e8f5e9;
    color: var(--color-primary);
}

.product-item-badge.badge-bundle {
    background: #fff3cd;
    color: #856404;
}

.product-item-badge.badge-digital {
    background: #e3f2fd;
    color: #0c5460;
}

.product-item-badge.badge-preorder {
    background: var(--color-highlight);
    color: #856404;
}


/* ==========================================================================
   8. PRODUCT DETAIL PAGE
   Two-column: image left, info right. Collapses to single column on mobile.
   ========================================================================== */

.product-detail {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    margin-top: 1rem;
}

/* Main product image */
.product-images .main-image {
    width: 100%;
    aspect-ratio: 1;
    object-fit: contain;
    background: var(--color-bg-light);
    border-radius: 4px;
    padding: 1rem;
    margin-bottom: 1rem;
}

/* Lightbox link wrapping main image */
.main-image-link {
    cursor: zoom-in;
    display: block;
}

.main-image-link:hover img {
    opacity: 0.92;
    transition: opacity 0.2s;
}

/* Thumbnail strip below main image */
.image-gallery {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.gallery-thumb {
    width: 70px;
    height: 70px;
    object-fit: cover;
    border-radius: 4px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: border-color 0.2s;
}

.gallery-thumb:hover,
.gallery-thumb.active {
    border-color: var(--color-primary);
}

/* Product info column */
.product-detail .product-info h1 {
    font-size: 1.75rem;
    color: var(--color-text);
}

.product-detail .product-price {
    font-size: 1.75rem;
    margin: 1rem 0;
}

.product-price {
    font-size: 1.1rem;
    font-weight: var(--font-weight-black);
    color: var(--color-primary);
    margin-bottom: 0.35rem;
}

.product-subtitle {
    font-size: 0.8rem;
    color: var(--color-text-light);
    margin: 0 0 0.2rem 0;
    font-style: italic;
    line-height: 1.3;
}

.product-author {
    font-size: 0.8rem;
    color: var(--color-text-light);
    margin: 0 0 0.4rem 0;
    line-height: 1.3;
}

.product-description {
    color: var(--color-text-light);
    line-height: 1.6;
    margin-bottom: 2rem;
}

/* Add to cart form (quantity + button) */
.add-form {
    display: flex;
    gap: 1rem;
    align-items: center;
    margin-bottom: 1.5rem;
}

.quantity-input {
    width: 70px;
    padding: 0.75rem;
    border: 1px solid var(--color-border);
    border-radius: 4px;
    font-size: 1rem;
    text-align: center;
    font-family: var(--font-body);
}

.quantity-input:focus {
    outline: none;
    border-color: var(--color-primary);
}

/* Signing & inscription options on product page */
.signing-note {
    padding: 0.75rem 1rem;
    border-radius: 4px;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.signing-included {
    background: #e8f5e9;
    border-left: 3px solid var(--color-primary);
    border-radius: 0 4px 4px 0;
    color: var(--color-primary-hover);
}

.signing-option {
    margin-bottom: 0.75rem;
}

.signing-checkbox {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.95rem;
    cursor: pointer;
    font-weight: var(--font-weight-light);
}

.signing-checkbox input {
    width: auto;
}

.signing-price {
    font-weight: var(--font-weight-bold);
    color: var(--color-primary);
}

.inscription-field {
    margin-bottom: 0.75rem;
}

.inscription-field label {
    display: block;
    font-weight: var(--font-weight-bold);
    font-size: 0.85rem;
    margin-bottom: 0.25rem;
}

.inscription-field .optional-label {
    font-weight: var(--font-weight-light);
    color: var(--color-text-muted);
}

.inscription-field textarea {
    width: 100%;
    padding: 0.5rem 0.6rem;
    border: 1px solid var(--color-border);
    border-radius: 4px;
    font-size: 0.9rem;
    font-family: var(--font-body);
    resize: vertical;
}

.inscription-field textarea:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(0, 118, 34, 0.1);
}

/* Add to cart form — block layout version (used when signing options present) */
.add-form-block {
    margin-bottom: 1.5rem;
}

.add-form-row {
    display: flex;
    gap: 1rem;
    align-items: center;
}

/* Bundle contents box (on bundle product pages) */
.bundle-contents {
    background: var(--color-bg-light);
    border: 2px solid var(--color-primary);
    border-radius: 4px;
    padding: 1.25rem;
    margin: 1.5rem 0;
}

.bundle-contents h3 {
    margin: 0 0 1rem 0;
    font-size: 1rem;
    color: var(--color-text);
}

.bundle-items-list {
    list-style: none;
    padding: 0;
    margin: 0 0 1rem 0;
}

.bundle-item {
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--color-border);
}

.bundle-item:last-child {
    border-bottom: none;
}

.bundle-qty {
    font-weight: var(--font-weight-black);
    color: var(--color-primary);
    margin-right: 0.5rem;
}

.bundle-subtitle {
    color: var(--color-text-light);
    font-size: 0.875rem;
    font-style: italic;
}

.bundle-savings {
    background: var(--color-primary);
    color: var(--color-white);
    padding: 0.75rem;
    border-radius: 4px;
    margin: 1rem 0 0 0;
    text-align: center;
    font-weight: var(--font-weight-bold);
}

/* Related link */
.related-link {
    margin-top: 1rem;
}

.related-link a {
    font-weight: var(--font-weight-bold);
    font-size: 0.9rem;
}


/* ==========================================================================
   9. PRODUCT SPECIFICATIONS & GALLERY
   Sections below the main product info on detail pages.
   ========================================================================== */

.product-details-section {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 2px solid var(--color-primary);
}

.detail-block {
    margin-bottom: 2rem;
}

.detail-block h2 {
    font-weight: var(--font-weight-black);
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--color-border);
    margin-bottom: 1rem;
}

.long-description {
    line-height: 1.7;
    color: var(--color-text);
}

/* Specification key-value pairs */
.specs-box {
    margin: 0;
}

.spec-row {
    display: flex;
    padding: 0.6rem 0;
    border-bottom: 1px solid var(--color-bg-light);
}

.spec-row:last-child {
    border-bottom: none;
}

.spec-row dt {
    flex: 0 0 180px;
    font-weight: var(--font-weight-bold);
    color: var(--color-text-light);
}

.spec-row dd {
    flex: 1;
    color: var(--color-text);
}

/* Gallery grid (additional images with labels/captions) */
.product-gallery-section {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 2px solid var(--color-primary);
}

.product-gallery-section h2 {
    font-weight: var(--font-weight-black);
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--color-border);
    margin-bottom: 1.5rem;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1.5rem;
}

.gallery-item {
    background: var(--color-white);
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

.gallery-item a {
    display: block;
    cursor: zoom-in;
}

.gallery-item a:hover {
    background: none;
}

.gallery-item a:hover img {
    opacity: 0.88;
    transition: opacity 0.2s;
}

.gallery-item img {
    width: 100%;
    aspect-ratio: 4/3;
    object-fit: cover;
}

.gallery-item-info {
    padding: 0.75rem;
}

.gallery-item-label {
    font-weight: var(--font-weight-bold);
    font-size: 0.9rem;
    color: var(--color-text);
    margin-bottom: 0.25rem;
}

.gallery-item-caption {
    font-size: 0.85rem;
    color: var(--color-text-light);
    line-height: 1.4;
}


/* ==========================================================================
   10. MARKDOWN CONTENT
   Styles for rendered markdown in descriptions and long descriptions.
   ========================================================================== */

.product-description p,
.long-description p {
    margin-bottom: 0.75em;
}

.product-description p:last-child,
.long-description p:last-child {
    margin-bottom: 0;
}

.product-description ul,
.product-description ol,
.long-description ul,
.long-description ol {
    margin: 0.5em 0 0.75em 1.25rem;
}

.product-description li,
.long-description li {
    margin-bottom: 0.25em;
}

.long-description h3 {
    color: var(--color-text);
    margin-top: 1.5em;
}

.long-description blockquote {
    border-left: 3px solid var(--color-border);
    margin: 0.75em 0;
    padding: 0.5em 1em;
    color: var(--color-text-light);
}


/* ==========================================================================
   11. CART PAGE
   Compact item rows in a narrow container.
   ========================================================================== */

/* Cart item row */
.cart-item-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--color-divider);
}

.cart-item-row:last-child {
    border-bottom: none;
}

.cart-item-thumb {
    width: 55px;
    height: auto;
    border-radius: 3px;
    flex-shrink: 0;
}

.cart-item-details {
    flex: 1;
    min-width: 0;
}

.cart-item-name {
    font-weight: var(--font-weight-bold);
    font-size: 0.95rem;
}

.cart-item-name a {
    color: inherit;
    text-decoration: none;
}

.cart-item-name a:hover {
    color: var(--color-accent);
    background: var(--color-highlight);
}

.cart-item-unit-price {
    font-size: 0.85rem;
    color: var(--color-text-muted);
}

/* Quantity update form (inline) */
.cart-qty-form {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.cart-qty-input {
    width: 50px;
    padding: 0.3rem;
    text-align: center;
    border: 1px solid var(--color-border);
    border-radius: 3px;
    font-size: 0.85rem;
    font-family: var(--font-body);
}

.cart-qty-update {
    background: var(--color-bg-light);
    border: none;
    padding: 0.3rem 0.5rem;
    border-radius: 3px;
    font-size: 0.75rem;
    cursor: pointer;
    font-family: var(--font-body);
}

.cart-qty-update:hover {
    background: #e0dfdc;
}

.cart-item-line-total {
    font-weight: var(--font-weight-bold);
    min-width: 60px;
    text-align: right;
}

.cart-item-remove {
    color: #c0392b;
    font-size: 0.8rem;
    text-decoration: none;
}

.cart-item-remove:hover {
    background: none;
}

.cart-signed-badge {
    display: inline-block;
    font-size: 0.7rem;
    padding: 0.1rem 0.3rem;
    border-radius: 3px;
    background: #e8f5e9;
    color: var(--color-primary);
    font-weight: var(--font-weight-bold);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-left: 0.3rem;
}

.cart-inscription {
    font-size: 0.8rem;
    color: var(--color-text-muted);
    font-style: italic;
    margin-top: 0.15rem;
}

/* Cart totals area */
.cart-totals-bar {
    margin-top: 1.25rem;
    padding-top: 0.75rem;
    border-top: 2px solid var(--color-primary);
}

.cart-totals-note {
    color: var(--color-text-light);
    font-size: 0.9rem;
    margin-bottom: 0.3rem;
}

.cart-totals-line {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: var(--font-weight-black);
    font-size: 1.1rem;
}

.cart-actions-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1.25rem;
    gap: 1rem;
}

.cart-continue-link {
    color: var(--color-primary);
    font-size: 0.9rem;
}


/* ==========================================================================
   12. CHECKOUT PAGE
   Compact order summary, then shipping address form, then payment button.
   ========================================================================== */

/* Checkout item row (more compact than cart) */
.checkout-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--color-divider);
}

.checkout-item:last-child {
    border-bottom: none;
}

.checkout-item img {
    width: 45px;
    height: auto;
    border-radius: 3px;
    flex-shrink: 0;
}

.checkout-item-info {
    flex: 1;
    min-width: 0;
    font-size: 0.9rem;
}

.checkout-item-qty {
    color: var(--color-text-muted);
    font-size: 0.85rem;
}

.checkout-item-price {
    font-weight: var(--font-weight-bold);
    font-size: 0.9rem;
}

/* Checkout totals */
.checkout-totals {
    margin-top: 0.75rem;
}

.checkout-totals-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
    padding: 0.25rem 0;
}

.checkout-totals-row.is-total {
    font-weight: var(--font-weight-black);
    font-size: 1.05rem;
    padding: 0.5rem 0 0;
    margin-top: 0.25rem;
    border-top: 2px solid var(--color-text);
}

.checkout-totals-pending {
    color: var(--color-text-muted);
    font-style: italic;
}

/* Promo code input (compact, not full-width) */
.checkout-promo {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    margin-top: 0.5rem;
    max-width: 260px;
}

.checkout-promo input {
    width: 150px;
    padding: 0.3rem 0.5rem;
    border: 1px solid var(--color-border);
    border-radius: 3px;
    font-size: 0.85rem;
    font-family: var(--font-body);
}

.checkout-promo button {
    padding: 0.3rem 0.6rem;
    background: var(--color-text-light);
    color: var(--color-white);
    border: none;
    border-radius: 3px;
    font-size: 0.8rem;
    cursor: pointer;
    font-family: var(--font-body);
}

.checkout-promo button:hover {
    background: var(--color-text);
}

/* Shipping address form */
.shipping-section {
    margin-top: 1.5rem;
    padding-top: 1.25rem;
    border-top: 2px solid var(--color-primary);
}

.shipping-section h2 {
    font-size: 1.1rem;
    margin-bottom: 1rem;
}

.shipping-fields {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.shipping-field label {
    display: block;
    font-weight: var(--font-weight-bold);
    font-size: 0.85rem;
    margin-bottom: 0.25rem;
}

.shipping-field label .optional {
    font-weight: var(--font-weight-light);
    color: var(--color-text-muted);
}

.shipping-field input,
.shipping-field select {
    width: 100%;
    padding: 0.5rem 0.6rem;
    border: 1px solid var(--color-border);
    border-radius: 4px;
    font-size: 0.95rem;
    font-family: var(--font-body);
    background: var(--color-white);
}

.shipping-field input:focus,
.shipping-field select:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(0, 118, 34, 0.1);
}

/* City / State / ZIP on one row */
.shipping-city-state-zip {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 0.75rem;
}

/* Promo code messages */
.promo-message {
    margin-top: 0.5rem;
    font-size: 0.875rem;
}

.promo-message.success {
    color: var(--color-primary);
}

.promo-message.error {
    color: #dc3545;
}

/* Discount row in totals */
.discount-row {
    color: var(--color-primary);
    font-weight: var(--font-weight-bold);
}

.discount-amount {
    color: var(--color-primary);
}

/* Calculation message (shown after address auto-calculate) */
.calculation-message {
    margin-top: 1rem;
    font-size: 0.875rem;
}

.calculation-message.success {
    color: var(--color-primary);
}

.calculation-message.error {
    color: #dc3545;
}

/* Payment button area */
.checkout-pay-section {
    margin-top: 1.25rem;
}

.checkout-pay-btn {
    width: 100%;
    padding: 0.75rem;
    font-size: 0.95rem;
}

.checkout-digital-note {
    font-size: 0.85rem;
    color: var(--color-text-muted);
    margin-top: 0.75rem;
}

.checkout-secure-note {
    text-align: center;
    font-size: 0.8rem;
    color: var(--color-text-muted);
    margin-top: 0.4rem;
}


/* ==========================================================================
   13. ORDER CONFIRMATION PAGE
   Centered container with success icon, order summary, and next steps.
   ========================================================================== */

.confirmation-container {
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
}

.success-icon {
    width: 80px;
    height: 80px;
    background: var(--color-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
}

.success-icon svg {
    width: 40px;
    height: 40px;
    fill: var(--color-white);
}

.confirmation-container h1 {
    color: var(--color-primary);
    margin-bottom: 0.5rem;
}

.order-number {
    font-size: 1.25rem;
    color: var(--color-text-light);
    margin-bottom: 2rem;
}

.confirmation-box {
    background: var(--color-white);
    border-radius: 4px;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    text-align: left;
    margin-bottom: 2rem;
}

.confirmation-box h2 {
    margin: 0 0 1rem;
    font-size: 1.1rem;
}

.info-row {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--color-bg-light);
}

.info-row:last-of-type {
    border-bottom: none;
}

.info-row.total {
    font-weight: var(--font-weight-black);
    font-size: 1.1rem;
    padding-top: 1rem;
    margin-top: 0.5rem;
    border-top: 2px solid var(--color-text);
    border-bottom: none;
}


/* ==========================================================================
   14. NOTICE BOXES
   Colored left-border callouts for various states.
   ========================================================================== */

/* Digital download note (green) */
.digital-note {
    background: #e8f5e9;
    border-left: 3px solid var(--color-primary);
    border-radius: 0 4px 4px 0;
    padding: 1rem;
    font-size: 0.9rem;
    color: var(--color-primary-hover);
}

/* Bundle upgrade notice */
.bundle-upgrade {
    background: var(--color-bg-light);
    border-left: 3px solid var(--color-primary);
    border-radius: 0 4px 4px 0;
    padding: 0.75rem 1rem;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.bundle-upgrade a {
    font-weight: var(--font-weight-bold);
}

/* Pre-order notice (yellow) */
.preorder-notice {
    background: var(--color-highlight);
    border-left: 3px solid #b8860b;
    border-radius: 0 4px 4px 0;
    padding: 1rem;
    font-size: 0.9rem;
    font-weight: var(--font-weight-bold);
    color: #856404;
    margin-bottom: 1rem;
}

/* Next steps (order confirmation) */
.next-steps {
    background: #e8f5e9;
    border-left: 3px solid var(--color-primary);
    border-radius: 0 4px 4px 0;
    padding: 1.5rem;
    text-align: left;
    margin-bottom: 2rem;
}

.next-steps h3 {
    margin: 0 0 1rem;
    color: var(--color-primary);
}

.next-steps ul {
    margin: 0;
    padding-left: 1.25rem;
}

.next-steps li {
    margin: 0.5rem 0;
    color: var(--color-text);
}

/* Processing/pending notice (yellow warning) */
.processing-notice {
    background: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 4px;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.processing-notice h3 {
    margin: 0 0 0.5rem;
    color: #856404;
}

/* Test mode notice */
.test-mode-notice {
    background: #fff3cd;
    border: 1px solid #ffc107;
    color: #856404;
    padding: 1rem;
    border-radius: 4px;
    margin-top: 0.75rem;
    font-size: 0.875rem;
}

.test-mode-notice code {
    background: rgba(0, 0, 0, 0.1);
    padding: 0.1rem 0.3rem;
    border-radius: 3px;
}


/* ==========================================================================
   15. BADGES
   Small colored pills for product type and category.
   ========================================================================== */

.product-badges {
    display: flex;
    gap: 0.35rem;
    margin-bottom: 0.35rem;
    flex-wrap: wrap;
}

.category-badge, .type-badge {
    font-size: 0.6rem;
    padding: 0.15rem 0.4rem;
    border-radius: 3px;
    font-weight: var(--font-weight-bold);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.category-badge {
    background: #e8f5e9;
    color: var(--color-primary);
}

.type-badge {
    background: #f0f0f0;
    color: #666;
}

.type-badge.type-bundle {
    background: #fff3cd;
    color: #856404;
}

.type-badge.type-digital {
    background: #e3f2fd;
    color: #0c5460;
}


/* ==========================================================================
   16. FOOTER & UTILITIES
   ========================================================================== */

.site-footer {
    background: var(--color-bg-light);
    padding: 2rem 0;
    margin-top: 3rem;
    text-align: center;
    color: var(--color-text-muted);
    font-size: 0.85rem;
}

.fine-print {
    max-width: 700px;
    margin: 0 auto;
    padding: 1.5rem;
    font-size: 0.8rem;
    color: var(--color-text-muted);
    text-align: center;
    line-height: 1.5;
}

.back-link {
    display: inline-block;
    margin-bottom: 1rem;
    color: var(--color-primary);
    font-weight: var(--font-weight-bold);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.8rem;
}

.back-link:hover {
    color: var(--color-accent);
    background: var(--color-highlight);
}

/* Empty states */
.empty-store,
.cart-empty {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--color-text-light);
}

.empty-store p,
.cart-empty p {
    font-size: 1.25rem;
    margin-bottom: 1rem;
}

/* Privacy policy page */
.privacy-policy {
    padding: 1rem 1.5rem 3rem;
}

.privacy-policy h1 {
    color: var(--color-text);
    margin-bottom: 0.5rem;
}

.privacy-policy h2 {
    color: var(--color-primary);
    font-size: 1.2rem;
    margin-top: 2.5rem;
    margin-bottom: 0.4rem;
    padding-bottom: 0.25rem;
    border-bottom: 1px solid var(--color-border);
}

.privacy-policy h3 {
    font-size: 1rem;
    margin-top: 1.5rem;
    margin-bottom: 0.25rem;
    color: var(--color-text);
    text-transform: none;
    letter-spacing: 0;
}

.privacy-policy p,
.privacy-policy li {
    line-height: 1.6;
}

.privacy-policy ul {
    margin: 0.5rem 0 1rem 1.5rem;
}

.privacy-policy li {
    margin-bottom: 0.4rem;
}

.privacy-effective {
    color: var(--color-text-muted);
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
}

/* Home page */
.home-logo {
    display: block;
    width: 100px;
    height: auto;
    margin-bottom: 1.5rem;
}

.home-heading {
    font-weight: var(--font-weight-black);
    font-size: 1.25rem;
    color: var(--color-text);
    margin-bottom: 1rem;
    text-transform: lowercase;
    letter-spacing: 0.5px;
}

.home-note {
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--color-border);
    font-size: 0.85rem;
    color: var(--color-text-muted);
}

/* Screen-reader-only */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}


/* ==========================================================================
   17. RESPONSIVE BREAKPOINTS
   ========================================================================== */

/* Tablet: sidebar collapses, checkout goes single-column */
@media (max-width: 800px) {
    .store-layout {
        display: block;
    }

    .store-sidebar {
        display: none;
    }

    .store-sidebar::before {
        display: none;
    }

    /* Mobile sidebar slides in from right */
    .store-sidebar.mobile-open {
        display: block;
        position: fixed;
        top: 0;
        right: 0;
        width: 260px;
        height: 100vh;
        background: var(--color-white);
        z-index: 99;
        padding: 1.5rem;
        box-shadow: -4px 0 12px rgba(0, 0, 0, 0.15);
        overflow-y: auto;
    }

    .mobile-cat-toggle {
        display: inline-block;
    }

    /* Smaller product images on tablets */
    .product-item-image.is-portrait img {
        max-height: 140px;
    }

    .product-item-image.is-landscape img {
        max-width: 150px;
    }

    .shipping-city-state-zip {
        grid-template-columns: 1fr 1fr;
    }
}

/* Mobile: single column everywhere */
@media (max-width: 768px) {
    .product-detail {
        grid-template-columns: 1fr;
    }

    .site-header h1 {
        font-size: 1rem;
    }

    .nav-links {
        gap: 1rem;
    }

    .nav-links a {
        font-size: 0.85rem;
    }

    .spec-row {
        flex-direction: column;
    }

    .spec-row dt {
        flex: none;
        margin-bottom: 0.2rem;
    }

    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    }
}

/* Small mobile: images stop floating, stack above text */
@media (max-width: 500px) {
    .product-item-image {
        float: none;
        margin: 0 0 0.75rem 0;
        text-align: center;
    }

    .product-item-image.is-portrait img {
        max-height: 200px;
    }

    .product-item-image.is-landscape img {
        max-width: 100%;
    }

    .shipping-city-state-zip {
        grid-template-columns: 1fr;
    }
}
