/* ========== Reset & Base ========== */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: 'Cairo', sans-serif;
    font-size: 16px;
    line-height: 1.6;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    transition: background 0.3s, color 0.3s;
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

button, input, select, textarea {
    font-family: inherit;
    font-size: inherit;
}

ul, ol {
    list-style: none;
}

/* ========== Utilities ========== */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

.main {
    flex: 1;
    padding: 20px 0;
}

.mobile-only { display: none; }

@media (max-width: 768px) {
    .mobile-only { display: block; }
    .desktop-only { display: none !important; }
}

/* ========== Header ========== */
.header {
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 12px 0;
}

.logo {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--primary);
    white-space: nowrap;
}

.logo img {
    height: 40px;
    width: auto;
}

.search-box {
    flex: 1;
    max-width: 400px;
    position: relative;
}

.search-box input {
    width: 100%;
    padding: 10px 45px 10px 15px;
    border: 1px solid var(--border);
    border-radius: 25px;
    background: var(--bg);
    color: var(--text);
    outline: none;
    transition: border-color 0.2s;
}

.search-box input:focus {
    border-color: var(--primary);
}

.search-box button {
    position: absolute;
    left: 5px;
    top: 50%;
    transform: translateY(-50%);
    background: var(--primary);
    color: white;
    border: none;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 10px;
    margin-top: 5px;
    max-height: 400px;
    overflow-y: auto;
    display: none;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    z-index: 100;
}

.search-results.active { display: block; }

.search-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    border-bottom: 1px solid var(--border);
    transition: background 0.2s;
}

.search-item:hover {
    background: var(--bg);
}

.search-item img {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 8px;
}

.search-item-info h4 {
    font-size: 0.9rem;
    margin-bottom: 3px;
}

.search-item-info span {
    color: var(--primary);
    font-weight: 600;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.icon-btn {
    background: none;
    border: none;
    color: var(--text);
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: background 0.2s;
}

.icon-btn:hover {
    background: var(--bg);
}

.cart-btn {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px;
}

.cart-count {
    position: absolute;
    top: 0;
    right: 0;
    background: var(--primary);
    color: white;
    font-size: 11px;
    font-weight: 600;
    min-width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Wishlist Button */
.wishlist-btn {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px;
    color: var(--text);
    transition: color 0.3s;
}

.wishlist-btn:hover {
    color: #ef4444;
}

.wishlist-count {
    position: absolute;
    top: 0;
    right: 0;
    background: #ef4444;
    color: white;
    font-size: 11px;
    font-weight: 600;
    min-width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Wishlist Button in Product */
.btn-wishlist {
    padding: 10px 15px;
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-muted);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-wishlist:hover {
    border-color: #ef4444;
    color: #ef4444;
}

.btn-wishlist.active {
    background: #fef2f2;
    border-color: #ef4444;
    color: #ef4444;
}

[data-theme="dark"] .btn-wishlist.active {
    background: rgba(239, 68, 68, 0.1);
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin: 40px 0 20px;
    flex-wrap: wrap;
}

.page-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s;
}

.page-btn:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

.page-btn.active {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

.page-btn.prev,
.page-btn.next {
    padding: 0 10px;
}

.pagination-info {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 20px;
}

/* Load More Button */
.load-more-section {
    text-align: center;
    margin: 40px 0;
}

.load-more-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 15px 40px;
    background: var(--bg-card);
    border: 2px solid var(--primary);
    color: var(--primary);
    font-size: 1rem;
    font-weight: 600;
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.3s;
}

.load-more-btn:hover {
    background: var(--primary);
    color: white;
}

.load-more-btn.loading {
    opacity: 0.7;
    cursor: not-allowed;
}

.load-more-btn .spinner {
    display: none;
    width: 20px;
    height: 20px;
    border: 2px solid currentColor;
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.load-more-btn.loading .spinner {
    display: block;
}

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

/* ========== Navigation ========== */
.nav {
    background: var(--primary);
    color: white;
}

.nav-list {
    display: flex;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.nav-list::-webkit-scrollbar { display: none; }

.nav-list li a {
    display: block;
    padding: 12px 18px;
    white-space: nowrap;
    transition: background 0.2s;
}

.nav-list li a:hover {
    background: var(--primary-dark);
}

@media (max-width: 768px) {
    .header-content {
        flex-wrap: wrap;
    }
    
    .search-box {
        order: 3;
        max-width: 100%;
        width: 100%;
        margin-top: 10px;
    }
    
    .nav {
        display: none;
    }
    
    .nav.active {
        display: block;
    }
    
    .nav-list {
        flex-direction: column;
    }
}

/* ========== Buttons ========== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-dark);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--primary);
    color: var(--primary);
}

.btn-outline:hover {
    background: var(--primary);
    color: white;
}

.btn-sm {
    padding: 8px 16px;
    font-size: 0.9rem;
}

.btn-block {
    width: 100%;
}

/* ========== Cards ========== */
.card {
    background: var(--bg-card);
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--border);
    transition: transform 0.2s, box-shadow 0.2s;
}

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

/* ========== Section Title ========== */
.section-title {
    font-size: 1.5rem;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.section-title a {
    font-size: 0.9rem;
    color: var(--primary);
}

/* ========== Products Grid & List ========== */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
}

.products-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* ========== Product Card - New Design ========== */
.product-card {
    background: var(--bg-card);
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid var(--border);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.12);
}

/* الشريط المائل */
.product-badge {
    position: absolute;
    top: 15px;
    right: -30px;
    width: 110px;
    padding: 5px 0;
    text-align: center;
    font-size: 0.7rem;
    font-weight: 700;
    color: white;
    transform: rotate(45deg);
    z-index: 10;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

.product-badge.new {
    background: linear-gradient(135deg, #22c55e, #16a34a);
}

.product-badge.discount {
    background: linear-gradient(135deg, #ef4444, #dc2626);
}

.product-badge.bestseller {
    background: linear-gradient(135deg, #f59e0b, #d97706);
}

/* زر المفضلة في Header */
.wishlist-btn {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px;
    color: var(--text);
    transition: color 0.3s;
}

.wishlist-btn:hover {
    color: #ef4444;
}

/* زر المفضلة في بطاقة المنتج */
.product-wishlist-btn {
    position: absolute;
    top: 12px;
    left: 12px;
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.95);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.product-wishlist-btn:hover {
    background: #fff;
    transform: scale(1.1);
}

.product-wishlist-btn svg {
    color: #9ca3af;
    transition: all 0.3s ease;
}

.product-wishlist-btn:hover svg {
    color: #ef4444;
}

.product-wishlist-btn.active svg {
    color: #ef4444;
    fill: #ef4444;
}

[data-theme="dark"] .product-wishlist-btn {
    background: rgba(30, 41, 59, 0.95);
}

[data-theme="dark"] .product-wishlist-btn:hover {
    background: #1e293b;
}

/* صورة المنتج */
.product-image-link {
    display: block;
}

.product-image {
    position: relative;
    padding-top: 100%;
    background: linear-gradient(145deg, #f8fafc, #f1f5f9);
    overflow: hidden;
}

[data-theme="dark"] .product-image {
    background: linear-gradient(145deg, #1e293b, #334155);
}

.product-image img {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 85%;
    height: 85%;
    object-fit: contain;
    transition: transform 0.4s ease;
}

.product-card:hover .product-image img {
    transform: translate(-50%, -50%) scale(1.08);
}

/* معلومات المنتج */
.product-info {
    padding: 15px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.product-name-link {
    display: block;
    margin-bottom: 8px;
}

.product-name {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 2.8em;
    transition: color 0.2s;
}

.product-name-link:hover .product-name {
    color: var(--primary);
}

/* السعر */
.product-price {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.current-price {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--primary);
}

.old-price {
    font-size: 0.85rem;
    color: var(--text-muted);
    text-decoration: line-through;
}

/* زر أضف للسلة */
.add-to-cart-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 10px 15px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: auto;
}

.add-to-cart-btn:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
}

.add-to-cart-btn svg {
    flex-shrink: 0;
}

/* معلومات إضافية - مخفية في Grid View */
.product-extra-info {
    display: none;
}

/* ========== List View Styles ========== */
.products-list .product-card {
    flex-direction: row;
    align-items: stretch;
}

.products-list .product-card .product-image {
    width: 180px;
    min-width: 180px;
    padding-top: 0;
    height: 180px;
}

.products-list .product-card .product-image img {
    width: 90%;
    height: 90%;
}

.products-list .product-card .product-badge {
    top: 10px;
    right: -35px;
}

.products-list .product-card .wishlist-btn {
    top: 10px;
    left: auto;
    right: 10px;
}

.products-list .product-card .product-info {
    flex: 1;
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.products-list .product-card .product-name {
    font-size: 1.1rem;
    -webkit-line-clamp: 1;
    min-height: auto;
}

.products-list .product-card .product-price {
    flex-direction: column;
    align-items: flex-start;
    gap: 5px;
}

.products-list .product-card .current-price {
    font-size: 1.3rem;
}

.products-list .product-card .add-to-cart-btn {
    width: auto;
    align-self: flex-start;
}

.products-list .product-card .product-extra-info {
    display: block;
    margin-top: 10px;
}

.product-description {
    color: var(--text-muted);
    font-size: 0.85rem;
    line-height: 1.6;
    margin-bottom: 10px;
}

.view-product-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: var(--primary);
    font-size: 0.85rem;
    font-weight: 600;
    transition: gap 0.2s;
}

.view-product-btn:hover {
    gap: 8px;
}

/* ========== Mobile Responsive for Product Cards ========== */
@media (max-width: 768px) {
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    
    .product-card {
        border-radius: 12px;
    }
    
    .product-badge {
        font-size: 0.6rem;
        width: 90px;
        top: 10px;
        right: -25px;
    }
    
    .wishlist-btn {
        width: 30px;
        height: 30px;
        top: 8px;
        left: 8px;
    }
    
    .wishlist-btn svg {
        width: 16px;
        height: 16px;
    }
    
    .product-info {
        padding: 10px;
    }
    
    .product-name {
        font-size: 0.85rem;
        min-height: 2.4em;
    }
    
    .product-price {
        margin-bottom: 10px;
    }
    
    .current-price {
        font-size: 0.95rem;
    }
    
    .old-price {
        font-size: 0.75rem;
    }
    
    .add-to-cart-btn {
        padding: 8px 10px;
        font-size: 0.8rem;
    }
    
    .add-to-cart-btn span {
        display: none;
    }
    
    .add-to-cart-btn svg {
        width: 20px;
        height: 20px;
    }
    
    /* List View on Mobile */
    .products-list .product-card {
        flex-direction: column;
    }
    
    .products-list .product-card .product-image {
        width: 100%;
        height: auto;
        padding-top: 100%;
    }
    
    .products-list .product-card .product-info {
        padding: 15px;
    }
    
    .products-list .product-card .wishlist-btn {
        left: 8px;
        right: auto;
    }
}

@media (max-width: 400px) {
    .products-grid {
        gap: 10px;
    }
    
    .product-info {
        padding: 8px;
    }
    
    .product-name {
        font-size: 0.8rem;
    }
    
    .current-price {
        font-size: 0.9rem;
    }
}

/* ========== Banners ========== */
.banners {
    margin-bottom: 30px;
}

.banner-slider {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
}

.banner-slide {
    display: none;
}

.banner-slide.active {
    display: block;
}

.banner-slide img {
    width: 100%;
    height: auto;
    max-height: 350px;
    object-fit: cover;
}

.banner-dots {
    position: absolute;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
}

.banner-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255,255,255,0.5);
    border: none;
    cursor: pointer;
    transition: background 0.2s;
}

.banner-dot.active {
    background: white;
}

/* ========== Categories ========== */
.categories-section {
    margin-bottom: 30px;
}

.categories-scroll {
    display: flex;
    gap: 15px;
    overflow-x: auto;
    padding-bottom: 10px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.categories-scroll::-webkit-scrollbar { display: none; }

.category-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    min-width: 100px;
    padding: 15px;
    background: var(--bg-card);
    border-radius: 12px;
    border: 1px solid var(--border);
    transition: all 0.2s;
}

.category-card:hover {
    border-color: var(--primary);
    transform: translateY(-3px);
}

.category-card img {
    width: 60px;
    height: 60px;
    object-fit: contain;
}

.category-card span {
    font-size: 0.9rem;
    font-weight: 500;
    text-align: center;
    white-space: nowrap;
}

/* ========== Filters Bar ========== */
.filters-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    padding: 15px 20px;
    background: var(--bg-card);
    border-radius: 12px;
    border: 1px solid var(--border);
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.view-toggle {
    display: flex;
    gap: 5px;
}

.view-toggle button {
    padding: 8px 12px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 6px;
    cursor: pointer;
    color: var(--text-muted);
    transition: all 0.2s;
}

.view-toggle button.active,
.view-toggle button:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

/* Quick Filters */
.quick-filters {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.quick-filter-btn {
    padding: 8px 16px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.2s;
    color: var(--text);
}

.quick-filter-btn:hover,
.quick-filter-btn.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.quick-filter-btn.discount-filter {
    border-color: #ef4444;
    color: #ef4444;
}

.quick-filter-btn.discount-filter:hover,
.quick-filter-btn.discount-filter.active {
    background: #ef4444;
    color: white;
}

.quick-filter-btn.bestseller-filter {
    border-color: #f59e0b;
    color: #f59e0b;
}

.quick-filter-btn.bestseller-filter:hover,
.quick-filter-btn.bestseller-filter.active {
    background: #f59e0b;
    color: white;
}

.quick-filter-btn.new-filter {
    border-color: #22c55e;
    color: #22c55e;
}

.quick-filter-btn.new-filter:hover,
.quick-filter-btn.new-filter.active {
    background: #22c55e;
    color: white;
}

/* Sort Select */
.sort-select {
    padding: 8px 15px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--bg);
    color: var(--text);
    cursor: pointer;
}

/* ========== Filters Sidebar ========== */
.filters-sidebar {
    background: var(--bg-card);
    border-radius: 12px;
    border: 1px solid var(--border);
    padding: 20px;
    position: sticky;
    top: 100px;
    max-height: calc(100vh - 120px);
    overflow-y: auto;
}

.filter-section {
    margin-bottom: 25px;
}

.filter-section:last-child {
    margin-bottom: 0;
}

.filter-section h4 {
    margin-bottom: 15px;
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.filter-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.filter-option {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    padding: 8px 12px;
    border-radius: 8px;
    transition: background 0.2s;
}

.filter-option:hover {
    background: var(--bg);
}

.filter-option input {
    width: 18px;
    height: 18px;
    accent-color: var(--primary);
}

/* Price Range */
.price-range {
    display: flex;
    gap: 10px;
    align-items: center;
}

.price-range input {
    flex: 1;
    padding: 10px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--bg);
    color: var(--text);
}

.close-filters {
    display: none;
}

/* Mobile Filters Toggle */
.mobile-filter-btn {
    display: none;
    padding: 10px 20px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    gap: 8px;
    align-items: center;
    font-weight: 600;
}

@media (max-width: 900px) {
    .mobile-filter-btn {
        display: flex;
    }
    
    .filters-sidebar {
        display: none;
        position: fixed;
        top: 0;
        right: 0;
        width: 300px;
        height: 100%;
        max-height: 100%;
        z-index: 1000;
        border-radius: 0;
        overflow-y: auto;
    }
    
    .filters-sidebar.active {
        display: block;
    }
    
    .close-filters {
        display: flex !important;
        align-items: center;
        justify-content: space-between;
        margin-bottom: 20px;
        padding-bottom: 15px;
        border-bottom: 1px solid var(--border);
    }
    
    .close-filters button {
        background: none;
        border: none;
        font-size: 1.5rem;
        cursor: pointer;
        color: var(--text);
    }
    
    .filters-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0,0,0,0.5);
        z-index: 999;
    }
    
    .filters-overlay.active {
        display: block;
    }
}

/* ========== Products Page Layout ========== */
.products-page-layout {
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 30px;
}

@media (max-width: 900px) {
    .products-page-layout {
        grid-template-columns: 1fr;
    }
}

/* ========== Product Details Page ========== */
.product-page {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
}

@media (max-width: 900px) {
    .product-page {
        grid-template-columns: 1fr;
    }
}

.product-gallery {
    position: sticky;
    top: 100px;
    height: fit-content;
    z-index: 1;
}

.product-page > .product-details {
    position: relative;
    z-index: 2;
    background: var(--bg-card);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 25px;
    border-radius: 16px;
    border: 1px solid var(--border);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.product-main-image {
    background: var(--bg-card);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 16px;
    padding: 20px;
    border: 1px solid var(--border);
    margin-bottom: 15px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.product-main-image img {
    width: 100%;
    height: auto;
    max-height: 400px;
    object-fit: contain;
}

.product-thumbs {
    display: flex;
    gap: 10px;
    overflow-x: auto;
}

.product-thumbs img {
    width: 70px;
    height: 70px;
    object-fit: cover;
    border-radius: 8px;
    border: 2px solid transparent;
    cursor: pointer;
    transition: border-color 0.2s;
}

.product-thumbs img:hover,
.product-thumbs img.active {
    border-color: var(--primary);
}

.product-details h1 {
    font-size: 1.8rem;
    margin-bottom: 15px;
}

.product-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 20px;
}

.product-meta a {
    color: var(--primary);
}

.product-meta a:hover {
    text-decoration: underline;
}

.product-price-large {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
}

.product-price-large .current {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary);
}

.product-price-large .old {
    font-size: 1.2rem;
    color: var(--text-muted);
    text-decoration: line-through;
}

.product-price-large .discount {
    background: #fef2f2;
    color: #ef4444;
    padding: 5px 12px;
    border-radius: 20px;
    font-weight: 600;
}

.variant-selector {
    margin-bottom: 20px;
}

.variant-selector h4 {
    margin-bottom: 10px;
}

.variant-options {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.variant-option {
    padding: 10px 20px;
    border: 2px solid var(--border);
    border-radius: 8px;
    background: var(--bg);
    cursor: pointer;
    transition: all 0.2s;
}

.variant-option:hover,
.variant-option.active {
    border-color: var(--primary);
}

.variant-option.color {
    width: 40px;
    height: 40px;
    padding: 0;
    border-radius: 50%;
}

.variant-option.color.active {
    box-shadow: 0 0 0 3px var(--bg-card), 0 0 0 5px var(--primary);
}

.quantity-selector {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
}

.quantity-wrapper {
    display: flex;
    align-items: center;
    gap: 15px;
    flex: 1;
}

.quantity-input {
    display: flex;
    align-items: center;
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
}

.quantity-selector .btn-wishlist {
    width: 44px;
    height: 44px;
    min-width: 44px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    flex-shrink: 0;
}

.quantity-input button {
    width: 40px;
    height: 40px;
    border: none;
    background: var(--bg);
    cursor: pointer;
    font-size: 1.2rem;
    transition: background 0.2s;
}

.quantity-input button:hover {
    background: var(--primary);
    color: white;
}

.quantity-input input {
    width: 60px;
    height: 40px;
    border: none;
    text-align: center;
    font-size: 1rem;
    background: var(--bg-card);
    color: var(--text);
}

.add-to-cart-section {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.add-to-cart-section .btn {
    flex: 1;
}

.stock-status {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 15px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.stock-status.in-stock {
    background: #dcfce7;
    color: #166534;
}

.stock-status.out-of-stock {
    background: #fee2e2;
    color: #991b1b;
}

/* ========== Cart ========== */
.cart-page {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 30px;
}

@media (max-width: 900px) {
    .cart-page {
        grid-template-columns: 1fr;
    }
}

.cart-items {
    background: var(--bg-card);
    border-radius: 12px;
    border: 1px solid var(--border);
    overflow: hidden;
}

.cart-item {
    display: flex;
    gap: 15px;
    padding: 20px;
    border-bottom: 1px solid var(--border);
}

.cart-item:last-child {
    border-bottom: none;
}

.cart-item img {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: 8px;
}

.cart-item-info {
    flex: 1;
}

.cart-item-info h4 {
    margin-bottom: 5px;
}

.cart-item-info .variant {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 10px;
}

.cart-item-info .price {
    color: var(--primary);
    font-weight: 600;
}

.cart-item-actions {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 10px;
}

.remove-item {
    background: none;
    border: none;
    color: #ef4444;
    cursor: pointer;
    font-size: 0.9rem;
}

.cart-summary {
    background: var(--bg-card);
    border-radius: 12px;
    border: 1px solid var(--border);
    padding: 25px;
    height: fit-content;
    position: sticky;
    top: 100px;
}

.cart-summary h3 {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border);
}

.summary-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
}

.summary-row.total {
    font-size: 1.2rem;
    font-weight: 700;
    padding-top: 15px;
    border-top: 1px solid var(--border);
    margin-top: 15px;
}

.coupon-form {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.coupon-form input {
    flex: 1;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--bg);
    color: var(--text);
}

.empty-cart {
    text-align: center;
    padding: 60px 20px;
}

.empty-cart svg {
    width: 100px;
    height: 100px;
    color: var(--text-muted);
    margin-bottom: 20px;
}

/* ========== Checkout ========== */
.checkout-page {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 30px;
}

@media (max-width: 900px) {
    .checkout-page {
        grid-template-columns: 1fr;
    }
}

.checkout-form {
    background: var(--bg-card);
    border-radius: 12px;
    border: 1px solid var(--border);
    padding: 25px;
}

.form-title {
    font-size: 1.2rem;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--bg);
    color: var(--text);
    outline: none;
    transition: border-color 0.2s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--primary);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

@media (max-width: 500px) {
    .form-row {
        grid-template-columns: 1fr;
    }
}

/* ========== Order Confirmation ========== */
.order-success {
    text-align: center;
    padding: 60px 20px;
    background: var(--bg-card);
    border-radius: 12px;
    border: 1px solid var(--border);
    max-width: 600px;
    margin: 0 auto;
}

.order-success .icon {
    width: 80px;
    height: 80px;
    background: #dcfce7;
    color: #166534;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
}

.order-success h1 {
    color: #166534;
    margin-bottom: 10px;
}

.order-number {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--primary);
    margin: 20px 0;
}

.order-details {
    text-align: right;
    background: var(--bg);
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
}

/* ========== Footer ========== */
.footer {
    background: var(--bg-card);
    border-top: 1px solid var(--border);
    padding: 40px 0 20px;
    margin-top: 40px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
    margin-bottom: 30px;
}

.footer-section h4 {
    margin-bottom: 15px;
    color: var(--primary);
}

.footer-section ul li {
    margin-bottom: 8px;
}

.footer-section ul li a:hover {
    color: var(--primary);
}

.social-links {
    display: flex;
    gap: 12px;
    margin-top: 15px;
}

.social-links a {
    width: 40px;
    height: 40px;
    background: var(--bg);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.social-links a:hover {
    background: var(--primary);
    color: white;
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid var(--border);
    color: var(--text-muted);
    font-size: 0.9rem;
}

.dev-credit {
    margin-top: 8px;
}

.dev-credit a {
    color: var(--primary);
}

/* ========== WhatsApp Button ========== */
.whatsapp-btn {
    position: fixed;
    bottom: 25px;
    left: 25px;
    width: 55px;
    height: 55px;
    background: #25d366;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.4);
    z-index: 99;
    transition: transform 0.2s;
}

.whatsapp-btn:hover {
    transform: scale(1.1);
}

/* ========== Toast ========== */
.toast {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: var(--bg-card);
    color: var(--text);
    padding: 15px 25px;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    transform: translateY(100px);
    opacity: 0;
    transition: all 0.3s;
    z-index: 1000;
}

.toast.show {
    transform: translateY(0);
    opacity: 1;
}

.toast.success {
    border-right: 4px solid #22c55e;
}

.toast.error {
    border-right: 4px solid #ef4444;
}

/* ========== Breadcrumb ========== */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
    font-size: 0.9rem;
    color: var(--text-muted);
    flex-wrap: wrap;
}

.breadcrumb a:hover {
    color: var(--primary);
}

.breadcrumb span {
    color: var(--text);
}

/* ========== Page Content ========== */
.page-content {
    background: var(--bg-card);
    border-radius: 12px;
    border: 1px solid var(--border);
    padding: 30px;
    max-width: 800px;
}

.page-content h1 {
    margin-bottom: 20px;
}

.page-content p {
    margin-bottom: 15px;
}

/* ========== Loading ========== */
.loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

/* ========== Pagination ========== */
.pagination {
    display: flex;
    justify-content: center;
    gap: 5px;
    margin-top: 30px;
}

.pagination a,
.pagination span {
    padding: 10px 15px;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: var(--bg-card);
}

.pagination a:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.pagination .active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

/* ========== No Products ========== */
.no-products {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
}

.no-products svg {
    width: 80px;
    height: 80px;
    margin-bottom: 20px;
    opacity: 0.5;
}
