/* Global Typography - Puma Athletic Aesthetic */
@import url('https://fonts.googleapis.com/css2?family=Barlow+Condensed:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&family=Inter:wght@400;500;600;700&display=swap');

:root {
    --heading-font: 'Barlow Condensed', sans-serif;
    --body-font: 'Inter', sans-serif;

    /* Light Mode Variables (Default) */
    --bg-color: #f8f9fa;
    --section-bg: #ffffff;
    --text-color: #333333;
    --text-muted: #6c757d;
    --nav-bg: rgba(248, 249, 250, .85);
    --card-bg: #ffffff;
    --card-border: rgba(0, 0, 0, 0.05);
    --border-color: rgba(0, 0, 0, 0.06);
    --nav-link-color: #0f172a;
    --map-dot-grid: #e5e7eb;
}

/* Dark Mode Overrides */
body.dark-mode {
    --bg-color: #030712;
    --section-bg: #030712;
    --text-color: #f3f4f6;
    --text-muted: #94a3b8;
    --nav-bg: rgba(3, 7, 18, 0.6);
    --card-bg: #111827;
    --card-border: rgba(255, 255, 255, 0.1);
    --border-color: rgba(255, 255, 255, 0.1);
    --nav-link-color: #f3f4f6;
    --map-dot-grid: #1f2937;
}

body {
    font-family: var(--body-font);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    background-color: var(--bg-color);
    color: var(--text-color);
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Theme Toggle Button Styles */
.theme-toggle-btn {
    background: none;
    border: none;
    padding: 8px;
    margin-left: 15px;
    cursor: pointer;
    color: var(--nav-link-color);
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease, color 0.3s ease;
}

.theme-toggle-btn:hover {
    transform: rotate(15deg);
    color: #228dff;
}

.theme-toggle-btn i {
    transition: opacity 0.3s ease, transform 0.3s ease;
}

body.dark-mode .fa-moon {
    display: none;
}

body:not(.dark-mode) .fa-sun {
    display: none;
}

h1,
h2,
h3,
h4,
h5,
h6,
.display-1,
.display-2,
.display-3,
.display-4,
.display-5,
.display-6,
.navbar-brand,
.nav-link,
.btn,
.cta-title,
.gradient-text,
.footer-heading,
.admin-title {
    font-family: var(--heading-font) !important;
    text-transform: uppercase !important;
    font-weight: 700 !important;
    letter-spacing: -0.01em !important;
}

/* Specific adjustments to match Puma's tight spacing and bold look */
.display-3,
.display-5 {
    letter-spacing: -0.02em !important;
    line-height: 1.1;
}

.gradient-text {
    letter-spacing: -0.02em !important;
}

.nav-link {
    font-weight: 600 !important;
    font-size: 1.1rem !important;
    letter-spacing: 0.02em !important;
    color: var(--nav-link-color) !important;
}

/* IOS Nav Adaptations */
.ios-nav {
    background: var(--nav-bg) !important;
    border-bottom-color: var(--border-color) !important;
}

/* --- UI POLISH: OWL CAROUSEL EQUAL HEIGHTS (STRICTLY SCOPED) --- */
.owl-carousel .owl-stage {
    display: flex !important;
}

.owl-carousel .owl-item {
    display: flex !important;
    flex: 1 0 auto !important;
}

/* Card Adaptations for Public Carousels & Product Lists */
.owl-carousel .card,
.owl-carousel .product-card,
.owl-carousel .product-item,
.owl-carousel .lifestyle-card,
.owl-carousel .trending-card,
#product-list .card,
#product-list .product-card {
    background-color: var(--card-bg) !important;
    border-color: var(--card-border) !important;
    transition: transform 0.3s ease, box-shadow 0.3s ease, background-color 0.3s ease !important;
    height: 100% !important;
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
}

/* Base Card Styling (Unscoped, used in admin) */
.card {
    background-color: var(--card-bg);
    border-color: var(--card-border);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* Fix Product Image to be EXACTLY the same size (Cookie-Cutter) - Scoped to Public Frontends */
.owl-carousel .position-relative,
#product-list .position-relative,
.owl-carousel .card-img-top,
#product-list .card-img-top {
    height: 300px !important;
    /* Final fixed height for deployment consistency */
    flex-shrink: 0 !important;
    width: 100% !important;
}

/* Categorgy Grid Specific Fix (Home) */
#collections-carousel .category-card img {
    height: 100% !important;
}

.owl-carousel img,
#product-list img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    display: block !important;
}

/* Push Buttons to Bottom (Alignment Fix) - Scoped to Public UI */
.owl-carousel .card-body,
#product-list .card-body,
.owl-carousel .product-content {
    flex-grow: 1 !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: space-between !important;
    padding: 1.25rem !important;
}

.card:hover,
.product-card:hover,
.product-item:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.2) !important;
}

/* Custom Puma Button - Sliding Hover Fill */
.btn-dark-puma {
    background-color: transparent;
    color: #111827;
    border: 2px solid #111827;
    transition: all 0.3s ease;
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.05em;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.btn-dark-puma::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 0%;
    height: 100%;
    background-color: #111827;
    transition: width 0.3s ease-in-out;
    z-index: -1;
}

.btn-dark-puma:hover {
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}


.btn-dark-puma:hover::before {
    width: 100%;
}

/* Light Puma Button (For Dark Backgrounds) - Sliding Hover Fill */
.btn-light-puma {
    background-color: transparent;
    color: #ffffff;
    border: 2px solid #ffffff;
    transition: all 0.3s ease;
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.05em;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.btn-light-puma::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 0%;
    height: 100%;
    background-color: #374151;
    /* Dark Grey Fill (Default) */
    transition: width 0.3s ease-in-out;
    z-index: -1;
}

.btn-light-puma:hover {
    color: #ffffff;
    /* White Text (Default) */
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 255, 255, 0.1);
}

.btn-light-puma:hover::before {
    width: 100%;
}

/* Dark Mode Button Overrides - Ensure All Buttons Are Visible */
body.dark-mode .btn,
body.dark-mode .btn-primary,
body.dark-mode .btn-dark,
body.dark-mode .btn-dark-puma,
body.dark-mode button {
    color: #ffffff !important;
}

body.dark-mode .btn-dark-puma {
    border-color: #ffffff !important;
}

body.dark-mode .btn-dark-puma::before {
    background-color: #374151 !important;
}

body.dark-mode .btn-dark-puma:hover {
    color: #ffffff !important;
}

body.dark-mode .btn:hover,
body.dark-mode .btn-primary:hover,
body.dark-mode .btn-dark:hover {
    color: #ffffff !important;
}

/* Dark Mode Text Overrides - Ensure Visibility */
body.dark-mode .text-dark,
body.dark-mode h1.text-dark,
body.dark-mode h2.text-dark,
body.dark-mode h3.text-dark,
body.dark-mode h4.text-dark,
body.dark-mode h5.text-dark,
body.dark-mode h6.text-dark {
    color: #ffffff !important;
}

body.dark-mode .text-muted,
body.dark-mode .text-secondary {
    color: var(--text-muted) !important;
}

/* Icons with text-dark should be white */
body.dark-mode i.text-dark,
body.dark-mode .fa.text-dark,
body.dark-mode .fas.text-dark,
body.dark-mode .far.text-dark,
body.dark-mode .fab.text-dark {
    color: #ffffff !important;
}

/* Ensure all headings are visible */
body.dark-mode h1,
body.dark-mode h2,
body.dark-mode h3,
body.dark-mode h4,
body.dark-mode h5,
body.dark-mode h6,
body.dark-mode .h1,
body.dark-mode .h2,
body.dark-mode .h3,
body.dark-mode .h4,
body.dark-mode .h5,
body.dark-mode .h6 {
    color: var(--text-color) !important;
}

/* Background overrides */
body.dark-mode .bg-white,
body.dark-mode .bg-light,
body.dark-mode .glass {
    background-color: var(--section-bg) !important;
}

body.dark-mode .glass {
    background: rgba(17, 24, 39, 0.7) !important;
    border-color: rgba(255, 255, 255, 0.1) !important;
}

/* Badge text should be readable */
body.dark-mode .badge.bg-white {
    background-color: var(--card-bg) !important;
    color: var(--text-color) !important;
}

/* Ensure fw-bold and fw-semibold text is visible */
body.dark-mode .fw-bold,
body.dark-mode .fw-semibold {
    color: inherit;
}

body.dark-mode .fw-bold.text-dark,
body.dark-mode .fw-semibold.text-dark {
    color: #ffffff !important;
}

/* Form elements - labels, inputs, text */
body.dark-mode label,
body.dark-mode .form-label {
    color: var(--text-color) !important;
}

body.dark-mode p,
body.dark-mode .lead {
    color: var(--text-color);
}

body.dark-mode p.text-muted,
body.dark-mode .lead.text-muted {
    color: var(--text-muted) !important;
}

body.dark-mode strong {
    color: inherit;
}

body.dark-mode a {
    color: #60a5fa;
}

body.dark-mode a:hover {
    color: #93c5fd;
}

/* Form controls */
body.dark-mode .form-control,
body.dark-mode input.form-control,
body.dark-mode textarea.form-control {
    background-color: var(--card-bg) !important;
    border-color: var(--card-border) !important;
    color: var(--text-color) !important;
}

body.dark-mode .form-control:focus,
body.dark-mode input.form-control:focus,
body.dark-mode textarea.form-control:focus {
    background-color: var(--card-bg) !important;
    border-color: var(--nav-link-color) !important;
    color: var(--text-color) !important;
}

/* Search Bar - Always White (Override Dark Mode) */
body.dark-mode #global-search,
body.dark-mode #global-search:focus,
body.dark-mode #search-form .form-control,
body.dark-mode #search-form input.form-control {
    background-color: #ffffff !important;
    border-color: #ced4da !important;
    color: #333333 !important;
}

body.dark-mode #search-form .input-group-text,
body.dark-mode #search-icon {
    background-color: #ffffff !important;
    border-color: #ced4da !important;
    color: #6c757d !important;
}

body.dark-mode #global-search::placeholder {
    color: #6c757d !important;
}

/* Skeleton Loading Animation */
.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
}

body.dark-mode .skeleton {
    background: linear-gradient(90deg, #1f2937 25%, #111827 50%, #1f2937 75%);
}

@keyframes skeleton-loading {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

/* Global Transition for Interactive Elements */
a,
button,
.nav-link,
.dropdown-item {
    transition: color 0.2s ease, background-color 0.2s ease, transform 0.2s ease !important;

}

/* Utility Class for Barlow Condensed */
.athletic-font {
    font-family: var(--heading-font) !important;
    text-transform: uppercase !important;
    letter-spacing: 0.02em !important;
}

/* Footer Global Font Fixes */
.site-footer span,
.site-footer p,
.site-footer a,
.site-footer li,
.site-footer .footer-heading {
    font-family: var(--heading-font) !important;
    text-transform: uppercase !important;
}

/* --- UI POLISH: OWL CAROUSEL NAV --- */
.owl-carousel {
    position: relative !important;
}

.owl-carousel .owl-nav button.owl-prev,
.owl-carousel .owl-nav button.owl-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    background: rgba(0, 0, 0, 0.5) !important;
    color: #fff !important;
    border-radius: 50%;
    font-size: 24px !important;
    display: flex !important;
    align-items: center;
    justify-content: center;
    z-index: 10;
    transition: background 0.3s ease;
}

.owl-carousel .owl-nav button.owl-prev:hover,
.owl-carousel .owl-nav button.owl-next:hover {
    background: rgba(0, 0, 0, 0.8) !important;
}

.owl-carousel .owl-nav button.owl-prev {
    left: -20px;
}

.owl-carousel .owl-nav button.owl-next {
    right: -20px;
}

/* --- UI POLISH: HERO BUTTON STYLING (FORCED WHITE) --- */
.hero-content .btn {
    color: #fff !important;
    border: 2px solid #fff !important;
    background: transparent !important;
    transition: all 0.3s ease;
    /* Restore smooth animation */
}

/* Hover State - Fill with Accent */
.hero-content .btn:hover {
    background-color: #ff6b6b !important;
    border-color: #ff6b6b !important;
    color: #fff !important;
    transform: translateY(-3px);
    /* Subtle lift effect */
}

/* --- UI POLISH: WORLD MAP LIGHT MODE DESATURATION --- */
/* Light Mode (Default) - Map is Greyed out but with High Contrast for Prominence */
.vector-map-img {
    filter: grayscale(60%) contrast(1.5) brightness(0.8);
    opacity: 0.85;
    transition: all 0.5s ease;
}

/* Dark Mode Override - Map is vibrant again */
body.dark-mode .vector-map-img {
    filter: none;
    opacity: 1;
}

/* --- UI POLISH: NEW ARRIVALS CAROUSEL UNIFORMITY (STRICTLY SCOPED) --- */
#new-arrivals-carousel .owl-stage {
    display: flex !important;
}

#new-arrivals-carousel .owl-item {
    display: flex !important;
    flex: 1 0 auto !important;
}

#new-arrivals-carousel .product-item {
    display: flex !important;
    flex-direction: column !important;
    height: 100% !important;
    width: 100% !important;
}

#new-arrivals-carousel .product-item img {
    height: 300px !important;
    /* Fixed height is mandatory for uniformity */
    width: 100% !important;
    object-fit: cover !important;
}