/* ========================================
   djo Streetwear - Main Stylesheet
   Bold Urban Moroccan Aesthetic
   ======================================== */

/* Import Distinctive Fonts */
@import url('https://fonts.googleapis.com/css2?family=Barlow+Condensed:wght@400;500;600;700;800;900&family=Montserrat:wght@300;400;500;600;700;800;900&display=swap');

/* CSS Variables - Brand Colors */
:root {
    /* Primary Colors - From Logo */
    --navy-dark: #1a2744;
    --navy-primary: #2d3f5f;
    --gold: #c9a962;
    --cream: #e8dcc4;
    --white: #ffffff;
    
    /* Accent Colors */
    --gold-light: #d9b872;
    --gold-dark: #b09252;
    --navy-light: #3d4f6f;
    --cream-dark: #d8ccb4;
    
    /* Utility Colors */
    --success: #10b981;
    --error: #ef4444;
    --warning: #f59e0b;
    
    /* Typography */
    --font-display: 'Barlow Condensed', sans-serif;
    --font-body: 'Montserrat', sans-serif;
    
    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 1.5rem;
    --spacing-lg: 2.5rem;
    --spacing-xl: 4rem;
    
    /* Border Radius */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    
    /* Shadows */
    --shadow-sm: 0 2px 8px rgba(26, 39, 68, 0.08);
    --shadow-md: 0 4px 16px rgba(26, 39, 68, 0.12);
    --shadow-lg: 0 8px 32px rgba(26, 39, 68, 0.16);
    --shadow-glow: 0 0 30px rgba(201, 169, 98, 0.3);
    
    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-base: 0.3s ease;
    --transition-slow: 0.5s ease;
}

/* ========================================
   Reset & Base Styles
   ======================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
    /* Prevent horizontal scroll on mobile */
    overflow-x: hidden;
}

body {
    font-family: var(--font-body);
    background: var(--white);
    color: var(--navy-dark);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    /* Better text rendering on mobile */
    -webkit-text-size-adjust: 100%;
    -moz-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

/* Arabic/RTL Support */
body[dir="rtl"] {
    direction: rtl;
    text-align: right;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition-fast);
}

button {
    border: none;
    background: none;
    cursor: pointer;
    font-family: inherit;
    transition: var(--transition-fast);
}

input, textarea, select {
    font-family: inherit;
    font-size: inherit;
}

/* ========================================
   Typography
   ======================================== */

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-display);
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: -0.02em;
    text-transform: uppercase;
}

h1 {
    font-size: clamp(2.5rem, 8vw, 5rem);
    color: var(--navy-dark);
}

h2 {
    font-size: clamp(2rem, 6vw, 3.5rem);
    color: var(--navy-dark);
}

h3 {
    font-size: clamp(1.5rem, 4vw, 2.5rem);
}

h4 {
    font-size: clamp(1.25rem, 3vw, 1.8rem);
}

p {
    font-size: 1rem;
    line-height: 1.8;
    color: var(--navy-primary);
}

.text-gold {
    color: var(--gold);
}

.text-cream {
    color: var(--cream);
}

/* ========================================
   Layout Utilities
   ======================================== */

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 1rem; /* Reduced padding for mobile */
}

@media (min-width: 768px) {
    .container {
        padding: 0 var(--spacing-md);
    }
}

.container-narrow {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 1rem;
}

@media (min-width: 768px) {
    .container-narrow {
        padding: 0 var(--spacing-md);
    }
}

.section {
    padding: 2rem 0; /* Reduced for mobile */
}

@media (min-width: 768px) {
    .section {
        padding: var(--spacing-xl) 0;
    }
}

.grid {
    display: grid;
    gap: 1rem; /* Smaller gap on mobile */
}

@media (min-width: 768px) {
    .grid {
        gap: var(--spacing-md);
    }
}

.grid-2 {
    grid-template-columns: 1fr; /* Single column on mobile */
}

@media (min-width: 640px) {
    .grid-2 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 968px) {
    .grid-2 {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    }
}

.grid-3 {
    grid-template-columns: 1fr; /* Single column on mobile */
}

@media (min-width: 640px) {
    .grid-3 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 968px) {
    .grid-3 {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    }
}

.grid-4 {
    grid-template-columns: 1fr; /* Single column on mobile */
}

@media (min-width: 640px) {
    .grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 968px) {
    .grid-4 {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    }
}

/* ========================================
   Navigation Header
   ======================================== */

.header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 2px solid var(--navy-dark);
    box-shadow: var(--shadow-md);
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem; /* Smaller padding on mobile */
    gap: 0.5rem;
}

@media (min-width: 768px) {
    .header-container {
        padding: var(--spacing-sm) var(--spacing-md);
        gap: var(--spacing-md);
    }
}

/* Logo */
.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--font-display);
    font-size: 1.8rem; /* Smaller on mobile */
    font-weight: 900;
    color: var(--navy-dark);
    letter-spacing: -0.05em;
    text-transform: lowercase;
    position: relative;
    z-index: 1001;
}

@media (min-width: 768px) {
    .logo {
        font-size: 2.5rem;
    }
}

.logo img {
    height: 40px; /* Smaller on mobile */
    width: auto;
}

@media (min-width: 768px) {
    .logo img {
        height: 50px;
    }
}

.logo:hover {
    color: var(--gold);
    transform: scale(1.05);
}

/* Navigation */
.nav {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

@media (min-width: 968px) {
    .nav {
        gap: var(--spacing-lg);
    }
}

.nav-links {
    display: flex;
    gap: var(--spacing-lg);
    list-style: none;
    /* Hidden on mobile by default */
    position: fixed;
    top: 0;
    left: -100%;
    width: 80%;
    max-width: 300px;
    height: 100vh;
    background: var(--white);
    flex-direction: column;
    padding: 5rem 2rem 2rem;
    transition: left var(--transition-base);
    box-shadow: var(--shadow-lg);
    overflow-y: auto;
    z-index: 1000;
}

.nav-links.active {
    left: 0;
}

@media (min-width: 968px) {
    .nav-links {
        position: static;
        width: auto;
        max-width: none;
        height: auto;
        flex-direction: row;
        padding: 0;
        box-shadow: none;
        background: transparent;
    }
}

.nav-link {
    font-family: var(--font-display);
    font-size: 1.3rem; /* Larger on mobile for easy tapping */
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--navy-dark);
    padding: 1rem 0;
    position: relative;
    border-bottom: 1px solid var(--cream);
}

@media (min-width: 968px) {
    .nav-link {
        font-size: 1.1rem;
        padding: 0.5rem 0;
        border-bottom: none;
    }
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 3px;
    background: var(--gold);
    transition: width var(--transition-base);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

.nav-link:hover {
    color: var(--gold);
}

/* Language Switcher */
.lang-switcher {
    display: flex;
    gap: 0.3rem;
    background: var(--navy-dark);
    padding: 0.3rem 0.4rem;
    border-radius: var(--radius-lg);
}

@media (min-width: 768px) {
    .lang-switcher {
        gap: 0.5rem;
        padding: 0.4rem 0.6rem;
    }
}

.lang-btn {
    font-family: var(--font-display);
    font-size: 0.8rem;
    font-weight: 700;
    padding: 0.3rem 0.6rem;
    color: var(--cream);
    border-radius: var(--radius-md);
    transition: var(--transition-fast);
    min-width: 32px; /* Better tap target on mobile */
    text-align: center;
}

@media (min-width: 768px) {
    .lang-btn {
        font-size: 0.9rem;
        padding: 0.3rem 0.8rem;
    }
}

.lang-btn:hover {
    background: var(--navy-light);
}

.lang-btn.active {
    background: var(--gold);
    color: var(--navy-dark);
}

/* Cart Icon */
.cart-icon {
    position: relative;
    font-size: 1.3rem; /* Better tap target */
    color: var(--navy-dark);
    padding: 0.5rem;
    min-width: 44px; /* Minimum mobile tap target */
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
}

@media (min-width: 768px) {
    .cart-icon {
        font-size: 1.5rem;
    }
}

.cart-count {
    position: absolute;
    top: 0;
    right: 0;
    background: var(--gold);
    color: var(--navy-dark);
    font-size: 0.7rem;
    font-weight: 700;
    padding: 0.2rem 0.4rem;
    border-radius: 50%;
    min-width: 18px;
    text-align: center;
    line-height: 1;
}

@media (min-width: 768px) {
    .cart-count {
        font-size: 0.75rem;
        padding: 0.2rem 0.5rem;
        min-width: 20px;
    }
}

/* Mobile Menu Toggle */
.menu-toggle {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 0.5rem;
    z-index: 1001;
    min-width: 44px; /* Minimum tap target */
    min-height: 44px;
    justify-content: center;
    align-items: center;
}

@media (min-width: 968px) {
    .menu-toggle {
        display: none;
    }
}

.menu-toggle span {
    width: 25px;
    height: 3px;
    background: var(--navy-dark);
    transition: var(--transition-fast);
    border-radius: 2px;
}

.menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(7px, 7px);
}

.menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

/* Mobile menu overlay */
.nav-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(26, 39, 68, 0.5);
    z-index: 999;
}

.nav-overlay.active {
    display: block;
}

@media (min-width: 968px) {
    .nav-overlay {
        display: none !important;
    }
}

/* ========================================
   Hero Section
   ======================================== */

.hero {
    position: relative;
    min-height: 60vh; /* Shorter on mobile */
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, var(--navy-dark) 0%, var(--navy-primary) 100%);
    overflow: hidden;
    padding: 2rem 0;
}

@media (min-width: 768px) {
    .hero {
        min-height: 70vh;
        padding: 3rem 0;
    }
}

@media (min-width: 1024px) {
    .hero {
        min-height: 80vh;
    }
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg"><rect fill="rgba(201,169,98,0.05)" width="50" height="50"/><rect fill="rgba(201,169,98,0.03)" x="50" width="50" height="50"/><rect fill="rgba(201,169,98,0.03)" y="50" width="50" height="50"/><rect fill="rgba(201,169,98,0.05)" x="50" y="50" width="50" height="50"/></svg>');
    animation: patternMove 20s linear infinite;
}

@keyframes patternMove {
    0% { transform: translate(0, 0); }
    100% { transform: translate(100px, 100px); }
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 100%;
    text-align: center; /* Center on mobile */
}

@media (min-width: 768px) {
    .hero-content {
        max-width: 700px;
        text-align: left;
    }
}

.hero h1 {
    color: var(--white);
    margin-bottom: 1rem;
    animation: slideInLeft 0.8s ease;
    font-size: clamp(2.5rem, 12vw, 5rem);
}

@media (min-width: 768px) {
    .hero h1 {
        margin-bottom: var(--spacing-md);
    }
}

.hero-tagline {
    font-family: var(--font-display);
    font-size: clamp(1.3rem, 5vw, 2.5rem);
    font-weight: 600;
    color: var(--gold);
    margin-bottom: 1rem;
    animation: slideInLeft 0.8s ease 0.2s both;
}

@media (min-width: 768px) {
    .hero-tagline {
        margin-bottom: var(--spacing-lg);
    }
}

.hero p {
    color: var(--cream);
    font-size: 1rem;
    margin-bottom: 1.5rem;
    animation: slideInLeft 0.8s ease 0.4s both;
    line-height: 1.6;
}

@media (min-width: 768px) {
    .hero p {
        font-size: 1.1rem;
        margin-bottom: var(--spacing-lg);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Hero Image */
.hero-image {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.15; /* Very faded on mobile */
    pointer-events: none;
}

@media (min-width: 768px) {
    .hero-image {
        opacity: 0.25;
        width: 60%;
    }
}

@media (min-width: 1024px) {
    .hero-image {
        opacity: 0.3;
        width: 50%;
    }
}

.hero-image img {
    max-height: 70%;
    filter: drop-shadow(0 20px 60px rgba(201, 169, 98, 0.4));
    animation: float 6s ease-in-out infinite;
}

@media (min-width: 768px) {
    .hero-image img {
        max-height: 80%;
    }
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
}

/* ========================================
   Buttons
   ======================================== */

.btn {
    display: inline-block;
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.9rem 1.8rem;
    border-radius: var(--radius-lg);
    transition: all var(--transition-base);
    position: relative;
    overflow: hidden;
    text-align: center;
    /* Better tap target on mobile */
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

@media (min-width: 768px) {
    .btn {
        font-size: 1.1rem;
        padding: 1rem 2.5rem;
    }
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn:hover::before {
    width: 300px;
    height: 300px;
}

.btn:active {
    transform: scale(0.95);
}

.btn-primary {
    background: var(--gold);
    color: var(--navy-dark);
    box-shadow: 0 4px 20px rgba(201, 169, 98, 0.4);
}

.btn-primary:hover {
    background: var(--gold-light);
    transform: translateY(-2px);
    box-shadow: 0 6px 30px rgba(201, 169, 98, 0.6);
}

.btn-secondary {
    background: transparent;
    color: var(--white);
    border: 2px solid var(--gold);
}

.btn-secondary:hover {
    background: var(--gold);
    color: var(--navy-dark);
}

.btn-dark {
    background: var(--navy-dark);
    color: var(--white);
}

.btn-dark:hover {
    background: var(--navy-primary);
    transform: translateY(-2px);
}

/* Full width button on mobile */
.btn-block {
    width: 100%;
    display: flex;
}

@media (min-width: 768px) {
    .btn-block {
        width: auto;
        display: inline-flex;
    }
}

/* ========================================
   Product Cards
   ======================================== */

.product-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-base);
    position: relative;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

@media (max-width: 767px) {
    .product-card:active {
        transform: scale(0.98);
    }
}

.product-image {
    position: relative;
    width: 100%;
    padding-top: 100%;
    background: var(--cream);
    overflow: hidden;
    display: block;
    text-decoration: none;
}

.product-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-slow);
    z-index: 1;
}

.product-card:hover .product-image img {
    transform: scale(1.05);
}

@media (max-width: 767px) {
    .product-card:active .product-image img {
        transform: scale(1.05);
    }
}

/* Product Badges */
.product-badge {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background: var(--gold);
    color: var(--navy-dark);
    font-family: var(--font-display);
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    padding: 0.3rem 0.6rem;
    border-radius: var(--radius-md);
    z-index: 2;
}

@media (min-width: 768px) {
    .product-badge {
        top: var(--spacing-sm);
        right: var(--spacing-sm);
        font-size: 0.75rem;
        padding: 0.4rem 0.8rem;
    }
}

.product-badge.new {
    background: var(--success);
    color: var(--white);
}

.product-badge.limited {
    background: var(--error);
    color: var(--white);
}

/* Product Info */
.product-info {
    padding: 1rem;
}

@media (min-width: 768px) {
    .product-info {
        padding: var(--spacing-md);
    }
}

.product-category {
    font-family: var(--font-display);
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--gold);
    letter-spacing: 0.1em;
    margin-bottom: 0.4rem;
}

@media (min-width: 768px) {
    .product-category {
        font-size: 0.85rem;
        margin-bottom: 0.5rem;
    }
}

.product-name {
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--navy-dark);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    line-height: 1.3;
    /* Prevent text overflow on mobile */
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

@media (min-width: 768px) {
    .product-name {
        font-size: 1.3rem;
    }
}

.product-price {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--font-display);
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--navy-dark);
    flex-wrap: wrap;
}

@media (min-width: 768px) {
    .product-price {
        font-size: 1.4rem;
    }
}

.product-price .original-price {
    font-size: 0.9rem;
    color: var(--navy-light);
    text-decoration: line-through;
    opacity: 0.6;
}

@media (min-width: 768px) {
    .product-price .original-price {
        font-size: 1rem;
    }
}

/* ========================================
   Sections
   ======================================== */

.section-header {
    text-align: center;
    margin-bottom: var(--spacing-xl);
}

.section-title {
    position: relative;
    display: inline-block;
    margin-bottom: var(--spacing-sm);
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: var(--gold);
}

.section-subtitle {
    font-size: 1.1rem;
    color: var(--navy-primary);
    max-width: 600px;
    margin: 0 auto;
}

/* ========================================
   Footer
   ======================================== */

.footer {
    background: var(--navy-dark);
    color: var(--cream);
    padding: var(--spacing-xl) 0 var(--spacing-md);
    margin-top: var(--spacing-xl);
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--spacing-lg);
    margin-bottom: var(--spacing-lg);
}

.footer-section h4 {
    color: var(--gold);
    margin-bottom: var(--spacing-md);
    font-size: 1.2rem;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 0.8rem;
}

.footer-links a {
    color: var(--cream);
    transition: var(--transition-fast);
}

.footer-links a:hover {
    color: var(--gold);
    padding-left: 5px;
}

.social-links {
    display: flex;
    gap: var(--spacing-sm);
    margin-top: var(--spacing-sm);
}

.social-link {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--navy-primary);
    border-radius: 50%;
    color: var(--gold);
    font-size: 1.2rem;
    transition: var(--transition-fast);
}

.social-link:hover {
    background: var(--gold);
    color: var(--navy-dark);
    transform: translateY(-3px);
}

.footer-bottom {
    text-align: center;
    padding-top: var(--spacing-md);
    border-top: 1px solid var(--navy-primary);
    color: var(--cream-dark);
}

/* ========================================
   Responsive Design
   ======================================== */

/* Small Mobile Devices (< 480px) */
@media (max-width: 479px) {
    html {
        font-size: 15px; /* Slightly smaller base font */
    }
    
    .section-title {
        font-size: clamp(1.8rem, 8vw, 2.5rem);
    }
    
    .btn {
        font-size: 0.95rem;
        padding: 0.85rem 1.5rem;
    }
}

/* Mobile Devices (< 640px) */
@media (max-width: 639px) {
    .hero {
        min-height: 55vh;
    }
    
    .hero-content {
        padding: 1rem;
    }
    
    .section {
        padding: 1.5rem 0;
    }
    
    .section-header {
        margin-bottom: 1.5rem;
    }
    
    /* Stack buttons vertically on very small screens */
    .hero-buttons {
        flex-direction: column;
        width: 100%;
    }
    
    .hero-buttons .btn {
        width: 100%;
    }
}

/* Tablet Devices (640px - 968px) */
@media (min-width: 640px) and (max-width: 967px) {
    .nav-links {
        position: fixed;
        top: 0;
        left: -100%;
        width: 70%;
        max-width: 350px;
    }
}

/* Desktop (> 968px) - already handled above */

/* Landscape Mobile */
@media (max-height: 600px) and (orientation: landscape) {
    .hero {
        min-height: 90vh;
    }
    
    .nav-links {
        padding: 3rem 2rem 2rem;
    }
}

/* High DPI / Retina Displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .product-image img,
    .hero-image img {
        image-rendering: -webkit-optimize-contrast;
    }
}

/* Accessibility - Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* Dark Mode Support (Optional) */
@media (prefers-color-scheme: dark) {
    /* Can be enabled if needed */
}

/* ========================================
   Utility Classes
   ======================================== */

.text-center { text-align: center; }
.text-right { text-align: right; }
.text-left { text-align: left; }

.mt-sm { margin-top: var(--spacing-sm); }
.mt-md { margin-top: var(--spacing-md); }
.mt-lg { margin-top: var(--spacing-lg); }
.mb-sm { margin-bottom: var(--spacing-sm); }
.mb-md { margin-bottom: var(--spacing-md); }
.mb-lg { margin-bottom: var(--spacing-lg); }

.hidden { display: none; }

/* Mobile-specific utilities */
@media (max-width: 767px) {
    .hide-mobile { display: none !important; }
    .show-mobile { display: block !important; }
}

@media (min-width: 768px) {
    .hide-desktop { display: none !important; }
}

/* Loading Animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid var(--cream);
    border-top-color: var(--gold);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ========================================
   Mobile Touch Optimizations
   ======================================== */

/* Better tap highlight */
* {
    -webkit-tap-highlight-color: rgba(201, 169, 98, 0.3);
}

/* Smooth scrolling on iOS */
body {
    -webkit-overflow-scrolling: touch;
}

/* Prevent text selection on buttons and interactive elements */
button,
.btn,
.nav-link,
.product-card {
    -webkit-user-select: none;
    -moz-user-select: none;
    user-select: none;
}

/* Allow text selection in content areas */
p,
h1, h2, h3, h4, h5, h6,
li,
.product-description {
    -webkit-user-select: text;
    -moz-user-select: text;
    user-select: text;
}

/* Improve touch scrolling */
.nav-links,
.cart-items,
.product-list {
    -webkit-overflow-scrolling: touch;
}

/* Prevent zoom on input focus (iOS) */
input[type="text"],
input[type="email"],
input[type="tel"],
input[type="number"],
input[type="password"],
textarea,
select {
    font-size: 16px; /* Prevents zoom on iOS */
}

/* Better focus states for keyboard navigation */
*:focus-visible {
    outline: 3px solid var(--gold);
    outline-offset: 2px;
}

/* Remove outline for mouse users */
*:focus:not(:focus-visible) {
    outline: none;
}

/* ========================================
   Safe Area Insets for Notched Devices
   ======================================== */

@supports (padding: max(0px)) {
    .header-container {
        padding-left: max(1rem, env(safe-area-inset-left));
        padding-right: max(1rem, env(safe-area-inset-right));
    }
    
    .container {
        padding-left: max(1rem, env(safe-area-inset-left));
        padding-right: max(1rem, env(safe-area-inset-right));
    }
    
    .footer {
        padding-bottom: max(var(--spacing-md), env(safe-area-inset-bottom));
    }
}