/* CSS Variables - Steel Blue Design System */
:root {
    --color-navy: #0f2744;
    --color-navy-dark: #091a2e;
    --color-navy-mid: #1a3a5c;
    --color-charcoal: #2c3e50;
    --color-off-white: #f8fafc;
    --color-cream: #fefefe;
    --color-teal: #4682b4;
    --color-teal-dark: #3a6d99;
    --color-teal-light: #e6eff5;
    --color-accent: #5a9bd4;
    --color-warm-grey: #64748b;
    --color-success-green: #10b981;
    --color-white: #ffffff;
    --color-light-grey: #e2e8f0;
    --color-dark-text: #0f172a;
    --color-mid-text: #475569;
    --color-price: #059669;

    --shadow-sm: 0 1px 3px rgba(15, 39, 68, 0.08);
    --shadow-md: 0 4px 6px -1px rgba(15, 39, 68, 0.12), 0 2px 4px -1px rgba(15, 39, 68, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(15, 39, 68, 0.15), 0 4px 6px -2px rgba(15, 39, 68, 0.08);
    --shadow-xl: 0 20px 25px -5px rgba(15, 39, 68, 0.18), 0 10px 10px -5px rgba(15, 39, 68, 0.08);

    --space-xs: 8px;
    --space-s: 16px;
    --space-m: 24px;
    --space-l: 32px;
    --space-xl: 48px;
    --space-xxl: 64px;

    --font-heading: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

    --container-max-width: 1400px;
    --container-padding: 24px;
}

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

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    font-size: 1rem;
    line-height: 1.6;
    color: var(--color-dark-text);
    background-color: var(--color-cream);
}

/* Header / Hero */
.hero {
    background: linear-gradient(160deg, var(--color-navy) 0%, var(--color-navy-dark) 60%, #061018 100%);
    color: var(--color-white);
    text-align: center;
    padding: var(--space-xxl) var(--space-m);
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(ellipse at 20% 80%, rgba(70, 130, 180, 0.2) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 20%, rgba(70, 130, 180, 0.15) 0%, transparent 50%);
    opacity: 1;
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 900px;
    margin: 0 auto;
}

.hero h1 {
    font-family: var(--font-heading);
    font-size: 2.75rem;
    font-weight: 700;
    margin-bottom: var(--space-s);
    text-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
}

.hero p {
    font-size: 1.25rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: var(--space-m);
}

.hero .contact-info {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-s);
    justify-content: center;
    margin-top: var(--space-m);
}

.hero .contact-btn {
    display: inline-flex;
    align-items: center;
    gap: var(--space-xs);
    background: linear-gradient(135deg, var(--color-teal) 0%, var(--color-teal-dark) 100%);
    color: var(--color-white);
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    box-shadow: 0 4px 12px rgba(70, 130, 180, 0.35);
    transition: transform 200ms ease, box-shadow 200ms ease;
}

.hero .contact-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(70, 130, 180, 0.5);
}

/* Main Container */
main {
    max-width: var(--container-max-width);
    margin: 0 auto;
    padding: var(--space-l) var(--container-padding);
}

/* Collapsible Category Sections */
.category-section {
    margin-bottom: var(--space-m);
}

.category-section details {
    background: var(--color-white);
    border-radius: 12px;
    box-shadow: var(--shadow-md);
    overflow: hidden;
    transition: box-shadow 200ms ease;
}

.category-section details[open] {
    box-shadow: var(--shadow-lg);
}

.category-section summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-m);
    background: linear-gradient(135deg, var(--color-navy) 0%, var(--color-navy-mid) 100%);
    color: var(--color-white);
    cursor: pointer;
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 600;
    list-style: none;
    user-select: none;
    transition: background 200ms ease;
}

.category-section summary::-webkit-details-marker {
    display: none;
}

.category-section summary:hover {
    background: linear-gradient(135deg, var(--color-navy-mid) 0%, var(--color-navy) 100%);
}

.category-section summary::after {
    content: '+';
    font-size: 1.75rem;
    font-weight: 400;
    transition: transform 200ms ease;
}

.category-section details[open] summary::after {
    content: '-';
}

.category-section summary .item-count {
    background: var(--color-teal);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.875rem;
    margin-left: var(--space-s);
}

.category-content {
    padding: var(--space-m);
}

/* Grid Layout */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: var(--space-m);
}

/* Item Cards */
.card {
    background: var(--color-white);
    border: 1px solid var(--color-light-grey);
    border-radius: 12px;
    overflow: hidden;
    transition: box-shadow 300ms ease, transform 300ms ease, border-color 300ms ease;
}

.card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px);
    border-color: var(--color-teal-light);
}

.card-image {
    width: 100%;
    height: 200px;
    background-color: var(--color-off-white);
    position: relative;
    overflow: hidden;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 300ms ease;
}

.card:hover .card-image img {
    transform: scale(1.05);
}

.card-image .placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: var(--color-warm-grey);
    font-size: 0.875rem;
}

.card-body {
    padding: var(--space-s);
}

.item-number {
    font-size: 0.75rem;
    color: var(--color-warm-grey);
    margin-bottom: 4px;
    font-weight: 500;
}

.item-name {
    font-family: var(--font-heading);
    font-weight: 600;
    color: var(--color-navy);
    font-size: 1rem;
    margin-bottom: 6px;
    line-height: 1.3;
    min-height: 2.6em;
}

.item-details {
    font-size: 0.875rem;
    color: var(--color-mid-text);
}

.card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-s);
    background-color: var(--color-off-white);
    border-top: 1px solid var(--color-light-grey);
}

.price {
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--color-price);
}

.qty {
    background: linear-gradient(135deg, var(--color-teal) 0%, var(--color-teal-dark) 100%);
    color: var(--color-white);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

.qty.multiple {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
}

.gallery-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: var(--color-teal-dark);
    font-size: 0.8rem;
    font-weight: 500;
    text-decoration: none;
    padding: 4px 8px;
    border-radius: 4px;
    transition: background 200ms ease;
}

.gallery-link:hover {
    background: var(--color-teal-light);
    color: var(--color-teal-dark);
}

/* Clickable item names */
.item-name a {
    color: var(--color-navy);
    text-decoration: none;
    transition: color 200ms ease;
}

.item-name a:hover {
    color: var(--color-teal);
    text-decoration: underline;
}

/* Clickable images */
.card-image {
    cursor: zoom-in;
}

/* Sold Out styling */
.card.sold-out {
    opacity: 0.7;
}
.card.sold-out .card-image::after {
    content: 'SOLD OUT';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(-15deg);
    background: rgba(220, 53, 69, 0.9);
    color: white;
    padding: 8px 24px;
    font-size: 1.2rem;
    font-weight: bold;
    border-radius: 4px;
    z-index: 10;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
}

/* Lightbox Modal */
.lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 9999;
    justify-content: center;
    align-items: center;
    cursor: zoom-out;
}

.lightbox.active {
    display: flex;
}

.lightbox img {
    max-width: 95%;
    max-height: 95%;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: white;
    font-size: 40px;
    font-weight: 300;
    cursor: pointer;
    transition: color 200ms ease;
    z-index: 10000;
}

.lightbox-close:hover {
    color: var(--color-teal);
}

.lightbox-caption {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    color: white;
    font-size: 1rem;
    text-align: center;
    max-width: 80%;
    padding: 12px 24px;
    background: rgba(0, 0, 0, 0.7);
    border-radius: 8px;
}

/* Footer */
footer {
    background: linear-gradient(160deg, var(--color-navy) 0%, var(--color-navy-dark) 100%);
    color: var(--color-off-white);
    padding: var(--space-xl) var(--container-padding);
    text-align: center;
    margin-top: var(--space-xl);
    position: relative;
}

footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(ellipse at 50% 0%, rgba(70, 130, 180, 0.08) 0%, transparent 70%);
    pointer-events: none;
}

footer p {
    position: relative;
    color: var(--color-warm-grey);
    font-size: 0.875rem;
}

footer .footer-contact {
    position: relative;
    margin-bottom: var(--space-m);
}

footer .footer-contact a {
    color: var(--color-white);
    text-decoration: none;
    font-size: 1.125rem;
    font-weight: 500;
}

footer .footer-contact a:hover {
    color: var(--color-teal);
}

/* Expand All / Collapse All Button */
.controls {
    display: flex;
    justify-content: flex-end;
    gap: var(--space-s);
    margin-bottom: var(--space-m);
}

.control-btn {
    display: inline-flex;
    align-items: center;
    gap: var(--space-xs);
    padding: 10px 20px;
    border: 2px solid var(--color-navy);
    background: transparent;
    color: var(--color-navy);
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 200ms ease;
    font-family: var(--font-body);
}

.control-btn:hover {
    background: var(--color-navy);
    color: var(--color-white);
}

/* Responsive */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 2rem;
    }

    .hero p {
        font-size: 1rem;
    }

    .category-section summary {
        font-size: 1.25rem;
        padding: var(--space-s);
    }

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

    .controls {
        flex-direction: column;
    }

    .control-btn {
        width: 100%;
        justify-content: center;
    }
}

/* Print Styles */
@media print {
    .hero {
        padding: var(--space-m);
    }

    .controls {
        display: none;
    }

    .category-section details {
        break-inside: avoid;
    }

    .card {
        break-inside: avoid;
    }

    .floating-cart, .cart-panel {
        display: none !important;
    }
}

/* Cart Styles */
.floating-cart {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--color-teal) 0%, var(--color-teal-dark) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(70, 130, 180, 0.4);
    z-index: 1000;
    transition: transform 200ms ease, box-shadow 200ms ease;
}

.floating-cart:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 25px rgba(70, 130, 180, 0.5);
}

.floating-cart svg {
    width: 28px;
    height: 28px;
    fill: white;
}

.cart-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #e74c3c;
    color: white;
    font-size: 0.75rem;
    font-weight: 700;
    min-width: 22px;
    height: 22px;
    border-radius: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 6px;
}

.cart-badge.hidden {
    display: none;
}

.cart-panel {
    position: fixed;
    top: 0;
    right: -400px;
    width: 400px;
    max-width: 90vw;
    height: 100vh;
    background: var(--color-white);
    box-shadow: -5px 0 30px rgba(0, 0, 0, 0.2);
    z-index: 9998;
    transition: right 300ms ease;
    display: flex;
    flex-direction: column;
}

.cart-panel.active {
    right: 0;
}

.cart-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9997;
    opacity: 0;
    visibility: hidden;
    transition: opacity 300ms ease, visibility 300ms ease;
}

.cart-overlay.active {
    opacity: 1;
    visibility: visible;
}

.cart-header {
    background: linear-gradient(135deg, var(--color-navy) 0%, var(--color-navy-mid) 100%);
    color: white;
    padding: var(--space-m);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cart-header h2 {
    font-size: 1.25rem;
    font-weight: 600;
}

.cart-close {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 4px 8px;
    line-height: 1;
}

.cart-close:hover {
    color: var(--color-teal-light);
}

.cart-items {
    flex: 1;
    overflow-y: auto;
    padding: var(--space-s);
}

.cart-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-s);
    border-bottom: 1px solid var(--color-light-grey);
    gap: var(--space-s);
}

.cart-item-info {
    flex: 1;
}

.cart-item-name {
    font-weight: 600;
    color: var(--color-navy);
    font-size: 0.9rem;
}

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

.cart-item-qty {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 6px;
}

.cart-item-qty label {
    font-size: 0.8rem;
    color: var(--color-mid-text);
}

.cart-item-qty input {
    width: 50px;
    padding: 4px 6px;
    border: 1px solid var(--color-light-grey);
    border-radius: 4px;
    font-size: 0.85rem;
    text-align: center;
}

.cart-item-qty input:focus {
    outline: none;
    border-color: var(--color-teal);
}

.cart-item-avail {
    font-size: 0.75rem;
    color: var(--color-warm-grey);
}

.cart-item-remove {
    background: none;
    border: none;
    color: #e74c3c;
    cursor: pointer;
    font-size: 1.25rem;
    padding: 4px 8px;
    line-height: 1;
    transition: color 200ms ease;
}

.cart-item-remove:hover {
    color: #c0392b;
}

.cart-empty {
    text-align: center;
    padding: var(--space-xl);
    color: var(--color-warm-grey);
}

.cart-footer {
    padding: var(--space-m);
    border-top: 2px solid var(--color-light-grey);
    background: var(--color-off-white);
}

.cart-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-s) 0;
    margin-bottom: var(--space-s);
    border-bottom: 2px solid var(--color-light-grey);
    font-size: 1.1rem;
}

.cart-total-label {
    font-weight: 600;
    color: var(--color-navy);
}

.cart-total-value {
    font-weight: 700;
    color: var(--color-price);
    font-size: 1.25rem;
}

.cart-send-btn {
    width: 100%;
    padding: 14px 24px;
    background: linear-gradient(135deg, var(--color-teal) 0%, var(--color-teal-dark) 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 200ms ease, box-shadow 200ms ease;
}

.cart-send-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(70, 130, 180, 0.4);
}

.cart-send-btn:disabled {
    background: var(--color-warm-grey);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
    opacity: 0.6;
}

.cart-clear-btn {
    width: 100%;
    margin-top: var(--space-xs);
    padding: 10px 24px;
    background: transparent;
    color: var(--color-mid-text);
    border: 1px solid var(--color-light-grey);
    border-radius: 8px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: background 200ms ease, color 200ms ease;
}

.cart-clear-btn:hover {
    background: var(--color-light-grey);
    color: var(--color-dark-text);
}

.cart-form {
    margin-bottom: var(--space-s);
}

.cart-form label {
    display: block;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--color-mid-text);
    margin-bottom: 4px;
}

.cart-form input,
.cart-form textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--color-light-grey);
    border-radius: 6px;
    font-size: 0.95rem;
    font-family: inherit;
    margin-bottom: var(--space-s);
}

.cart-form input:focus,
.cart-form textarea:focus {
    outline: none;
    border-color: var(--color-teal);
}

.cart-form textarea {
    resize: vertical;
    min-height: 60px;
}

.cart-status {
    padding: 10px;
    border-radius: 6px;
    margin-bottom: var(--space-s);
    font-size: 0.9rem;
    display: none;
}

.cart-status.success {
    display: block;
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.cart-status.error {
    display: block;
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Add to cart button */
.add-to-cart {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, var(--color-success-green) 0%, #059669 100%);
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 1.25rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 200ms ease, box-shadow 200ms ease;
    flex-shrink: 0;
}

.add-to-cart:hover {
    transform: scale(1.15);
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.4);
}

.add-to-cart.added {
    background: linear-gradient(135deg, var(--color-teal) 0%, var(--color-teal-dark) 100%);
}

.card.sold-out .add-to-cart {
    display: none;
}

@media (max-width: 768px) {
    .floating-cart {
        bottom: 20px;
        right: 20px;
        width: 54px;
        height: 54px;
    }

    .cart-panel {
        width: 100%;
        right: -100%;
    }
}

/* Downloads page styles */
.downloads-container {
    max-width: 600px;
    margin: 0 auto;
    padding: var(--space-xl) var(--space-m);
}

.downloads-container h1 {
    font-family: var(--font-heading);
    color: var(--color-navy);
    margin-bottom: var(--space-m);
}

.download-list {
    list-style: none;
    padding: 0;
}

.download-list li {
    margin: var(--space-s) 0;
}

.download-list a {
    color: var(--color-teal-dark);
    text-decoration: none;
    padding: var(--space-s) var(--space-m);
    display: block;
    background: var(--color-white);
    border: 1px solid var(--color-light-grey);
    border-radius: 8px;
    transition: all 200ms ease;
}

.download-list a:hover {
    background: var(--color-teal-light);
    border-color: var(--color-teal);
    transform: translateX(4px);
}
