/**
 * Store CMS - Main Stylesheet
 * Modern Light Theme - Clean & Professional
 */

/* ========================================
   CSS Variables - Light Theme
======================================== */
:root {
    /* Colors */
    --primary: #111827;
    --primary-light: #1f2937;
    --secondary: #4b5563;
    --accent: #2563eb;
    --accent-hover: #1d4ed8;
    --accent-light: rgba(37, 99, 235, 0.08);
    
    --text-primary: #111827;
    --text-secondary: #4b5563;
    --text-muted: #9ca3af;
    
    --bg-primary: #ffffff;
    --bg-secondary: #f9fafb;
    --bg-tertiary: #f3f4f6;
    --bg-card: #ffffff;
    
    --border-color: #e5e7eb;
    --border-light: #f3f4f6;
    
    --success: #059669;
    --warning: #d97706;
    --danger: #dc2626;
    --info: #0284c7;
    
    /* Shadows */
    --shadow-xs: 0 1px 2px 0 rgba(0,0,0,0.03);
    --shadow-sm: 0 1px 3px 0 rgba(0,0,0,0.06), 0 1px 2px -1px rgba(0,0,0,0.06);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.07), 0 2px 4px -2px rgba(0,0,0,0.07);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.08), 0 4px 6px -4px rgba(0,0,0,0.08);
    --shadow-xl: 0 20px 25px -5px rgba(0,0,0,0.08), 0 8px 10px -6px rgba(0,0,0,0.08);
    
    /* Spacing */
    --container-max: 1320px;
    --header-height: 80px;
    
    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-base: 250ms ease;
    --transition-slow: 400ms cubic-bezier(0.4, 0, 0.2, 1);
    
    /* Border Radius */
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 14px;
    --radius-xl: 20px;
    --radius-full: 9999px;
}

/* RTL Support */
[dir="rtl"] {
    --font-primary: 'Noto Kufi Arabic', sans-serif;
}

/* ========================================
   Reset & Base
======================================== */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 15px;
    line-height: 1.6;
    color: var(--text-primary);
    background: var(--bg-secondary);
    overflow-x: hidden;
}

body.rtl {
    font-family: 'Noto Kufi Arabic', 'DM Sans', sans-serif;
}

a {
    color: inherit;
    text-decoration: none;
    transition: color var(--transition-fast);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

button {
    font-family: inherit;
    cursor: pointer;
}

ul, ol {
    list-style: none;
}

/* ========================================
   Utility Classes
======================================== */
.container {
    width: 100%;
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 24px;
}

.section {
    padding: 80px 0;
}

/* ========================================
   Buttons
======================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 13px 26px;
    font-size: 0.875rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-base);
    white-space: nowrap;
}

.btn-primary {
    background: var(--accent);
    color: white;
    box-shadow: 0 1px 2px rgba(37, 99, 235, 0.2);
}

.btn-primary:hover {
    background: var(--accent-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
}

.btn-secondary {
    background: var(--bg-primary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: var(--bg-tertiary);
    border-color: var(--text-muted);
}

.btn-outline {
    background: transparent;
    color: var(--accent);
    border: 2px solid var(--accent);
}

.btn-outline:hover {
    background: var(--accent);
    color: white;
}

.btn-lg {
    padding: 16px 32px;
    font-size: 1rem;
}

.btn-sm {
    padding: 9px 18px;
    font-size: 0.8125rem;
}

.btn-block {
    width: 100%;
}

.btn-icon {
    padding: 12px;
    border-radius: var(--radius-full);
}

/* ========================================
   Header
======================================== */
.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: var(--bg-primary);
    box-shadow: var(--shadow-sm);
}

.header-top {
    background: var(--primary);
    color: white;
}

.header-top-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 40px;
    font-size: 0.8125rem;
}

.language-selector {
    position: relative;
}

.lang-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    background: transparent;
    border: none;
    color: rgba(255,255,255,0.8);
    font-size: 0.8125rem;
    cursor: pointer;
    transition: color var(--transition-fast);
}

.lang-btn:hover {
    color: white;
}

.lang-btn i:last-child {
    font-size: 0.625rem;
}

.lang-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    margin-top: 8px;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    min-width: 150px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all var(--transition-base);
    box-shadow: var(--shadow-lg);
}

.language-selector:hover .lang-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.lang-option {
    display: block;
    padding: 10px 16px;
    color: var(--text-secondary);
    transition: all var(--transition-fast);
}

.lang-option:hover,
.lang-option.active {
    background: var(--bg-tertiary);
    color: var(--accent);
}

.header-contact {
    display: flex;
    gap: 24px;
}

.header-contact a {
    display: flex;
    align-items: center;
    gap: 8px;
    color: rgba(255,255,255,0.8);
}

.header-contact a:hover {
    color: white;
}

/* Header Main */
.header-main {
    padding: 16px 0;
}

.header-main-content {
    display: flex;
    align-items: center;
    gap: 40px;
}

.site-logo {
    flex-shrink: 0;
}

.site-logo img {
    height: 44px;
    width: auto;
}

.logo-text {
    font-size: 1.625rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    color: var(--primary);
}

/* Search */
.header-search {
    flex: 1;
    max-width: 480px;
    position: relative;
}

.search-form {
    display: flex;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-full);
    overflow: hidden;
    transition: all var(--transition-fast);
}

.search-form:focus-within {
    border-color: var(--accent);
    background: var(--bg-primary);
    box-shadow: 0 0 0 3px var(--accent-light);
}

.search-input {
    flex: 1;
    padding: 12px 20px;
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-size: 0.9375rem;
}

.search-input::placeholder {
    color: var(--text-muted);
}

.search-input:focus {
    outline: none;
}

.search-btn {
    padding: 12px 18px;
    background: transparent;
    border: none;
    color: var(--text-muted);
    transition: color var(--transition-fast);
}

.search-btn:hover {
    color: var(--accent);
}

/* Search Results */
.search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    margin-top: 8px;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    max-height: 420px;
    overflow-y: auto;
    display: none;
    z-index: 100;
}

.search-results.active {
    display: block;
}

.search-result-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 14px 18px;
    transition: background var(--transition-fast);
}

.search-result-item:hover {
    background: var(--bg-secondary);
}

.search-result-item img {
    width: 56px;
    height: 56px;
    object-fit: cover;
    border-radius: var(--radius-sm);
    background: var(--bg-tertiary);
}

.search-result-info {
    flex: 1;
}

.search-result-name {
    font-weight: 600;
    margin-bottom: 3px;
    color: var(--text-primary);
}

.search-result-price {
    color: var(--accent);
    font-weight: 700;
}

/* Header Actions */
.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.mobile-search-toggle {
    display: none;
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-size: 1.25rem;
    padding: 8px;
}

.cart-icon {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-full);
    font-size: 1.125rem;
    color: var(--text-primary);
    transition: all var(--transition-fast);
}

.cart-icon:hover {
    background: var(--accent);
    border-color: var(--accent);
    color: white;
}

.cart-count {
    position: absolute;
    top: -2px;
    right: -2px;
    min-width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--danger);
    color: white;
    font-size: 0.6875rem;
    font-weight: 700;
    border-radius: var(--radius-full);
    border: 2px solid var(--bg-primary);
}

.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    width: 28px;
    padding: 8px 0;
    background: transparent;
    border: none;
}

.mobile-menu-toggle span {
    display: block;
    height: 2px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: all var(--transition-fast);
}

/* Navigation */
.main-nav {
    background: var(--bg-primary);
    border-top: 1px solid var(--border-color);
}

.nav-list {
    display: flex;
    align-items: center;
}

.nav-list > li {
    position: relative;
}

.nav-list > li > a {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 16px 20px;
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--text-secondary);
    transition: color var(--transition-fast);
}

.nav-list > li > a:hover,
.nav-list > li.active > a {
    color: var(--accent);
}

.nav-list > li > a i {
    font-size: 0.5625rem;
    transition: transform var(--transition-fast);
}

.nav-list > li:hover > a i {
    transform: rotate(180deg);
}

/* Nav Dropdown */
.nav-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 220px;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 8px 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: all var(--transition-base);
    box-shadow: var(--shadow-lg);
    z-index: 100;
}

.nav-list > li:hover .nav-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.nav-dropdown a {
    display: block;
    padding: 11px 20px;
    color: var(--text-secondary);
    font-size: 0.9375rem;
    transition: all var(--transition-fast);
}

.nav-dropdown a:hover {
    background: var(--bg-secondary);
    color: var(--accent);
    padding-left: 24px;
}

/* Mobile Search */
.mobile-search {
    display: none;
    padding: 16px;
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
}

.mobile-search.active {
    display: block;
}

/* ========================================
   Hero Slider
======================================== */
.hero-slider {
    position: relative;
    height: 560px;
    overflow: hidden;
    background: var(--bg-tertiary);
}

.slider-container {
    height: 100%;
}

.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--transition-slow), visibility var(--transition-slow);
}

.slide.active {
    opacity: 1;
    visibility: visible;
}

.slide-image {
    position: absolute;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.slide::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(255,255,255,0.95) 0%, rgba(255,255,255,0.7) 50%, rgba(255,255,255,0.3) 100%);
}

.slide-content {
    position: relative;
    z-index: 1;
    height: 100%;
    display: flex;
    align-items: center;
}

.slide-title {
    font-size: clamp(2.25rem, 4vw, 3.5rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.15;
    margin-bottom: 16px;
    max-width: 550px;
    color: var(--primary);
}

.slide-subtitle {
    font-size: 1.0625rem;
    color: var(--text-secondary);
    margin-bottom: 28px;
    max-width: 480px;
    line-height: 1.7;
}

/* Animations */
.animate-fade-up {
    opacity: 0;
    transform: translateY(24px);
    animation: fadeUp 0.7s ease forwards;
}

.delay-1 { animation-delay: 0.15s; }
.delay-2 { animation-delay: 0.3s; }

@keyframes fadeUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Slider Navigation */
.slider-nav {
    position: absolute;
    bottom: 50%;
    left: 0;
    right: 0;
    transform: translateY(50%);
    display: flex;
    justify-content: space-between;
    padding: 0 32px;
    z-index: 10;
    pointer-events: none;
}

.slider-prev,
.slider-next {
    width: 52px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-full);
    color: var(--text-primary);
    font-size: 1.125rem;
    cursor: pointer;
    transition: all var(--transition-fast);
    pointer-events: auto;
    box-shadow: var(--shadow-md);
}

.slider-prev:hover,
.slider-next:hover {
    background: var(--accent);
    border-color: var(--accent);
    color: white;
}

.slider-dots {
    position: absolute;
    bottom: 28px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 10;
}

.dot {
    width: 10px;
    height: 10px;
    background: var(--border-color);
    border: none;
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.dot:hover,
.dot.active {
    background: var(--accent);
    transform: scale(1.3);
}

/* ========================================
   Section Headers
======================================== */
.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 40px;
}

.section-title {
    font-size: 1.75rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--primary);
}

.section-link {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--accent);
    font-weight: 600;
    font-size: 0.9375rem;
    transition: gap var(--transition-fast);
}

.section-link:hover {
    gap: 12px;
}

/* ========================================
   Categories Grid
======================================== */
.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
}

.categories-grid.large {
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
}

.category-card {
    position: relative;
    display: block;
    border-radius: var(--radius-xl);
    overflow: hidden;
    aspect-ratio: 4/3;
    background: var(--bg-tertiary);
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-base);
}

.category-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.category-image {
    position: absolute;
    width: 100%;
    height: 100%;
}

.category-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-slow);
}

.category-card:hover .category-image img {
    transform: scale(1.08);
}

.category-overlay {
    position: absolute;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top, rgba(17, 24, 39, 0.85) 0%, rgba(17, 24, 39, 0.2) 60%, transparent 100%);
}

.category-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 24px;
    z-index: 1;
}

.category-content h3 {
    font-size: 1.375rem;
    font-weight: 700;
    color: white;
    margin-bottom: 6px;
}

.category-content p {
    color: rgba(255,255,255,0.75);
    font-size: 0.9375rem;
}

/* ========================================
   Products Grid
======================================== */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
    gap: 24px;
}

.product-card {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: all var(--transition-base);
}

.product-card:hover {
    border-color: var(--accent);
    box-shadow: var(--shadow-lg);
    transform: translateY(-3px);
}

.product-image {
    position: relative;
    aspect-ratio: 1;
    overflow: hidden;
    background: var(--bg-secondary);
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-slow);
}

.product-card:hover .product-image img {
    transform: scale(1.06);
}

.product-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    padding: 6px 12px;
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    border-radius: var(--radius-sm);
}

.product-badge.sale {
    background: var(--danger);
    color: white;
}

.product-badge.out-of-stock {
    background: var(--bg-tertiary);
    color: var(--text-muted);
}

.product-info {
    padding: 20px;
}

.product-category {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 8px;
}

.product-category:hover {
    text-decoration: underline;
}

.product-name {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 12px;
    line-height: 1.45;
    color: var(--text-primary);
}

.product-name a:hover {
    color: var(--accent);
}

.product-price {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.price-old {
    font-size: 0.9375rem;
    color: var(--text-muted);
    text-decoration: line-through;
    order: 2;
}

.price-current {
    font-size: 1.125rem;
    font-weight: 700;
    color: #e63946;
    order: 1;
}

.product-card:not(.on-sale) .price-current {
    color: var(--primary);
}

.product-actions {
    padding: 0 20px 20px;
}

.btn-add-cart {
    width: 100%;
    background: var(--primary);
    color: white;
    border-radius: var(--radius-sm);
    font-weight: 600;
    padding: 14px 20px;
    font-size: 0.9375rem;
    letter-spacing: 0.01em;
}

.btn-add-cart:hover {
    background: #333;
    transform: translateY(-2px);
}

/* ========================================
   Promo Banner
======================================== */
.promo-banner {
    background: linear-gradient(135deg, var(--accent) 0%, #1d4ed8 100%);
    padding: 72px 0;
}

.banner-content {
    text-align: center;
    max-width: 520px;
    margin: 0 auto;
    color: white;
}

.banner-content h2 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 12px;
}

.banner-content p {
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: 28px;
    font-size: 1.0625rem;
}

.newsletter-form {
    display: flex;
    gap: 12px;
    max-width: 420px;
    margin: 0 auto;
}

.newsletter-form input {
    flex: 1;
    padding: 14px 20px;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: var(--radius-md);
    color: white;
    font-size: 0.9375rem;
    backdrop-filter: blur(10px);
}

.newsletter-form input::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

.newsletter-form input:focus {
    outline: none;
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.4);
}

.newsletter-form .btn {
    background: white;
    color: var(--accent);
    font-weight: 600;
}

.newsletter-form .btn:hover {
    background: var(--primary);
    color: white;
}

/* ========================================
   Breadcrumb
======================================== */
.breadcrumb-container {
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border-color);
    padding: 14px 0;
}

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.875rem;
}

.breadcrumb a {
    color: var(--text-muted);
    transition: color var(--transition-fast);
}

.breadcrumb a:hover {
    color: var(--accent);
}

.breadcrumb .separator {
    color: var(--text-muted);
    font-size: 0.5625rem;
}

.breadcrumb .current {
    color: var(--text-primary);
    font-weight: 500;
}

/* ========================================
   Page Title
======================================== */
.page-title {
    font-size: 2.25rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 28px;
    color: var(--primary);
}

/* ========================================
   Category Page
======================================== */
.category-header {
    padding: 48px 0;
}

.category-banner {
    position: relative;
    height: 280px;
    border-radius: var(--radius-xl);
    overflow: hidden;
    background: var(--bg-tertiary);
}

.category-banner img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.category-banner .category-overlay {
    background: linear-gradient(to top, rgba(17, 24, 39, 0.9) 0%, rgba(17, 24, 39, 0.4) 50%, transparent 100%);
}

.category-banner-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 36px;
    z-index: 1;
}

.category-banner-content h1 {
    font-size: 2.5rem;
    font-weight: 700;
    color: white;
    margin-bottom: 10px;
}

.category-banner-content p {
    color: rgba(255,255,255,0.8);
    max-width: 550px;
    font-size: 1rem;
}

.category-description {
    color: var(--text-secondary);
    max-width: 680px;
    line-height: 1.7;
}

/* Products Header */
.products-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 28px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
}

.products-count {
    color: var(--text-secondary);
    font-size: 0.9375rem;
}

.products-sort {
    display: flex;
    align-items: center;
    gap: 12px;
}

.products-sort label {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.products-sort select {
    padding: 10px 16px;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 0.875rem;
    cursor: pointer;
}

.products-sort select:focus {
    outline: none;
    border-color: var(--accent);
}

/* ========================================
   Product Detail
======================================== */
.product-detail {
    padding: 48px 0 80px;
}

.product-detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 56px;
    margin-bottom: 56px;
}

/* Gallery */
.product-gallery {
    position: sticky;
    top: 100px;
}

.gallery-main {
    aspect-ratio: 1;
    border-radius: var(--radius-xl);
    overflow: hidden;
    background: var(--bg-secondary);
    margin-bottom: 14px;
    border: 1px solid var(--border-color);
}

.gallery-main img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.gallery-thumbs {
    display: flex;
    gap: 10px;
}

.gallery-thumb {
    width: 80px;
    height: 80px;
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 2px solid transparent;
    background: transparent;
    cursor: pointer;
    transition: border-color var(--transition-fast);
}

.gallery-thumb.active,
.gallery-thumb:hover {
    border-color: var(--accent);
}

.gallery-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Product Info */
.product-detail-info {
    padding-top: 16px;
}

.product-title {
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 10px;
    color: var(--primary);
}

.product-sku {
    color: var(--text-muted);
    font-size: 0.875rem;
    margin-bottom: 20px;
}

.product-price-box {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 20px;
}

.product-price-box .price-old {
    font-size: 1.125rem;
}

.product-price-box .price-current {
    font-size: 1.75rem;
    color: var(--primary);
}

.price-discount {
    padding: 5px 10px;
    background: rgba(220, 38, 38, 0.1);
    color: var(--danger);
    font-size: 0.8125rem;
    font-weight: 600;
    border-radius: var(--radius-sm);
}

.product-stock {
    margin-bottom: 20px;
}

.product-stock .in-stock {
    color: var(--success);
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
}

.product-stock .out-of-stock {
    color: var(--danger);
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
}

.product-short-desc {
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 28px;
}

.product-add-to-cart {
    display: flex;
    gap: 14px;
    margin-bottom: 28px;
}

.quantity-selector {
    display: flex;
    align-items: center;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.quantity-selector button {
    width: 46px;
    height: 46px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-size: 0.875rem;
    transition: background var(--transition-fast);
}

.quantity-selector button:hover {
    background: var(--bg-tertiary);
}

.quantity-selector input {
    width: 56px;
    height: 46px;
    text-align: center;
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-size: 1rem;
    font-weight: 600;
}

.quantity-selector input::-webkit-outer-spin-button,
.quantity-selector input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.product-meta {
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}

.meta-label {
    color: var(--text-muted);
    margin-right: 8px;
}

.product-meta a {
    color: var(--text-primary);
    font-weight: 500;
}

.product-meta a:hover {
    color: var(--accent);
}

/* Product Tabs */
.product-tabs {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    overflow: hidden;
}

.tabs-header {
    display: flex;
    border-bottom: 1px solid var(--border-color);
    background: var(--bg-secondary);
}

.tab-btn {
    padding: 18px 28px;
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 0.9375rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-fast);
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
}

.tab-btn:hover,
.tab-btn.active {
    color: var(--accent);
    background: var(--bg-primary);
    border-bottom-color: var(--accent);
}

.tabs-content {
    padding: 28px;
}

.description-content {
    color: var(--text-secondary);
    line-height: 1.8;
}

/* ========================================
   Cart Page
======================================== */
.cart-section {
    padding: 48px 0 80px;
}

.empty-cart {
    text-align: center;
    padding: 80px 20px;
    background: var(--bg-primary);
    border-radius: var(--radius-xl);
    border: 1px solid var(--border-color);
}

.empty-cart i {
    font-size: 4rem;
    color: var(--text-muted);
    margin-bottom: 24px;
}

.empty-cart h2 {
    font-size: 1.5rem;
    margin-bottom: 10px;
    color: var(--primary);
}

.empty-cart p {
    color: var(--text-secondary);
    margin-bottom: 28px;
}

.cart-grid {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 40px;
}

/* Cart Table */
.cart-table {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    overflow: hidden;
}

.cart-header {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr 50px;
    gap: 16px;
    padding: 18px 24px;
    background: var(--bg-secondary);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
}

.cart-item {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr 50px;
    gap: 16px;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-color);
}

.cart-item:last-child {
    border-bottom: none;
}

.col-product {
    display: flex;
    align-items: center;
    gap: 16px;
}

.item-image {
    width: 72px;
    height: 72px;
    border-radius: var(--radius-md);
    overflow: hidden;
    flex-shrink: 0;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
}

.item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.item-name {
    font-weight: 600;
    display: block;
    margin-bottom: 4px;
    color: var(--text-primary);
}

.item-name:hover {
    color: var(--accent);
}

.item-sku {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.col-price,
.col-total {
    font-size: 0.9375rem;
}

.col-total {
    font-weight: 600;
    color: var(--primary);
}

.remove-btn {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-full);
    color: var(--text-muted);
    transition: all var(--transition-fast);
}

.remove-btn:hover {
    background: var(--danger);
    border-color: var(--danger);
    color: white;
}

.cart-actions {
    margin-top: 20px;
}

/* Cart Summary */
.cart-summary {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: 28px;
    position: sticky;
    top: 100px;
}

.cart-summary h3 {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-color);
    color: var(--primary);
}

.summary-row {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    color: var(--text-secondary);
    font-size: 0.9375rem;
}

.summary-total {
    display: flex;
    justify-content: space-between;
    padding: 18px 0;
    margin-top: 10px;
    border-top: 1px solid var(--border-color);
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--primary);
}

.cart-summary .btn {
    margin-top: 20px;
}

/* ========================================
   Checkout Page
======================================== */
.checkout-section {
    padding: 48px 0 80px;
}

.checkout-grid {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 40px;
}

/* Checkout Steps */
.checkout-steps {
    display: flex;
    align-items: center;
    margin-bottom: 40px;
}

.step {
    display: flex;
    align-items: center;
    gap: 12px;
}

.step-number {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-secondary);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-full);
    font-weight: 600;
    transition: all var(--transition-fast);
}

.step.active .step-number,
.step.completed .step-number {
    background: var(--accent);
    border-color: var(--accent);
    color: white;
}

.step-title {
    font-weight: 500;
    color: var(--text-muted);
    transition: color var(--transition-fast);
}

.step.active .step-title,
.step.completed .step-title {
    color: var(--text-primary);
}

.step-line {
    flex: 1;
    height: 2px;
    background: var(--border-color);
    margin: 0 20px;
}

/* Checkout Form */
.checkout-form {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: 32px;
}

.checkout-step-content {
    display: none;
}

.checkout-step-content.active {
    display: block;
    animation: fadeIn 0.4s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.checkout-step-content h2 {
    font-size: 1.375rem;
    font-weight: 600;
    margin-bottom: 28px;
    color: var(--primary);
}

/* Form Groups */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 8px;
    color: var(--text-secondary);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 13px 16px;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 0.9375rem;
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-light);
}

.form-group input::placeholder {
    color: var(--text-muted);
}

.form-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

/* Checkbox */
.checkbox-label {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
}

.checkbox-label input {
    width: 20px;
    height: 20px;
    accent-color: var(--accent);
}

.terms-group {
    display: flex;
    align-items: center;
    gap: 16px;
}

.terms-link {
    color: var(--accent);
    font-size: 0.875rem;
    font-weight: 500;
}

/* Delivery Methods */
.delivery-methods {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.delivery-option {
    display: flex;
    align-items: center;
    padding: 16px 20px;
    background: var(--bg-secondary);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.delivery-option:has(input:checked) {
    border-color: var(--accent);
    background: var(--accent-light);
}

.delivery-option input {
    margin-right: 16px;
    accent-color: var(--accent);
}

.option-content {
    display: flex;
    justify-content: space-between;
    flex: 1;
}

.option-name {
    font-weight: 500;
    color: var(--text-primary);
}

.option-price {
    color: var(--accent);
    font-weight: 600;
}

/* Step Actions */
.step-actions {
    display: flex;
    gap: 14px;
    margin-top: 28px;
    padding-top: 28px;
    border-top: 1px solid var(--border-color);
}

/* Checkout Summary */
.checkout-summary {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: 28px;
    position: sticky;
    top: 100px;
}

.checkout-summary h3 {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 20px;
    color: var(--primary);
}

.summary-items {
    max-height: 280px;
    overflow-y: auto;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
}

.summary-item {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 14px;
}

.summary-item:last-child {
    margin-bottom: 0;
}

.summary-item .item-image {
    position: relative;
    width: 56px;
    height: 56px;
    border-radius: var(--radius-md);
    overflow: hidden;
}

.summary-item .item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.item-qty {
    position: absolute;
    top: -5px;
    right: -5px;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--accent);
    color: white;
    font-size: 0.6875rem;
    font-weight: 700;
    border-radius: var(--radius-full);
}

.summary-item .item-details {
    flex: 1;
}

.summary-item .item-name {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 4px;
    color: var(--text-primary);
}

.summary-item .item-price {
    color: var(--text-muted);
    font-size: 0.875rem;
}

.summary-totals {
    margin-bottom: 20px;
}

/* ========================================
   Order Complete
======================================== */
.order-complete-section {
    padding: 80px 0;
}

.order-complete-content {
    max-width: 480px;
    margin: 0 auto;
    text-align: center;
    background: var(--bg-primary);
    padding: 48px;
    border-radius: var(--radius-xl);
    border: 1px solid var(--border-color);
}

.success-icon {
    width: 88px;
    height: 88px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 28px;
    background: var(--success);
    border-radius: var(--radius-full);
    font-size: 2.5rem;
    color: white;
    animation: scaleIn 0.5s ease;
}

@keyframes scaleIn {
    from { transform: scale(0); }
    to { transform: scale(1); }
}

.order-complete-content h1 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--primary);
}

.success-message {
    font-size: 1.0625rem;
    color: var(--text-secondary);
    margin-bottom: 28px;
}

.order-number {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 14px 24px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    margin-bottom: 20px;
}

.order-number span {
    color: var(--text-muted);
}

.order-number strong {
    font-size: 1.125rem;
    color: var(--primary);
}

.email-notice {
    color: var(--text-muted);
    margin-bottom: 28px;
    font-size: 0.9375rem;
}

/* ========================================
   Search Page
======================================== */
.search-header {
    margin-bottom: 40px;
}

.search-page-form {
    display: flex;
    gap: 14px;
    max-width: 580px;
    margin-top: 20px;
}

.search-page-form input {
    flex: 1;
    padding: 14px 22px;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    color: var(--text-primary);
    font-size: 1rem;
}

.search-page-form input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-light);
}

.search-results-count {
    color: var(--text-secondary);
    margin-bottom: 28px;
    font-size: 0.9375rem;
}

/* ========================================
   Static Pages
======================================== */
.page-section {
    padding: 48px 0 80px;
}

.page-content {
    max-width: 780px;
    background: var(--bg-primary);
    padding: 40px;
    border-radius: var(--radius-xl);
    border: 1px solid var(--border-color);
}

.content-body {
    color: var(--text-secondary);
    line-height: 1.85;
}

.content-body h2,
.content-body h3,
.content-body h4 {
    color: var(--text-primary);
    margin: 28px 0 14px;
}

.content-body p {
    margin-bottom: 14px;
}

.content-body a {
    color: var(--accent);
}

.content-body ul,
.content-body ol {
    margin-bottom: 14px;
    padding-left: 24px;
}

.content-body li {
    margin-bottom: 8px;
}

/* ========================================
   Empty State
======================================== */
.empty-state {
    text-align: center;
    padding: 72px 20px;
    background: var(--bg-primary);
    border-radius: var(--radius-xl);
    border: 1px solid var(--border-color);
}

.empty-state i {
    font-size: 3.5rem;
    color: var(--text-muted);
    margin-bottom: 20px;
}

.empty-state p {
    color: var(--text-secondary);
    font-size: 1.0625rem;
}

/* ========================================
   Error Page
======================================== */
.error-page {
    text-align: center;
    padding: 80px 20px;
}

.error-page h1 {
    font-size: 7rem;
    font-weight: 800;
    color: var(--accent);
    line-height: 1;
    margin-bottom: 14px;
}

.error-page p {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 28px;
}

/* ========================================
   Footer
======================================== */
.site-footer {
    background: var(--primary);
    color: white;
}

.footer-main {
    padding: 72px 0;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr repeat(3, 1fr);
    gap: 48px;
}

.footer-logo {
    margin-bottom: 18px;
}

.footer-logo img {
    height: 40px;
    filter: brightness(0) invert(1);
}

.footer-logo .logo-text {
    color: white;
}

.footer-about {
    color: rgba(255,255,255,0.7);
    margin-bottom: 24px;
    line-height: 1.7;
    font-size: 0.9375rem;
}

.footer-social {
    display: flex;
    gap: 10px;
}

.footer-social a {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.1);
    border-radius: var(--radius-full);
    color: rgba(255,255,255,0.8);
    transition: all var(--transition-fast);
}

.footer-social a:hover {
    background: var(--accent);
    color: white;
}

.footer-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 20px;
    color: white;
}

.footer-links li {
    margin-bottom: 12px;
}

.footer-links a {
    color: rgba(255,255,255,0.7);
    font-size: 0.9375rem;
    transition: color var(--transition-fast);
}

.footer-links a:hover {
    color: white;
}

.footer-contact li {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 14px;
    color: rgba(255,255,255,0.7);
    font-size: 0.9375rem;
}

.footer-contact i {
    color: var(--accent);
    margin-top: 4px;
    width: 16px;
}

.footer-contact a:hover {
    color: white;
}

.footer-bottom {
    padding: 20px 0;
    border-top: 1px solid rgba(255,255,255,0.1);
    text-align: center;
    color: rgba(255,255,255,0.5);
    font-size: 0.875rem;
}

/* ========================================
   Cart Notification
======================================== */
.cart-notification {
    position: fixed;
    bottom: 24px;
    right: 24px;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 24px;
    background: var(--success);
    color: white;
    border-radius: var(--radius-md);
    font-weight: 500;
    box-shadow: var(--shadow-lg);
    opacity: 0;
    transform: translateY(20px);
    transition: all var(--transition-base);
    z-index: 10000;
}

.cart-notification.show {
    opacity: 1;
    transform: translateY(0);
}

.cart-notification.error {
    background: var(--danger);
}

/* ========================================
   Back to Top
======================================== */
.back-to-top {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--accent);
    color: white;
    border: none;
    border-radius: var(--radius-full);
    font-size: 1.125rem;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all var(--transition-base);
    z-index: 100;
    cursor: pointer;
    box-shadow: var(--shadow-lg);
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    background: var(--accent-hover);
    transform: translateY(-3px);
}

/* ========================================
   Page Loader
======================================== */
.page-loader {
    background: var(--bg-primary);
}

.loader-spinner {
    border: 3px solid var(--border-color);
    border-top-color: var(--accent);
}

/* ========================================
   Alerts
======================================== */
.alert {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    border-radius: var(--radius-md);
    margin-bottom: 20px;
    font-size: 0.9375rem;
}

.alert-error {
    background: rgba(220, 38, 38, 0.08);
    border: 1px solid rgba(220, 38, 38, 0.2);
    color: var(--danger);
}

.alert-success {
    background: rgba(5, 150, 105, 0.08);
    border: 1px solid rgba(5, 150, 105, 0.2);
    color: var(--success);
}

/* ========================================
   Responsive Design
======================================== */
@media (max-width: 1024px) {
    .header-main-content {
        flex-wrap: wrap;
    }
    
    .header-search {
        order: 3;
        max-width: 100%;
        flex-basis: 100%;
        margin-top: 16px;
    }
    
    .product-detail-grid {
        grid-template-columns: 1fr;
        gap: 36px;
    }
    
    .product-gallery {
        position: static;
    }
    
    .cart-grid,
    .checkout-grid {
        grid-template-columns: 1fr;
    }
    
    .cart-summary,
    .checkout-summary {
        position: static;
    }
    
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .header-top-content {
        flex-direction: column;
        height: auto;
        padding: 10px 0;
        gap: 8px;
    }
    
    .header-contact {
        display: none;
    }
    
    .header-search {
        display: none;
    }
    
    .mobile-search-toggle {
        display: block;
    }
    
    .mobile-menu-toggle {
        display: flex;
    }
    
    .main-nav {
        display: none;
    }
    
    .main-nav.open {
        display: block;
    }
    
    .nav-list {
        flex-direction: column;
    }
    
    .nav-list > li > a {
        padding: 14px 20px;
        border-bottom: 1px solid var(--border-color);
    }
    
    .nav-dropdown {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        border: none;
        border-radius: 0;
        background: var(--bg-secondary);
    }
    
    .hero-slider {
        height: 480px;
    }
    
    .slide-title {
        font-size: 1.75rem;
    }
    
    .slider-nav {
        display: none;
    }
    
    .section {
        padding: 56px 0;
    }
    
    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 14px;
    }
    
    .categories-grid,
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }
    
    .cart-header {
        display: none;
    }
    
    .cart-item {
        grid-template-columns: 1fr;
        gap: 14px;
    }
    
    .col-product {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .checkout-steps {
        flex-direction: column;
        gap: 14px;
    }
    
    .step-line {
        display: none;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 36px;
    }
    
    .newsletter-form {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 16px;
    }
    
    .categories-grid,
    .products-grid {
        grid-template-columns: 1fr;
    }
    
    .page-title {
        font-size: 1.75rem;
    }
    
    .product-title {
        font-size: 1.5rem;
    }
    
    .product-add-to-cart {
        flex-direction: column;
    }
    
    .quantity-selector {
        justify-content: center;
    }
}

/* RTL Support */
[dir="rtl"] .breadcrumb .separator i {
    transform: rotate(180deg);
}

[dir="rtl"] .section-link i,
[dir="rtl"] .btn i:last-child {
    transform: rotate(180deg);
}

[dir="rtl"] .slider-prev,
[dir="rtl"] .slider-next {
    transform: rotate(180deg);
}
