:root {
    /* Color Palette */
    --color-primary: #0a1025;
    /* Deep Blue Background */
    --color-primary-light: #162040;
    /* Slightly lighter blue for cards/sections */
    --color-accent: #bfa1e6;
    /* Light Purple for accents/glows */
    --color-silver: #e0e6ed;
    /* Silver for text/borders */
    --color-white: #ffffff;
    --color-text-main: var(--color-silver);
    --color-text-muted: #a0aab5;

    /* Spacing System (8px grid) */
    --space-1: 8px;
    --space-2: 16px;
    --space-3: 24px;
    --space-4: 32px;
    --space-6: 48px;
    --space-8: 64px;
    --space-12: 96px;

    /* Typography */
    --font-heading: 'Cormorant Garamond', serif;
    --font-body: 'Montserrat', sans-serif;

    --text-xl: 3.5rem;
    --text-lg: 2.5rem;
    --text-md: 1.5rem;
    --text-base: 1rem;
    --text-sm: 0.875rem;

    /* Borders & Effects */
    --border-radius-sm: 4px;
    --border-radius-md: 8px;
    --border-radius-lg: 16px;
    --shadow-soft: 0 4px 20px rgba(0, 0, 0, 0.3);
    --glow-accent: 0 0 15px rgba(191, 161, 230, 0.3);
}

/* Reset & Base */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--color-primary);
    color: var(--color-text-main);
    font-family: var(--font-body);
    line-height: 1.6;
    overflow-x: hidden;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    color: var(--color-white);
    font-weight: 400;
    line-height: 1.2;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s ease;
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    display: block;
}

/* Utilities */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--space-4);
}

.btn {
    display: inline-block;
    padding: var(--space-2) var(--space-4);
    border-radius: 50px;
    font-family: var(--font-body);
    font-weight: 500;
    font-size: var(--text-sm);
    letter-spacing: 1px;
    text-transform: uppercase;
    transition: all 0.3s ease;
    cursor: pointer;
    border: 1px solid transparent;
}

.btn-primary {
    background-color: var(--color-accent);
    color: var(--color-primary);
    box-shadow: var(--glow-accent);
}

.btn-primary:hover {
    background-color: var(--color-white);
    transform: translateY(-2px);
    box-shadow: 0 0 25px rgba(255, 255, 255, 0.4);
}

.btn-secondary {
    background-color: transparent;
    border-color: var(--color-silver);
    color: var(--color-silver);
}

.btn-secondary:hover {
    background-color: var(--color-silver);
    color: var(--color-primary);
}

/* Animations */
.fade-in-up {
    opacity: 0;
    /* Start hidden */
    transform: translateY(20px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.fade-in-up.visible {
    opacity: 1;
    transform: translateY(0);
}

.delay-1 {
    transition-delay: 0.2s;
}

.delay-2 {
    transition-delay: 0.4s;
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    .fade-in-up {
        opacity: 1;
        transform: none;
        transition: none;
    }

    .btn,
    a {
        transition: none;
    }
}

/* Header */
.main-header {
    padding: var(--space-3) 0;
    position: fixed;
    /* Changed from absolute */
    width: 100%;
    top: 0;
    z-index: 10000;
    /* Increased z-index to stay above content */
    transition: background-color 0.3s ease, padding 0.3s ease, box-shadow 0.3s ease;
}

.main-header.scrolled {
    background-color: rgba(10, 16, 37, 0.95);
    /* var(--color-primary) with opacity */
    padding: var(--space-2) 0;
    /* Shrink slightly */
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(10px);
    /* Glassmorphism effect */
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: block;
}

.logo img {
    height: 130px;
    width: auto;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.logo:hover img {
    transform: scale(1.05);
}

.nav-links {
    display: flex;
    gap: var(--space-4);
    align-items: center;
}

.nav-links a {
    font-size: var(--text-sm);
    color: var(--color-silver);
    font-weight: 300;
}

.nav-links a:hover {
    color: var(--color-accent);
}

/* Hero Section */
.hero-section {
    height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    padding-top: var(--space-8);
    background: linear-gradient(rgba(10, 16, 37, 0.5), rgba(10, 16, 37, 0.5)), url('images/hero.png');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    overflow: hidden;
}

.hero-content {
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

.hero-content h1 {
    font-size: var(--text-xl);
    margin-bottom: var(--space-3);
    background: linear-gradient(to right, var(--color-white), var(--color-accent));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.hero-content p {
    font-size: var(--text-md);
    margin-bottom: var(--space-6);
    font-weight: 300;
    color: var(--color-text-muted);
}

.hero-background {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60vw;
    height: 60vw;
    background: radial-gradient(circle, rgba(191, 161, 230, 0.15) 0%, rgba(10, 16, 37, 0) 70%);
    z-index: 1;
    pointer-events: none;
}

/* Section Common */
section {
    padding: var(--space-12) 0;
}

.section-header {
    text-align: center;
    margin-bottom: var(--space-8);
}

.section-header h2 {
    font-size: var(--text-lg);
    margin-bottom: var(--space-2);
    color: var(--color-white);
}

.section-header p {
    color: var(--color-text-muted);
    font-size: var(--text-base);
}

/* Collection Section */
.collection-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: var(--space-4);
}

.collection-card {
    background: transparent;
    border-radius: var(--border-radius-md);
    overflow: hidden;
    text-align: center;
    transition: transform 0.3s ease;
}

.collection-card:hover {
    transform: translateY(-5px);
}

.card-image {
    height: 300px;
    /* Vertical emphasis */
    background-color: var(--color-primary-light);
    margin-bottom: var(--space-3);
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.collection-card:hover .card-image img {
    transform: scale(1.05);
}

.placeholder-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top, rgba(10, 16, 37, 0.6), transparent);
    pointer-events: none;
    transition: opacity 0.5s ease;
    /* Smooth transition */
}

.collection-card:hover .placeholder-overlay {
    opacity: 0;
    /* Fade out overlay on hover */
}

.collection-card h3 {
    font-size: var(--text-md);
    color: var(--color-white);
    letter-spacing: 0.5px;
}

.image-adjust {
    position: absolute;
    top: 40px;
    overflow: initial;
}

/* Features Section */
/* Placeholder for grid items */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--space-4);
}

/* Testimonials */
.testimonials-section {
    background-color: var(--color-primary-light);
}

.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--space-4);
}

/* CTA Section */
.cta-section {
    text-align: center;
    background: linear-gradient(to top, #131a33, var(--color-primary));
}

.cta-content {
    max-width: 600px;
    margin: 0 auto;
}

.cta-content h2 {
    margin-bottom: var(--space-3);
}

.cta-content p {
    margin-bottom: var(--space-6);
    font-size: var(--text-md);
    font-weight: 300;
}

/* Footer */
.main-footer {
    padding: var(--space-6) 0;
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    font-size: var(--text-sm);
    color: var(--color-text-muted);
}

/* Feature Cards */
.feature-card {
    background: rgba(255, 255, 255, 0.03);
    padding: var(--space-6) var(--space-4);
    border-radius: var(--border-radius-lg);
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: transform 0.3s ease, background 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(191, 161, 230, 0.2);
}

.feature-icon {
    font-size: var(--text-lg);
    color: var(--color-accent);
    margin-bottom: var(--space-3);
}

.feature-card h3 {
    margin-bottom: var(--space-2);
    font-size: var(--text-md);
    color: var(--color-white);
}

.feature-card p {
    color: var(--color-text-muted);
    font-size: var(--text-sm);
    line-height: 1.8;
}

/* Testimonial Cards */
.testimonial-card {
    background: var(--color-primary);
    padding: var(--space-6);
    border-radius: var(--border-radius-lg);
    border-left: 2px solid var(--color-accent);
    box-shadow: var(--shadow-soft);
}

.quote {
    font-family: var(--font-heading);
    font-size: var(--text-md);
    font-style: italic;
    color: var(--color-silver);
    margin-bottom: var(--space-4);
}

cite {
    font-style: normal;
    font-size: var(--text-sm);
    color: var(--color-accent);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Page Headers */
.page-header {
    background: radial-gradient(circle at center, #1b264f 0%, var(--color-primary) 70%);
    padding: 160px 0 var(--space-8);
    text-align: center;
}

.page-header h1 {
    font-size: var(--text-xl);
    margin-bottom: var(--space-2);
}

.page-header p {
    color: var(--color-text-muted);
    font-size: var(--text-md);
}

/* Filters */
.filters {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: var(--space-3);
    margin-bottom: var(--space-8);
}

.filter-btn {
    background: transparent;
    border: 1px solid var(--color-silver);
    color: var(--color-silver);
    padding: var(--space-2) var(--space-4);
    border-radius: 50px;
    cursor: pointer;
    font-family: var(--font-body);
    transition: all 0.3s ease;
}

.filter-btn:hover,
.filter-btn.active {
    background: var(--color-accent);
    border-color: var(--color-accent);
    color: var(--color-primary);
}

/* Products Grid */
/* Subfilters */
.subfilters {
    flex-wrap: wrap;
}

.subfilter-btn {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--color-silver);
    padding: 6px 16px;
    /* Smaller than main filter */
    border-radius: 20px;
    cursor: pointer;
    font-size: var(--text-sm);
    font-family: var(--font-body);
    transition: all 0.3s ease;
}

.subfilter-btn:hover,
.subfilter-btn.active {
    background: rgba(191, 161, 230, 0.2);
    border-color: var(--color-accent);
    color: var(--color-white);
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: var(--space-6);
    min-height: 400px;
}

.mobile-filter-container {
    display: none;
    margin-bottom: var(--space-4);
    text-align: center;
}

.mobile-filter-select {
    margin-top: var(--space-1);
    padding: var(--space-2) var(--space-3);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--border-radius-md);
    color: var(--color-silver);
    font-family: var(--font-body);
    font-size: var(--text-base);
    outline: none;
    cursor: pointer;
}

.mobile-filter-select option {
    background: var(--color-primary);
    color: var(--color-silver);
}

.product-card {
    background: rgba(255, 255, 255, 0.03);
    border-radius: var(--border-radius-md);
    overflow: hidden;
    transition: transform 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    flex-direction: column;
    min-height: 860px;
    /* User Request: Min height */
    height: auto;
    /* Allows growth on expansion */
    position: relative;
}

.product-card:hover {
    transform: translateY(-5px);
    border-color: rgba(191, 161, 230, 0.2);
}

.product-image {
    position: relative;
    height: 300px;
    background: var(--color-primary-light);
    overflow: hidden;
    cursor: pointer;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.product-card:hover .product-image img {
    transform: scale(1.05);
}

/* Carousel Arrows */
.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(10, 16, 37, 0.6);
    color: var(--color-silver);
    border: none;
    font-size: 1.5rem;
    padding: 8px 12px;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s ease;
    backdrop-filter: blur(2px);
}

.carousel-btn:hover {
    background: rgba(10, 16, 37, 0.9);
    color: var(--color-white);
}

.carousel-prev {
    left: 0;
    border-radius: 0 4px 4px 0;
}

.carousel-next {
    right: 0;
    border-radius: 4px 0 0 4px;
}

/* Add to Cart Button (Hover) */
.add-to-cart-btn {
    position: absolute;
    bottom: -50px;
    left: 0;
    width: 100%;
    background: var(--color-accent);
    color: var(--color-primary);
    border: none;
    padding: var(--space-3);
    font-weight: 600;
    text-transform: uppercase;
    cursor: pointer;
    transition: bottom 0.3s ease;
}

.product-card:hover .add-to-cart-btn {
    bottom: 0;
}

.product-info {
    padding: var(--space-4);
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    /* Changed from space-between to allow text expansion logic */
    overflow-y: auto;
    /* Allow scrolling internally if needed, or hidden */
    /* Actually for "read more", we usually want hidden overflow with a toggle */
    overflow: hidden;
}

/* Custom scrollbar for product-info if it overflows (optional) */
.product-info::-webkit-scrollbar {
    width: 6px;
}

.product-info::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
}

.product-info::-webkit-scrollbar-thumb {
    background: var(--color-silver);
    border-radius: 3px;
}

.product-description-container {
    margin-bottom: var(--space-3);
    position: relative;
}

.product-description-text {
    color: var(--color-silver);
    font-size: var(--text-base);
    line-height: 1.6;
    /* Truncation logic */
    display: -webkit-box;
    -webkit-line-clamp: 12;
    /* Increased to fill 900px space ~300px text area */
    line-clamp: 12;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: all 0.3s ease;
}

.product-description-text.expanded {
    -webkit-line-clamp: unset;
    line-clamp: unset;
    overflow: visible;
}

.desc-read-more-btn {
    background: transparent;
    border: none;
    color: var(--color-accent);
    font-size: var(--text-sm);
    cursor: pointer;
    padding: 0;
    margin-top: 4px;
    font-weight: 500;
}

.desc-read-more-btn:hover {
    text-decoration: underline;
}

.product-info h3 {
    font-size: var(--text-md);
    margin-bottom: var(--space-1);
    color: var(--color-accent);
}

.product-material {
    font-size: var(--text-sm);
    color: var(--color-text-muted);
    margin-bottom: var(--space-1);
}

.product-category {
    font-size: var(--text-sm);
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: var(--space-2);
}

.product-price {
    font-family: var(--font-heading);
    font-size: var(--text-lg);
    color: var(--color-accent);
    margin-top: auto;
    margin-bottom: 40px;
}

.variant-label {
    display: block;
    margin-bottom: var(--space-1);
}

.variant-select {
    width: 100%;
    padding: var(--space-1);
    border-radius: var(--border-radius-md);
    border: 1px solid var(--color-silver);
    background: rgba(255, 255, 255, 0.01);
    color: var(--color-accent);
    font-size: var(--text-sm);
    cursor: pointer;
    transition: all 0.3s ease;
}

.variant-select:open {
    color: var(--color-primary);
}

/* Sphere Selector */
.sphere-select-wrapper {
    margin-top: var(--space-4);
    margin-bottom: var(--space-1);
    /* Reduce bottom margin since details are next */
    display: flex;
    flex-direction: row;
    /* Ensure row layout */
    align-items: center;
    /* Vertically center items */
    gap: var(--space-1);
    width: 100%;

    select {
        flex: 1;
        padding: var(--space-1);
        border-radius: var(--border-radius-md);
        border: 1px solid var(--color-silver);
        background: rgba(255, 255, 255, 0.01);
        color: var(--color-silver);
        font-size: var(--text-sm);
        cursor: pointer;
        transition: all 0.3s ease;

        option {
            color: var(--color-primary);
        }
    }

    span {
        font-size: var(--text-md);
        width: 5px;
        cursor: pointer;
        color: rgb(255, 107, 107);
        margin-left: 5px;
    }
}

.sphere-details {
    padding: 4px 0px 4px 2px;
    margin-bottom: 20px;
}

.sphere-measurements {
    font-size: 0.75rem;
    color: var(--color-text-muted);
    margin-bottom: 2px;
}

.sphere-description-container {
    font-size: 0.8rem;
}

.read-more-btn {
    color: var(--color-accent);
    cursor: pointer;
    text-decoration: underline;
    font-size: 0.75rem;
}

.read-more-btn:hover {
    color: var(--color-white);
}

.sphere-description-text {
    margin-top: 4px;
    color: var(--color-silver);
    font-size: 0.8rem;
    line-height: 1.4;
    padding: 4px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
}

.add-sphere-btn {
    width: 100%;
    background: var(--color-accent);
    color: var(--color-primary);
    border: none;
    padding: var(--space-1);
    font-weight: 300;
    cursor: pointer;
    transition: bottom 0.3s ease;
}

/* Cart Page Refining */
.cart-section {
    min-height: 60vh;
    padding: var(--space-4) 0;
    /* Reduce padding */
}

.cart-items {
    margin-bottom: var(--space-6);
    display: flex;
    flex-direction: column;
    gap: var(--space-2);

    /* Compact gap */
    h3 {
        text-align: center;
        font-size: var(--text-lg);
        color: var(--color-text-muted);
        margin-top: var(--space-8);
    }
}

.cart-item {
    display: grid;
    grid-template-columns: 80px 1fr auto;
    align-items: center;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: var(--border-radius-md);
    padding: var(--space-2) var(--space-4);
    /* compact padding */
    transition: background 0.3s ease;
    gap: var(--space-4);
}

.cart-item:hover {
    background: rgba(255, 255, 255, 0.05);
}

.cart-item-image {
    width: 60px;
    /* Smaller image */
    height: 60px;
    border-radius: var(--border-radius-sm);
    overflow: hidden;
    cursor: pointer;
    /* Clickable */
    transition: transform 0.2s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.cart-item-image:hover {
    transform: scale(1.05);
    border-color: var(--color-accent);
}

.cart-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cart-item-details {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.cart-item-details h3 {
    font-size: var(--text-md);
    /* Bigger Title */
    margin-bottom: 10px;
    color: var(--color-white);
    line-height: 1.1;
}

.item-price {
    color: var(--color-accent);
    font-family: var(--font-heading);
    font-size: var(--text-md);
}

.cart-item-actions {
    display: flex;
    align-items: center;
    gap: var(--space-4);
}

.quantity-controls {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50px;
    padding: 2px 8px;
    height: 32px;
}

.quantity-controls button {
    background: transparent;
    border: none;
    color: var(--color-silver);
    font-size: var(--text-base);
    cursor: pointer;
    padding: 0 var(--space-2);
    transition: color 0.3s ease;
    display: flex;
    align-items: center;
}

.quantity-controls button:hover {
    color: var(--color-white);
}

.quantity-controls span {
    font-family: var(--font-body);
    min-width: 20px;
    text-align: center;
    font-size: var(--text-sm);
}

.remove-btn {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-text-muted);
    font-size: var(--text-md);
    cursor: pointer;
    transition: all 0.3s ease;
}

.remove-btn:hover {
    color: #ff6b6b;
    border-color: #ff6b6b;
    background: rgba(255, 107, 107, 0.1);
}

/* Cart Summary - Compact */
.cart-summary {
    background: rgba(10, 16, 37, 0.8);
    border: 1px solid var(--color-accent);
    border-radius: var(--border-radius-lg);
    padding: var(--space-4);
    max-width: 400px;
    margin-left: auto;
    box-shadow: var(--shadow-soft);
}

.cart-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-3);
    font-size: var(--text-lg);
    font-family: var(--font-heading);
    color: var(--color-white);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: var(--space-2);
}

/* Lightbox Styles */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 11000;
    display: none;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    backdrop-filter: blur(5px);
}

.lightbox.active {
    display: flex;
    opacity: 1;
}

.lightbox-content {
    width: 65vw;
    /* Fixed width relative to viewport */
    height: 80vh;
    /* Fixed height container */
    max-width: 1200px;
    object-fit: contain;
    /* Ensure image fits without distortion */
    border-radius: var(--border-radius-md);
    transform: scale(0.9);
    transition: transform 0.3s ease;
    background: transparent;
}

.lightbox.active .lightbox-content {
    transform: scale(1);
}

.lightbox-btn {
    position: absolute;
    /* Fix arrows to screen */
    background: transparent;
    border: none;
    color: var(--color-silver);
    font-size: 3rem;
    cursor: pointer;
    padding: 20px;
    transition: color 0.3s ease, transform 0.2s ease;
    z-index: 1002;
    user-select: none;
    top: 50%;
    transform: translateY(-50%);
}

.lightbox-btn:hover {
    color: var(--color-white);
    transform: translateY(-50%) scale(1.1);
}

.lightbox-prev {
    left: 40px;
}

.lightbox-next {
    right: 40px;
}

.lightbox-close {
    position: absolute;
    top: 30px;
    right: 40px;
    background: transparent;
    border: none;
    color: var(--color-white);
    font-size: 3rem;
    cursor: pointer;
    line-height: 1;
    z-index: 1001;
    transition: color 0.3s ease;
}

.lightbox-close:hover {
    color: var(--color-accent);
}

.empty-cart-msg {
    text-align: center;
    font-size: var(--text-md);
    color: var(--color-text-muted);
    margin-top: var(--space-8);
}

/* Responsive Cart */
@media (max-width: 768px) {
    .filters {
        display: none;
    }

    .mobile-filter-container {
        display: block;
    }

    section {
        padding: var(--space-2) var(--space-3);
    }

    .cart-item {
        grid-template-columns: 60px 1fr;
        grid-template-rows: auto auto;
        gap: var(--space-2);
        padding: var(--space-3);
    }

    .cart-item-image {
        grid-row: 1 / 3;
    }

    .cart-item-actions {
        grid-column: 2;
        justify-content: space-between;
        width: 100%;
    }

    .image-adjust {
        top: 60px;
    }

    /* Always show Add to Cart on Mobile */
    .add-to-cart-btn {
        position: static;
        width: 100%;
        transform: none;
        bottom: auto;
    }

    .product-card {
        padding-bottom: 0;
        /* Removing extra padding if any, letting flex handle it */
    }
}

/* Cart Badge */
.cart-link {
    position: relative;
}

#cart-count {
    background: var(--color-accent);
    color: var(--color-primary);
    border-radius: 50%;
    padding: 2px 6px;
    font-size: 12px;
    font-weight: bold;
    vertical-align: top;
    margin-left: 4px;
}

/* Cart Icon */
.cart-icon {
    width: 35px;
    height: 35px;
    vertical-align: middle;
    margin-bottom: 10px;
    filter: brightness(0) invert(1);
    /* Make white if transparent png is black, or just ensuring brightness */
    transition: transform 0.3s ease;
}

.cart-link:hover .cart-icon {
    transform: scale(1.1);
}

.cart-link {
    display: flex;
    align-items: center;
    gap: 4px;
}

.payment-buttons {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}

#paypal-button-container {

    button,
    form p {
        color: #ffffff !important;
    }
}

/* Utility Classes for JS Refactor */
.text-center {
    text-align: center;
}

.text-silver {
    color: var(--color-silver);
}

.text-error {
    color: #ff6b6b;
}

.text-muted {
    color: var(--color-text-muted);
}

.hidden {
    display: none !important;
}

.visible-block {
    display: block !important;
}

.visible-flex {
    display: flex !important;
}

.visible-inline-block {
    display: inline-block !important;
}

.loading-msg,
.empty-msg {
    text-align: center;
    color: var(--color-silver);
}

.error-msg {
    text-align: center;
    color: #ff6b6b;
}

.product-measurements {
    font-size: 0.8em;
    color: var(--color-text-muted);
    margin-bottom: 4px;
}

.out-of-stock-hidden {
    display: none !important;
}

.out-of-stock-disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.margin-v-10 {
    margin: 10px 0;
}

.details-list {
    font-size: 0.85rem;
    color: var(--color-text-muted);
    padding-left: 0;
    list-style: none;
    margin-top: 4px;
}

.no-scroll {
    overflow: hidden;
}

/* Dimensions Toggle Styles */
.product-measurements-container {
    margin-top: 5px;
}

.dimensions-toggle-btn {
    background: none;
    border: none;
    color: var(--color-accent);
    cursor: pointer;
    font-size: 0.9em;
    padding: 0;
    text-decoration: underline;
    display: inline-block;
    margin-bottom: 5px;
    font-family: inherit;
    transition: color 0.3s ease;
}

.dimensions-toggle-btn:hover {
    color: var(--color-white);
}

.product-measurements {
    font-size: 0.9em;
    color: var(--color-silver);
    padding-left: 10px;
    border-left: 2px solid var(--color-accent);
    margin-top: 5px;
    margin-bottom: 15px;
}

/* Helper for hidden elements if not already present globally */
.hidden {
    display: none !important;
}

/* Mobile Navigation & Hamburger */
.nav-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.hamburger-menu {
    display: none;
    cursor: pointer;
    z-index: 101;
}

.hamburger-menu span {
    display: block;
    width: 25px;
    height: 3px;
    background-color: var(--color-silver);
    margin: 5px 0;
    transition: all 0.3s ease;
}

/* Hide the separate cart icon on desktop, we use the one in nav-links usually? 
   Wait, I removed the one in nav-links. So I need to show THIS one on desktop too?
   The user said "leave the cart out of the hamburger menu".
   If I removed it from nav-links, I should show it in .nav-right on desktop too!
   So .desktop-cart-hidden should actually be visible on desktop?
   "cart on the left of the menu"
   If I show it in .nav-right, it will be to the left of hamburger (if visible) or just on the right side.
   Let's assume we want it visible always now.
   So I won't use .desktop-cart-hidden to hide it on desktop.
   I will just style .nav-right.
*/

/* Mobile Nav Styles */
@media (max-width: 768px) {
    .hamburger-menu {
        display: block;
    }

    .nav-links {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: rgba(10, 16, 37, 0.98);
        flex-direction: column;
        padding: 20px 0;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
        display: none;
        /* Hidden by default */
    }

    .nav-links.active {
        display: flex;
    }

    .nav-links li {
        width: 100%;
        text-align: center;
        padding: 15px 0;
    }

    /* Hamburger Animation */
    .hamburger-menu.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }

    .hamburger-menu.active span:nth-child(2) {
        opacity: 0;
    }

    .hamburger-menu.active span:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -6px);
    }

    .hero-content {
        margin-top: var(--space-12);
    }

    .page-header {
        padding-bottom: var(--space-4);
    }

    .hero-logo {
        display: none !important;
    }

    .price-unit {
        font-size: 1.2rem !important;
    }
}

/* Price Unit */
.price-unit {
    font-size: var(--text-md);
    font-weight: 400;
    margin-left: 5px;
}

/* Hero Logo */
.hero-logo {
    width: 400px;
    height: auto;
    margin-bottom: var(--space-4);
    pointer-events: none;
    display: inline-block;
}