/* Custom Styles for FitGrip */

:root {
    /* Override Bootstrap's default 'danger' colour with the new brand blue */
    --bs-danger: #00acc1;
    --bs-danger-rgb: 0, 172, 193; /* RGB equivalent for opacity helpers */

    /* New Color Palette */
    --bg-dark-navy: #011627;
    --bg-section-dark: #023047;
    --bg-section-mid: #005f73;
    --bg-section-light: #00778f;

    /* Optional: Define a custom brand colour variable for easier use */
    --brand-primary: #00acc1;
    --brand-primary-light: rgba(0, 172, 193, 0.05); /* A very light shade of the brand blue */

    /* Override Bootstrap's default 'secondary' colour with the brand blue */
    --bs-secondary: #00acc1;
    --bs-secondary-rgb: 0, 172, 193;
    --bs-secondary-bg-subtle: rgba(0, 172, 193, 0.15);
}

/*
 * Ensure all components using the 'danger' theme are updated to the new brand color.
 * This includes buttons, text, and backgrounds. This is now our brand colour.
 */
.btn-danger {
    --bs-btn-color: #fff;
    --bs-btn-bg: var(--brand-primary);
    --bs-btn-border-color: var(--brand-primary);
    --bs-btn-hover-bg: #008a9a; /* A slightly darker shade for hover */
    --bs-btn-hover-border-color: #007f8d;
    --bs-btn-active-bg: #007f8d;
    --bs-btn-active-border-color: #007481;
}

/* Add a consistent hover effect for the standard primary button */
.btn-primary {
    --bs-btn-hover-bg: #0b5ed7; /* A slightly darker shade of Bootstrap blue */
    --bs-btn-hover-border-color: #0a58ca;
    --bs-btn-active-bg: #0a58ca;
    --bs-btn-active-border-color: #0a53be;
}

/* A true red button for destructive actions like 'Clear Cart' */
.btn-true-danger {
    --bs-btn-color: #fff;
    --bs-btn-bg: #dc3545; /* Bootstrap's default danger red */
    --bs-btn-border-color: #dc3545;
    --bs-btn-hover-bg: #bb2d3b;
    --bs-btn-hover-border-color: #b02a37;
    --bs-btn-active-bg: #b02a37;
    --bs-btn-active-border-color: #a52834;
}

/* --- Navbar Enhancements --- */
.navbar-glass {
    background: rgba(2, 48, 71, 0.8) !important; /* Slightly transparent, more bluish navy */
    backdrop-filter: blur(8px); /* Frosted glass effect */
    -webkit-backdrop-filter: blur(8px); /* For Safari */
    border-bottom: 1px solid rgba(255, 255, 255, 0.1); /* Subtle bottom border */
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3); /* Soft shadow for depth */
}

.navbar-nav .nav-link {
    position: relative;
    transition: all 0.3s ease;
    color: #fff !important; /* Fully white for better visibility */
    font-weight: bold; /* Make all nav links bold */
}

.navbar-nav .nav-link:hover {
    color: #fff !important; /* Bright white on hover */
}
.navbar-nav .nav-link.active {
    color: var(--brand-primary) !important; /* Shining blue for the active link */
    text-shadow: 0 0 10px var(--brand-primary), 0 0 5px rgba(255, 255, 255, 0.7); /* Enhanced glow */
}

.navbar-nav .nav-link::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: 0;
    width: 0;
    height: 2px;
    background-color: var(--brand-primary);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.navbar-nav .nav-link:hover::after,
.navbar-nav .nav-link.active::after {
    width: 80%; /* Expand underline on hover/active */
}

/* Cart icon animation */
@keyframes cart-pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}
.cart-pulse-animation {
    animation: cart-pulse 0.5s ease-in-out;
}

/* --- Custom Highlight for SHOP in Navbar --- */
.nav-link .shop-highlight {
    font-weight: bold; /* Keep the text bold */
    background-color: rgba(0, 172, 193, 0.25); /* Use a more prominent, but still transparent, version of the brand blue */
    color: var(--brand-primary) !important; /* Set the text color to the brand's light blue */
    padding: 3px 6px; /* Adjust padding slightly for a tighter look */
    border-radius: 3px; /* A very subtle rounding of corners */
    text-shadow: none; /* Remove the glow effect */
    transition: background-color 0.3s ease; /* Smooth transition on hover */
}

.bg-danger { background-color: var(--brand-primary) !important; }
.text-danger { color: var(--brand-primary) !important; }

/* Custom sentence highlight */
.highlight-blue {
    color: var(--brand-primary) !important;
}

/* Custom text colors for founder story */
.text-green { color: #228B22 !important; } /* Forest Green from swatches */
.text-purple { color: #8E4585 !important; } /* Plum Purple from swatches */
.text-neon-orange { color: #FF4500 !important; text-shadow: 0 0 8px rgba(255, 69, 0, 0.9); } /* Sunset Orange */
.text-neon-green { color: #228B22 !important; text-shadow: 0 0 8px rgba(34, 139, 34, 0.9); }
.text-neon-pink { color: #FF66CC !important; text-shadow: 0 0 8px rgba(255, 102, 204, 0.9); } /* Rose Pink */

/* Override Bootstrap's light background colour */
.bg-light {
    background-color: var(--brand-primary-light) !important;
}


/* Update secondary components to use the new colour */
.btn-secondary {
    --bs-btn-color: #fff;
    --bs-btn-bg: var(--brand-primary);
    --bs-btn-border-color: var(--brand-primary);
    --bs-btn-hover-bg: #008a9a;
    --bs-btn-hover-border-color: #007f8d;
    --bs-btn-active-bg: #007f8d;
    --bs-btn-active-border-color: #007481;
}

body {
    background-color: var(--bg-dark-navy);
    color: #FDFFFC; /* Off-white for better readability */
}


/*
 * Fix for parallax z-index issue on the home page.
 * This ensures the hero section scrolls *behind* the page content.
 */
.hero-section {
    position: relative;
    z-index: -1;
}

/* Ensure content sections have a background and appear above the hero */
#why {
    background-color: transparent;
    position: relative; /* Needed for the shape divider */
}

#how {
    position: relative; /* Needed for the shape divider */
    overflow: hidden; /* Contain the video within the section */
    background-color: transparent; /* Make section background see-through for the video */
    z-index: 0; /* Establish stacking context */
}

#what {
    background-color: transparent;
}

/* Make text in the #why section white and shiny for readability over the background */
#why h2, #why p, #why .blockquote-footer {
    color: #fff;
    text-shadow: 0 0 8px rgba(0, 0, 0, 0.7), 0 0 2px rgba(255, 255, 255, 0.5);
}

/* Exclude the shiny effect from the blue brand name in the heading */
#why h2 .text-danger {
    text-shadow: none;
}

/* Make text in the #what section white and shiny */
#what h2,
#what .lead,
#what h3,
#what .tech-card {
    color: #fff;
    text-shadow: 0 0 8px rgba(0, 0, 0, 0.7), 0 0 2px rgba(255, 255, 255, 0.5);
}

/* Remove shiny effect from muted/colored text inside the section */
#what .text-muted, /* This is the brand colour */
#what .text-danger,
#what .bg-light h5,
#what .bg-light {
    text-shadow: none;
}

#what .bg-light {
    background: rgba(0, 0, 0, 0.3) !important; /* Dark, semi-transparent background */
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px); /* For Safari */
    color: #fff; /* White text for contrast */
    border-radius: 15px !important; /* More rounded edges */
}

/* --- Page-specific Backgrounds --- */
.products-page, .gallery-page, .about-page, .contact-page, .cart-page, .checkout-page, .sweatsona-page {
    background-color: var(--bg-section-dark);
}

/* Make muted text lighter for better contrast on dark backgrounds */
.text-muted {
    color: #adb5bd !important; /* A lighter grey from Bootstrap's palette */
}

.products-page .container, .gallery-page .container, .about-page .container, .contact-page .container, .cart-page .container, .checkout-page .container, .sweatsona-page .container {
    background-color: transparent !important; /* Ensure containers on these pages don't have their own BG */
}

/* --- Section Video Background --- */
.section-video-background-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1; /* Position behind section content */
    overflow: hidden;
}

.section-background-video {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Ensure video covers the section without distortion */
}


/*
 * Stylized blockquote for the founder's story on the home page.
 * Uses pseudo-elements to create large, decorative quotation marks.
 */
.story-blockquote {
    position: relative;
    padding-left: 3rem;
    padding-right: 3rem;
}

.story-blockquote::before,
.story-blockquote::after {
    font-family: Georgia, serif;
    font-size: 6rem;
    font-weight: bold;
    color: var(--brand-primary);
    text-shadow: 0 0 15px rgba(0, 172, 193, 0.8);
    position: absolute;
    line-height: 1;
}
.story-blockquote::before { content: '“'; top: -1rem; left: 0; }
.story-blockquote::after { content: '”'; bottom: -3rem; right: 0; }

/* New style for the founder's signature */
.founder-signature {
    font-family: 'Brush Script MT', 'Brush Script Std', cursive;
    font-style: italic;
    transform: rotate(-6deg);
    transform-origin: bottom right;
    font-size: 1.6rem !important; /* Override Bootstrap's default footer size */
    line-height: 1.2;
    color: #fff; /* Ensure text is white */
    text-shadow: 0 0 5px #fff, 0 0 10px #fff, 0 0 15px #fff; /* White glow effect */
}

/* New wrapper to enforce a consistent size and shape */
.founder-image-wrapper {
    width: 100%;
    max-width: 300px;
    aspect-ratio: 1 / 1; /* Enforce a perfect square */
    margin: 0 auto;
    border-radius: 50%;
    overflow: hidden; /* This is key to making the non-square image a circle */
    box-shadow: 0 0 50px 15px rgba(0, 172, 193, 0.7);
}

/* Style for the image itself to fill the new wrapper */
.founder-portrait-img { 
    width: 100%;
    height: 100%;
    object-fit: cover; /* This will crop the image to fill the square, not stretch it */
}

/* --- About Page Founder Portrait Rotator --- */
.founder-portrait-rotator {
    position: relative;
    min-height: 420px; /* Set a minimum height to contain the absolute elements */
}

.founder-item {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    opacity: 0;
    animation: fade-in-out 10s infinite;
}

.founder-item:nth-child(2) {
    animation-delay: 5s; /* Stagger the second item's animation */
}

@keyframes fade-in-out {
    0%, 100% { opacity: 0; }
    10% { opacity: 1; } /* Fade in */
    40% { opacity: 1; } /* Hold */
    50% { opacity: 0; } /* Fade out */
}




/* Dark Glassmorphism panel for text readability over background images */
.text-panel-glass {
    background: rgba(0, 0, 0, 0.2); /* Darker, less transparent for better readability on solid color */
    backdrop-filter: blur(8px);          /* The blur effect */
    -webkit-backdrop-filter: blur(8px);  /* For Safari support */
    border: 1px solid rgba(255, 255, 255, 0.1); /* Subtle border for depth */
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.2); /* Soft shadow for lift */
}

/* --- Product Card Standardization --- */
.product-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    background-color: #fff;
    color: #212529;
    border-radius: 15px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

.product-image-container {
    /* Use aspect-ratio for a modern, square look */
    aspect-ratio: 1 / 1; /* Enforce a square aspect ratio */
    background-color: #f8f9fa; /* A light, neutral background for the image frame */
    display: flex; /* Use flexbox for centring */
    align-items: center;
    justify-content: center;
    border-radius: 15px 15px 0 0; /* Apply rounded corners to the top of the image container */
    overflow: hidden; /* Ensure the image respects the container's bounds */
}

.product-card:hover .product-main-image {
    transform: scale(1.05); /* Subtle zoom on hover */
}

.product-main-image {
    max-width: 90%; /* Don't let the image touch the edges */
    max-height: 90%; /* Don't let the image touch the edges */
    object-fit: contain; /* Ensures the entire image is visible without distortion */
    transition: transform 0.3s ease; /* Smooth transition for hover effect */
}

/* 
 * The zensocks-fix was a workaround for the old 'cover' style.
 * With 'contain', we can remove this override for consistency.
*/
.product-main-image.zensocks-fix {
    width: auto; /* Revert to default behavior */
}

.product-card .card-body .text-muted {
    color: #6c757d !important; /* Ensure muted text is also dark */
}


/*
 * Glassmorphism ("frosted glass") effect for the main logo on the hero section.
 * This creates a blurred, semi-transparent background effect.
 */
.hero-logo-glass {
    background: rgba(255, 255, 255, 0.1); /* Semi-transparent white background */
    backdrop-filter: blur(10px);          /* The blur effect */
    -webkit-backdrop-filter: blur(10px);  /* For Safari support */
    border: 1px solid rgba(255, 255, 255, 0.2); /* Subtle border for depth */
    padding: 20px; /* Add some space around the logo inside the glass effect */
    border-radius: 15px; /* Add rounded corners to the glass effect */
}

/*
 * "How We Do It" Animated Section
 */
.animation-container {
    position: relative;
    height: 500px;
    overflow: hidden;
    border-radius: 15px;
    box-shadow: inset 0 0 20px rgba(0,0,0,0.1);
}

/* New wrapper to ensure image and button stay centred together */
.rotating-image-wrapper {
    position: relative;
    display: inline-block; /* Shrink-wrap the content to the image's size */
    line-height: 0; /* Remove extra space below the image */
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.rotating-image {
    /* No longer absolutely positioned, now part of the grid */
    opacity: 1; /* Fully visible */
    animation: spin 60s linear infinite;
    /* Add a white glow to make dark parts of the image visible on the dark background */
    filter: drop-shadow(0 0 30px rgba(255, 255, 255, 0.8));
}

.how-it-works-overlay {
    display: none; /* Remove the old overlay */
}

/* Keyframes for the new pulsing button effect */
@keyframes pulse-glow {
    0%, 100% {
        transform: translate(-50%, -50%) scale(1);
        box-shadow: 0 0 20px rgba(0, 172, 193, 0.7), inset 0 0 10px rgba(255, 255, 255, 0.2);
    }
    50% {
        transform: translate(-50%, -50%) scale(1.05);
        box-shadow: 0 0 30px rgba(0, 172, 193, 0.9), inset 0 0 12px rgba(255, 255, 255, 0.3);
    }
}

/* New style for the circular "Summon" button in the center of the rotating hands */
.sweatsona-summon-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%); /* CRITICAL FIX: This centers the button */
    width: 180px; /* Made smaller */
    height: 180px; /* Made smaller */
    background-color: var(--brand-primary);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    font-size: 1.3rem; /* Adjusted for new text */
    font-weight: bold;
    text-decoration: none;
    line-height: 1.2;
    padding: 1rem;
    transition: all 0.3s ease;
    z-index: 55; /* Ensure it's above the rotating image */
    animation: pulse-glow 2.5s infinite ease-in-out; /* Added pulsing animation */
}

.sweatsona-summon-btn:hover {
    transform: translate(-50%, -50%) scale(1.1);
    box-shadow: 0 0 35px rgba(0, 172, 193, 1), inset 0 0 15px rgba(255, 255, 255, 0.3);
    color: #fff;
}

/* New styles for the text container */
.sweatsona-teaser-text {
    /* No special positioning needed, it's in the grid */
    text-align: left;
}

.feature-cards-container {
    position: absolute;
    bottom: 20px;
    left: 0;
    width: 100%;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    z-index: 60;
    padding: 0 20px;
}

.feature-card {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50px; /* Pill shape */
    padding: 8px 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    animation: feature-pulse 3s infinite ease-in-out;
}

.feature-card i {
    font-size: 1.1rem;
}

@keyframes feature-pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.value-bubble {
    position: absolute;
    background: rgba(255, 255, 255, 0.8);
    color: #006c7a;
    padding: 15px 25px;
    border-radius: 50px;
    font-weight: bold;
    font-size: 1.1rem;
    z-index: 20;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    will-change: transform;
}

.sweat-drop {
    position: absolute;
    color: rgba(255, 255, 255, 0.6);
    font-size: 1.5rem;
    animation: drip 2s infinite linear forwards;
    will-change: transform;
    top: -50px; /* Start off-screen */
}

/* More varied pulse animations for value bubbles */
@keyframes pulse-1 {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

@keyframes pulse-2 {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

@keyframes pulse-3 {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.03); }
}

@keyframes pulse-4 {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.12); }
}

@keyframes flow-1 {
    0% { translate: -200px -100px; rotate: -15deg; }
    100% { translate: 120vw 600px; rotate: 15deg; }
}

@keyframes flow-2 {
    0% { translate: -200px 600px; rotate: 10deg; }
    100% { translate: 120vw -100px; rotate: -10deg; }
}

@keyframes flow-3 {
    0% { translate: 120vw -100px; rotate: 5deg; }
    100% { translate: -200px 600px; rotate: -5deg; }
}

@keyframes flow-4 {
    0% { translate: 120vw 600px; rotate: -20deg; }
    100% { translate: -200px -100px; rotate: 20deg; }
}

@keyframes drip {
    0% { transform: translateY(0); opacity: 1; }
    90% { opacity: 1; }
    100% { transform: translateY(600px); opacity: 0; }
}

.anim-1 { animation: flow-1 15s linear infinite, pulse-1 4s ease-in-out -1s infinite; }
.anim-2 { animation: flow-2 20s linear infinite, pulse-2 3s ease-in-out -0.5s infinite; }
.anim-3 { animation: flow-3 18s linear infinite, pulse-3 5s ease-in-out -2.5s infinite; }
.anim-4 { animation: flow-4 22s linear infinite, pulse-4 3.5s ease-in-out -1.5s infinite; }

.drop-1 { left: 10%; animation-delay: 0s; }
.drop-2 { left: 20%; animation-delay: 1.5s; }
.drop-3 { left: 30%; animation-delay: 0.5s; }
.drop-4 { left: 40%; animation-delay: 2s; }
.drop-5 { left: 50%; animation-delay: 1s; }
.drop-6 { left: 60%; animation-delay: 0.2s; }
.drop-7 { left: 70%; animation-delay: 1.8s; }
.drop-8 { left: 80%; animation-delay: 0.8s; }
.drop-9 { left: 90%; animation-delay: 1.2s; }

.tech-card {
    background-color: var(--brand-primary-light);
    border: 1px solid rgba(0, 172, 193, 0.1);
    border-radius: 10px;
    padding: 1rem;
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 500;
    height: 100%;
}
.tech-card i {
    color: var(--brand-primary);
    font-size: 1.5rem;
}

#tech-product-swap-container {
    min-height: 550px; /* Adjust to prevent layout shifts */
    transition: height 0.5s ease-in-out; /* Animate height changes */
}

.tech-product-panel {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.5s ease-in-out, visibility 0.5s ease-in-out;
}
.tech-product-panel.active {
    opacity: 1;
    visibility: visible;
}
.tech-product-panel.active { z-index: 1; } /* Establish base stacking context for active panel */

/* Remove top margin from the next element (footer) after the final CTA on the homepage */
.no-bottom-margin + footer, section.no-bottom-margin + footer {
    margin-top: 0 !important;
}

.tech-image-container {
    position: relative;
    width: 100%;
    /* aspect-ratio removed to allow image to define its own height */
    border-radius: 15px;
}

.tech-image-container img {
    width: 100%;
    height: 100%;
    object-fit: contain; /* Ensures the entire image is visible without distortion */
    border-radius: 15px;
    transition: transform 0.3s ease; /* Add a transition for hover effects */
}

/* Product Glow Effects */
.product-detail-main-image.cyan-glow {
    box-shadow: 0 0 60px 20px rgba(0, 172, 193, 0.9);
}
.product-detail-main-image.orange-glow { box-shadow: 0 0 60px 20px rgba(255, 165, 0, 0.9); }
.product-detail-main-image.purple-glow { box-shadow: 0 0 60px 20px rgba(147, 112, 219, 0.9); }
.product-detail-main-image.yellow-glow { box-shadow: 0 0 60px 20px rgba(255, 223, 0, 0.8); }
.product-detail-main-image.green-glow { box-shadow: 0 0 60px 20px rgba(50, 205, 50, 0.9); }
.product-detail-main-image.pink-glow { box-shadow: 0 0 60px 20px rgba(255, 105, 180, 0.9); }

.tech-nav-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 30; /* Ensure arrows are on top */
    background-color: rgba(0, 0, 0, 0.3);
    color: white;
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    font-size: 1.5rem;
    transition: background-color 0.3s ease;
}
.tech-nav-arrow:hover {
    background-color: rgba(0, 0, 0, 0.5);
}
.tech-nav-arrow.prev { left: -25px; }
.tech-nav-arrow.next { right: -25px; }

.tech-progress-container {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background-color: rgba(0, 172, 193, 0.2);
    border-bottom-left-radius: 15px;
    border-bottom-right-radius: 15px;
    overflow: hidden;
    z-index: 25; /* Ensure progress bar is above the panel but below arrows */
}

.tech-progress-bar {
    height: 100%;
    background-color: var(--brand-primary);
    width: 0;
    transition: width 0.1s linear; /* Smooth reset */
}
.tech-progress-bar.is-running {
    transition: width 4s linear; /* Match the swap time */
}

/* Product Color Swatches */
.color-selector {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.color-option {
    position: relative;
    cursor: pointer;
}

.color-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.color-swatch {
    display: block;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid #dee2e6;
    transition: border-color 0.2s ease;
}

.color-option input[type="radio"]:checked + .color-swatch {
    border-color: var(--brand-primary);
    box-shadow: 0 0 0 2px var(--brand-primary);
}

/* Towel Colours */
.colour-sunset-orange { background-color: #FF4500; }
.colour-rose-pink { background-color: #FF66CC; }
.colour-cherry-pink { background-color: #DE3163; }
.colour-sky-blue { background-color: #87CEEB; }
.colour-ocean-blue { background-color: #0077BE; }
.colour-plum-purple { background-color: #8E4585; }
.colour-midnight-black { background-color: #111; }
.colour-feather-grey { background-color: #BFC1C2; }
.colour-forest-green { background-color: #228B22; }

/* ZenSocks Colours */
.colour-pina-colada { background-color: #FFFACD; }
.colour-blue-lagoon { background-color: #43C6DB; }
.colour-mojito { background-color: #98FF98; }
.colour-strawberry-daiquiri { background-color: #FF4081; }
.colour-long-island { background-color: #C08A58; }
.colour-margarita { background-color: #C8E6C9; }

/* LiftSocks Colours */
.colour-apple-crumble { background-color: #98FB98; } /* Changed to Green */
.colour-blueberry-cheesecake { background-color: #1E90FF; } /* Changed to Bright Blue */
.colour-lavendar-swirl { background-color: #B19CD9; } /* Changed to more Purple */
.colour-vanilla-meringue { background-color: #FFD1DC; } /* Changed to Pink */
.colour-licorice { background-color: #1A1110; }
.colour-turkish-delight { background-color: #F08080; }

/* GripGloves Colours */
.colour-grey { background-color: #808080; }
.colour-black { background-color: #111; }
.colour-salmon-pink { background-color: #FA8072; }

/* Size Selector */
.size-selector {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.size-option {
    position: relative;
    cursor: pointer;
}

.size-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.size-name {
    display: block;
    padding: 6px 14px;
    border: 1px solid #dee2e6;
    border-radius: 20px;
    background-color: #f8f9fa;
    transition: all 0.2s ease;
}

.size-option input[type="radio"]:checked + .size-name {
    background-color: var(--brand-primary);
    color: white;
    border-color: var(--brand-primary);
}

/* Out of Stock Styles */
.color-option.out-of-stock {
    cursor: not-allowed;
    position: relative;
}

.color-option.out-of-stock .color-swatch {
    opacity: 0.5;
}

.color-option.out-of-stock::after {
    content: 'X';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #dc3545; /* A true red for contrast */
    font-weight: bold;
    font-size: 1.2rem;
}

/* New Hardcoded Out of Stock Styles */
.size-option.is-out-of-stock {
    pointer-events: none; /* Make it unclickable */
    cursor: not-allowed;
}

.size-option.is-out-of-stock .size-name {
    opacity: 0.5;
    text-decoration: line-through;
    background-color: #e9ecef; /* A disabled grey background */
    border-color: #dee2e6;
    color: #6c757d;
}

/* --- HARDCODED STOCK FIX --- */
/* This rule targets the element with our special class, but ONLY when the form's data attribute is set to 'salmon-pink' */
form[data-selected-colour="salmon-pink"] .out-of-stock-for-salmon-pink {
    pointer-events: none;
    opacity: 0.4;
}

/* A more specific class for the hardcoded approach */
form[data-selected-colour="salmon-pink"] .out-of-stock-for-salmon-pink {
    display: none;
}


/* Side Sweat Animations for Products Page */
.side-animation-panel {
    position: fixed;
    top: 0;
    bottom: 0;
    width: calc((100vw - 1320px) / 2); /* Adjust based on Bootstrap's .container-xl width */
    max-width: 200px;
    z-index: -1; /* Position behind main content */
    overflow: hidden;
}

.left-panel { left: 0; }
.right-panel { right: 0; }

.side-sweat-drop {
    position: absolute;
    color: var(--brand-primary);
    opacity: 0.5;
    font-size: 1.5rem;
    animation: side-drip 3s infinite linear;
    top: -50px; /* Start off-screen */
}

@keyframes side-drip {
    0% { transform: translateY(0); }
    100% { transform: translateY(100vh); }
}

.sweat-catcher {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 80px;
    background: linear-gradient(to top, rgba(0, 172, 193, 0.2), transparent);
}

/* Hide side animations on smaller screens where there's no white space */
@media (max-width: 1400px) {
    .side-animation-panel {
        display: none;
    }
}

/* Global Animation on Scroll */
section, .animate-on-scroll {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

section.is-visible, .animate-on-scroll.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* --- Tablet Responsiveness --- */
@media (max-width: 991.98px) {
    /* Adjust founder portrait to be centered and slightly smaller */
    .founder-portrait-img {
        margin-left: auto;
        margin-right: auto;
    }

    /* Adjust tech slider section height for tablet */
    #tech-product-swap-container {
        min-height: 650px;
    }
}


/* --- Mobile Responsiveness --- */
@media (max-width: 767.98px) {
    /* Reduce heading sizes on mobile */
    .display-4 {
        font-size: 2.5rem;
    }

    /* Adjust hero logo size */
    .hero-logo-glass {
        max-width: 250px;
        padding: 15px;
    }

    /* Adjust founder story blockquote */
    .story-blockquote {
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }
    .story-blockquote::before,
    .story-blockquote::after {
        font-size: 4rem;
    }
    .story-blockquote::before { top: -0.5rem; }
    .story-blockquote::after { bottom: -2rem; }

    /* Adjust founder portrait size */
    .founder-portrait-img {
        max-width: 300px;
        margin-left: auto;
        margin-right: auto;
    }

    /* Make "How We Do It" animation container shorter */
    .animation-container {
        height: auto; /* Let content define height */
        padding-top: 2rem; /* Add some space at the top */
        overflow: hidden; /* Revert to hidden to contain elements */
    }

    .rotating-image {
        width: 150vw; /* Make the image significantly larger on mobile */
        max-width: 150vw; /* Ensure it can be this wide */
    }

    .sweatsona-summon-btn {
        width: 90px; /* Make button smaller on mobile */
        height: 90px;
        font-size: 0.6rem; /* Adjust font size for smaller button */
        padding: 0.3rem;
    }

    .sweatsona-teaser-text {
        text-align: center; 
        margin-top: 2rem; /* Add space above the text on mobile */
    }

    .rotating-image-wrapper {
        margin-bottom: 2rem; /* Add space between the image/button and the text below */
        /* Nudge the oversized container to the left to re-center the visual content */
        transform: translateX(-16.5%);
    }
    #sweatsona-phrase {
        font-size: 2.25rem; /* Reduce font size from display-4 */
    }

    /* --- Mobile Cart Table Overhaul --- */

    /*
     * On mobile, disable the horizontal scrolling behavior of Bootstrap's
     * .table-responsive wrapper. This is the key to allowing the table
     * to reflow into a vertical layout.
     */
    .cart-page .table-responsive {
        overflow-x: hidden;
    }

    .cart-page table thead {
        display: none; /* Hide table head on mobile */
    }

    /* Force each row to be a block-level card */
    .cart-page table tr {
        display: block;
        width: 100%;
        margin-bottom: 1rem;
        border: 1px solid rgba(0, 172, 193, 0.2);
        border-radius: 0.5rem;
        padding: 0.5rem;
        background-color: var(--brand-primary-light);
    }

    /* Each cell stacks vertically */
    .cart-page table td {
        display: block;
        width: 100%;
        text-align: right; /* Align content to the right, opposite the label */
        padding: 0.75rem 0.5rem;
        border-bottom: 1px solid rgba(0, 172, 193, 0.1);
        position: relative; /* Needed for pseudo-element positioning */
        border-top: none; /* Override Bootstrap's default table cell borders */
    }

    .cart-page table td:last-child {
        border-bottom: none; /* Remove border on the last item in the card */
    }

    /* Create a label above the content */
    .cart-page table td::before {
        content: attr(data-label);
        position: absolute;
        left: 0.5rem;
        font-weight: bold;
        text-transform: uppercase;
        font-size: 0.8rem;
        color: #adb5bd; /* A muted color for the label */
        text-align: left;
    }

    /* Special handling for the main product cell */
    .cart-page table td:first-child {
        text-align: left; /* Product info should be left-aligned */
    }

    .cart-page table td:first-child::before {
        display: none;
    }

    /* Center the color swatch and name */
    .cart-page table td[data-label="Colour"] .d-flex {
        justify-content: flex-end; /* Align swatch to the right */
    }
    
    /*
     * FINAL FIX for color swatches in product modals on mobile.
     * After correcting the HTML (removing a duplicate class), this simple rule
     * ensures the swatches display correctly as inline blocks, which allows their
     * background color to render properly on all screen sizes.
     */
    .product-detail-modal .color-swatch {
        display: inline-block;
    }


    /* Fix for frosted header on mobile */
    .navbar-glass { 
        background: rgba(2, 48, 71, 0.8) !important;
    }

    /* Ensure page-specific backgrounds cover the whole view */
    .products-page, .gallery-page, .about-page, .contact-page, .cart-page, .checkout-page, .sweatsona-page {
        min-height: 100vh;
    }
}

/* --- Gallery Page Enhancements --- */
.gallery-item {
    aspect-ratio: 1 / 1; /* Enforce a square shape */
    overflow: hidden; /* Ensures the border-radius is respected by the child img */
    border-radius: 12px;
    border: 3px solid rgba(255, 255, 255, 0.1);
    transition: border-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
    /* Base shadow for depth, will be combined with the glow */
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

/* Neon Glow Effect Classes */
.gallery-item.glow-pink { box-shadow: 0 0 15px 3px rgba(255, 105, 180, 0.7); }
.gallery-item.glow-cyan { box-shadow: 0 0 15px 3px rgba(0, 172, 193, 0.7); }
.gallery-item.glow-green { box-shadow: 0 0 15px 3px rgba(50, 205, 50, 0.7); }
.gallery-item.glow-orange { box-shadow: 0 0 15px 3px rgba(255, 165, 0, 0.7); }
.gallery-item.glow-purple { box-shadow: 0 0 15px 3px rgba(147, 112, 219, 0.7); }
.gallery-item.glow-yellow { box-shadow: 0 0 15px 3px rgba(255, 223, 0, 0.7); }

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* This makes the image fill the square, cropping if necessary */
    transition: transform 0.3s ease;
}

.gallery-item:hover {
    transform: scale(1.05);
    border-color: var(--brand-primary);
}

/* Round the corners of the image inside the gallery modal */
.modal-body .img-fluid {
    border-radius: 12px;
    transition: box-shadow 0.3s ease;
}

/* Apply the glow to the image inside the modal */
.modal-content.glow-pink .modal-body .img-fluid { box-shadow: 0 0 25px 5px rgba(255, 105, 180, 0.8); }
.modal-content.glow-cyan .modal-body .img-fluid { box-shadow: 0 0 25px 5px rgba(0, 172, 193, 0.8); }
.modal-content.glow-green .modal-body .img-fluid { box-shadow: 0 0 25px 5px rgba(50, 205, 50, 0.8); }
.modal-content.glow-orange .modal-body .img-fluid { box-shadow: 0 0 25px 5px rgba(255, 165, 0, 0.8); }
.modal-content.glow-purple .modal-body .img-fluid { box-shadow: 0 0 25px 5px rgba(147, 112, 219, 0.8); }
.modal-content.glow-yellow .modal-body .img-fluid { box-shadow: 0 0 25px 5px rgba(255, 223, 0, 0.8); }

/* --- Product Page Tabs --- */
.product-tabs {
    border-bottom: 2px solid rgba(255, 255, 255, 0.2);
}

.product-tabs .nav-link {
    color: rgba(255, 255, 255, 0.7);
    border: none;
    border-bottom: 2px solid transparent;
    transition: all 0.3s ease;
    font-weight: 600;
    font-size: 1.1rem;
    padding: 0.75rem 1.25rem;
}

.product-tabs .nav-link:hover {
    color: #fff;
}

.product-tabs .nav-link.active {
    color: #fff;
    background-color: transparent;
    border-color: #fff;
}

/* --- Coming Soon Card Styles --- */
.coming-soon-card {
    /* Inherits .product-card's white background and dark text */
    border: 2px dashed #dee2e6; /* A light dashed border */
    align-items: center;
    justify-content: center;
}

.coming-soon-card .product-image-container i {
    color: #adb5bd !important; /* Softer color for the icon */
}

/* --- Product Modal Styles --- */
.product-modal-trigger {
    text-decoration: none;
    display: block;
    transition: transform 0.2s ease-in-out;
}
.product-modal-trigger:hover {
    transform: scale(1.02);
}

.product-detail-modal .modal-content {
    background-color: #fff; /* White background for the modal */
    border: none;
    overflow: hidden; /* Ensure child elements respect the border-radius */
    border-radius: 15px;
    color: #212529; /* Dark text for readability */
}

/* Ensure images inside the product modal are also rounded */
.product-detail-modal .modal-product-image {
    border-radius: 10px;
    transition: opacity 0.2s ease-in-out;
}

.product-detail-modal .modal-header {
    border-bottom: 1px solid #dee2e6; /* Standard light border */
}

.product-detail-modal .modal-footer {
    border-top: 1px solid #dee2e6; /* Standard light border */
}

.product-feature-list li {
    display: flex;
    align-items: flex-start;
    margin-bottom: 0.75rem;
    color: #212529; /* Ensure list item text is dark */
}
.product-feature-list i {
    color: var(--brand-primary);
    margin-right: 0.75rem;
    margin-top: 0.2rem;
}

/* Ensure all text inside the white modal is dark and readable */
.product-detail-modal .modal-body .lead {
    color: #495057; /* A slightly softer dark color for lead paragraphs */
}

/* Ensure regular paragraphs in the modal are also dark */
.product-detail-modal .modal-body p {
    color: #212529;
}

/* --- Product Modal Colour Banner (New Simple Style) --- */
.colour-banner {
    /* No longer an angled banner */
    font-size: 1.2rem;
    font-weight: bold;
    color: #212529; /* Dark text */
    transition: opacity 0.3s ease;
    opacity: 0;
    height: 1.5em; /* Reserve space to prevent layout-jump */
    margin-top: 1rem;
}

.colour-banner.visible {
    opacity: 1; /* Simple fade-in */
}

/* --- Review System Styles --- */
.star-rating-input {
    display: flex;
    flex-direction: row-reverse; /* Makes the stars fill from left to right */
    justify-content: flex-end;
}

.star-rating-input input[type="radio"] {
    display: none;
}

.star-rating-input label {
    font-size: 2rem;
    color: #e0e0e0; /* Light grey for empty stars */
    cursor: pointer;
    transition: color 0.2s;
}

.star-rating-input input[type="radio"]:checked ~ label,
.star-rating-input label:hover,
.star-rating-input label:hover ~ label {
    color: #ffc107; /* Bootstrap warning/gold color */
}

.review-card {
    border-left: 4px solid var(--brand-primary);
    background-color: #f8f9fa;
}


/* --- Premium Footer Styles --- */
.site-footer {
    background: rgba(2, 48, 71, 0.8); /* Match navbar-glass background with the new blue tint */
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-top: 1px solid rgba(255, 255, 255, 0.1); /* Subtle top border */
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.3); /* Upward shadow for depth */
    color: #FDFFFC; /* Off-white text */
    font-size: 0.9rem;
}

.site-footer h5 {
    color: #fff;
    font-weight: 600;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: color 0.2s ease-in-out;
}

.footer-links a:hover {
    color: var(--brand-primary);
}

.footer-social a:hover {
    color: var(--brand-primary) !important;
    transform: scale(1.1);
}

/* --- Visual Journey Scrolling Banner --- */
.scrolling-banner-container {
    width: 100%;
    overflow: hidden;
    -webkit-mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
    mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
}

.scrolling-banner {
    display: flex;
    width: fit-content; /* Let the width be determined by its content */
    animation: scroll-left 120s linear infinite;
}

.scrolling-image {
    height: 150px; /* A small, consistent height */
    width: auto;
    margin: 0 10px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    object-fit: cover;
}

@keyframes scroll-left {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%); /* Scroll by half the total width (the original set of images) */
    }
}

/* --- New Styles for Product Detail Page Image --- */
.product-detail-main-image {
    max-height: 450px;
    width: auto;
    max-width: 100%;
    object-fit: contain;
    padding: 1rem; /* Give the image some breathing room */
    border-radius: 15px;
    transition: all 0.4s ease; /* Smooth transition for glow and other effects */
}

/* --- New Styles for Expanded Product Card on Detail Page --- */
.product-detail-card {
    background-color: #fff; /* White background like the original cards */
    color: #212529; /* Dark text for readability */
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    /* New: Add a subtle radial gradient to the background to make the image pop */
    background: radial-gradient(circle at 50% 50%, 
        #ffffff 0%, 
        #ffffff 70%, 
        #f0f2f5 100%
    );
}

.product-detail-card .list-unstyled li {
    color: #212529; /* Ensure list items inside the card are dark */
    text-shadow: none; /* Remove any inherited text shadow */
}

/* --- Custom Takealot Button --- */
.btn-takealot {
    background-color: #fff; /* White fill */
    color: #0054a6; /* Blue text/icon color */
    border: 2px solid #0054a6; /* Blue outline */
    border-radius: 8px; /* Rounded edges */
    padding: 10px 15px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.btn-takealot:hover {
    background-color: #0054a6; /* Blue fill on hover */
    color: #fff; /* White text/icon on hover */
    border-color: #0054a6; /* Ensure border color remains consistent */
}
