/* ============================================
   متجر إلكتروني - الأناقة
   Color Scheme:
   - Primary:   #5D2D41 (Plum)
   - Secondary: #D7B585 (Gold/Beige)
   - Background:#FCF9F6 (Cream)
   - Text:      #4A3B38 (Dark Brown)
   - White:     #ffffff
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Tajawal:wght@300;400;500;700;800&display=swap');

:root {
    --color-primary: #5D2D41;
    --color-primary-dark: #4a1f30;
    --color-primary-light: #7a3d55;
    --color-secondary: #D7B585;
    --color-secondary-dark: #c4a06a;
    --color-bg: #FCF9F6;
    --color-text: #4A3B38;
    --color-white: #ffffff;
    --color-gray: #f0ebe5;
    --color-gray-dark: #8a7a73;
    --color-success: #28a745;
    --color-danger: #dc3545;
    --color-warning: #ffc107;
    --color-info: #17a2b8;
    --shadow-sm: 0 2px 8px rgba(93, 45, 65, 0.08);
    --shadow-md: 0 4px 20px rgba(93, 45, 65, 0.12);
    --shadow-lg: 0 8px 30px rgba(93, 45, 65, 0.15);
    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 24px;
    --transition: all 0.3s ease;
    --font-family: 'Tajawal', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family);
    background-color: var(--color-bg);
    color: var(--color-text);
    line-height: 1.7;
    direction: rtl;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

.container {
    max-width: 1600px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Wider container on very large screens */
@media (min-width: 1600px) {
    .container { max-width: 1920px; }
}

/* ============================================
   Announcement Bar
   ============================================ */
.announcement-bar {
    background: var(--color-primary);
    color: var(--color-secondary);
    text-align: center;
    padding: 8px 15px;
    font-size: 14px;
    font-weight: 500;
}

.announcement-bar i {
    margin-left: 6px;
}

/* ============================================
   Header
   ============================================ */
.header {
    background: var(--color-white);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: var(--transition);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 20px;
    max-width: 1280px;
    margin: 0 auto;
    gap: 20px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 26px;
    font-weight: 800;
    color: var(--color-primary);
    white-space: nowrap;
}

.logo i {
    color: var(--color-secondary);
    font-size: 28px;
}

.logo span {
    color: var(--color-secondary);
}

.search-box {
    flex: 1;
    max-width: 400px;
    position: relative;
}

.search-box input {
    width: 100%;
    padding: 10px 45px 10px 15px;
    border: 2px solid var(--color-gray);
    border-radius: 30px;
    font-family: var(--font-family);
    font-size: 15px;
    color: var(--color-text);
    background: var(--color-bg);
    transition: var(--transition);
}

.search-box input:focus {
    outline: none;
    border-color: var(--color-secondary);
    background: var(--color-white);
    box-shadow: 0 0 0 3px rgba(215, 181, 133, 0.2);
}

.search-box button {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--color-gray-dark);
    cursor: pointer;
    font-size: 16px;
    padding: 5px;
    transition: var(--transition);
}

.search-box button:hover {
    color: var(--color-primary);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.cart-btn {
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    background: var(--color-primary);
    color: var(--color-white);
    border-radius: 30px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    font-family: var(--font-family);
}

.cart-btn:hover {
    background: var(--color-primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* Cart shake animation when adding product */
@keyframes cartShake {
    0%, 100% { transform: translateY(0) rotate(0); }
    20% { transform: translateY(-3px) rotate(-5deg); }
    40% { transform: translateY(-1px) rotate(4deg); }
    60% { transform: translateY(-2px) rotate(-3deg); }
    80% { transform: translateY(0) rotate(2deg); }
}
.cart-shake {
    animation: cartShake 0.5s ease-in-out;
}

.cart-count {
    position: absolute;
    top: -5px;
    left: -5px;
    background: var(--color-secondary);
    color: var(--color-primary);
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    border: 2px solid var(--color-white);
}

.track-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 18px;
    background: transparent;
    color: var(--color-primary);
    border: 2px solid var(--color-secondary);
    border-radius: 30px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    font-family: var(--font-family);
}

.home-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 18px;
    background: var(--color-primary);
    color: var(--color-white);
    border: 2px solid var(--color-primary);
    border-radius: 30px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    font-family: var(--font-family);
    text-decoration: none;
}

.home-btn:hover {
    background: var(--color-primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    color: var(--color-white);
}

.track-btn:hover {
    background: var(--color-secondary);
    color: var(--color-primary);
}

/* Mobile menu toggle */
.mobile-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 24px;
    color: var(--color-primary);
    cursor: pointer;
}

/* ============================================
   Hero Section
   ============================================ */
.hero {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
    color: var(--color-white);
    padding: 60px 0;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -10%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(215, 181, 133, 0.15) 0%, transparent 70%);
    border-radius: 50%;
}

.hero::after {
    content: '';
    position: absolute;
    bottom: -30%;
    right: -10%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(215, 181, 133, 0.1) 0%, transparent 70%);
    border-radius: 50%;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
}

.hero h1 {
    font-size: 42px;
    font-weight: 800;
    margin-bottom: 15px;
    line-height: 1.3;
}

.hero p {
    font-size: 18px;
    color: var(--color-secondary);
    margin-bottom: 25px;
}

.hero-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-hero-primary {
    padding: 14px 35px;
    background: var(--color-secondary);
    color: var(--color-primary);
    border-radius: 30px;
    font-weight: 700;
    font-size: 16px;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-hero-primary:hover {
    background: var(--color-white);
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

.btn-hero-secondary {
    padding: 14px 35px;
    background: transparent;
    color: var(--color-white);
    border: 2px solid var(--color-white);
    border-radius: 30px;
    font-weight: 700;
    font-size: 16px;
    transition: var(--transition);
}

.btn-hero-secondary:hover {
    background: var(--color-white);
    color: var(--color-primary);
}

/* ============================================
   Category Filter Bar
   ============================================ */
.category-bar {
    background: var(--color-white);
    padding: 8px 0;
    box-shadow: 0 2px 10px rgba(93, 45, 65, 0.05);
    position: sticky;
    top: 73px;
    z-index: 90;
}

.category-wrapper {
    position: relative;
}

.category-pills {
    display: flex;
    gap: 8px;
    justify-content: center;
    flex-wrap: wrap;
    overflow: visible;
    transition: max-height 0.3s ease;
}

/* Desktop: hide all categories except "جميع المنتجات" by default */
.category-pills > :not(:first-child) {
    display: none;
}

/* Show all when expanded (JS toggles on hover, collapses after 5s) */
.category-pills.expanded > * {
    display: flex;
}

.cat-pill {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 18px;
    background: #FCF9F6 !important;
    color: #4A3B38 !important;
    border: 2px solid transparent !important;
    border-radius: 30px !important;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Tajawal', sans-serif;
    white-space: nowrap;
}

.cat-pill:hover {
    border-color: #D7B585 !important;
    color: #5D2D41 !important;
    background: #ffffff !important;
    box-shadow: 0 2px 10px rgba(215, 181, 133, 0.4);
}

.cat-pill.active {
    background: #5D2D41 !important;
    color: #ffffff !important;
    border-color: #5D2D41 !important;
    box-shadow: 0 3px 12px rgba(93, 45, 65, 0.3);
}

.cat-pill.active i {
    color: #D7B585 !important;
}

.cat-pill i {
    font-size: 14px;
    color: #D7B585 !important;
}

/* Sort dropdown */
.sort-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 25px 0 15px;
    flex-wrap: wrap;
    gap: 15px;
}

.sort-bar h2 {
    font-size: 24px;
    font-weight: 700;
    color: var(--color-primary);
}

.sort-bar h2::after {
    content: '';
    display: block;
    width: 50px;
    height: 3px;
    background: var(--color-secondary);
    border-radius: 3px;
    margin-top: 5px;
}

.sort-select {
    padding: 8px 16px;
    border: 2px solid var(--color-gray);
    border-radius: 20px;
    background: var(--color-white);
    color: var(--color-text);
    font-family: var(--font-family);
    font-size: 14px;
    cursor: pointer;
    transition: var(--transition);
}

.sort-select:focus {
    outline: none;
    border-color: var(--color-secondary);
}

/* ============================================
   Products Grid
   ============================================ */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
    padding: 20px 0 60px;
}

.product-card {
    background: var(--color-white);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    position: relative;
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.product-image {
    width: 100%;
    height: 280px;
    overflow: hidden;
    position: relative;
    background: var(--color-gray);
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.product-card:hover .product-image img {
    transform: scale(1.08);
}

.badge-discount {
    position: absolute;
    top: 12px;
    right: 12px;
    background: var(--color-danger);
    color: white;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 700;
    z-index: 2;
}

.badge-featured {
    position: absolute;
    top: 12px;
    left: 12px;
    background: var(--color-secondary);
    color: var(--color-primary);
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 700;
    z-index: 2;
}

.badge-unavailable {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(74, 59, 56, 0.8);
    color: white;
    padding: 8px 20px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 700;
    z-index: 3;
}

.product-info {
    padding: 18px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.product-category {
    font-size: 13px;
    color: var(--color-secondary-dark);
    font-weight: 600;
    margin-bottom: 6px;
}

.product-name {
    font-size: 17px;
    font-weight: 700;
    color: var(--color-text);
    margin-bottom: 8px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-desc {
    font-size: 14px;
    color: var(--color-gray-dark);
    margin-bottom: 12px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex: 1;
}

.product-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.product-price {
    display: flex;
    flex-direction: column;
}

.price-current {
    font-size: 20px;
    font-weight: 800;
    color: var(--color-primary);
}

.price-old {
    font-size: 14px;
    color: var(--color-gray-dark);
    text-decoration: line-through;
}

.btn-add-cart {
    width: 44px;
    height: 44px;
    background: var(--color-primary);
    color: var(--color-white);
    border: none;
    border-radius: 50%;
    font-size: 18px;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.btn-add-cart:hover {
    background: var(--color-secondary);
    color: var(--color-primary);
    transform: scale(1.1);
}

.btn-add-cart:disabled {
    background: var(--color-gray);
    color: var(--color-gray-dark);
    cursor: not-allowed;
    transform: none;
}

/* ============================================
   Footer
   ============================================ */
.footer {
    background: var(--color-primary);
    color: var(--color-white);
    padding: 50px 0 20px;
    margin-top: 40px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 30px;
}

.footer-col h3 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 18px;
    color: var(--color-secondary);
}

.footer-col p,
.footer-col li {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 10px;
    list-style: none;
}

.footer-col a:hover {
    color: var(--color-secondary);
}

.footer-col i {
    margin-left: 8px;
    color: var(--color-secondary);
    width: 20px;
}

.social-links {
    display: flex;
    gap: 12px;
    margin-top: 15px;
}

.social-links a {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    transition: var(--transition);
}

.social-links a:hover {
    background: var(--color-secondary);
    color: var(--color-primary);
    transform: translateY(-3px);
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    font-size: 14px;
    color: rgba(255, 255, 255, 0.6);
}

/* ============================================
   Page Headers
   ============================================ */
.page-header {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
    color: white;
    padding: 40px 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.page-header::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -5%;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(215, 181, 133, 0.15) 0%, transparent 70%);
    border-radius: 50%;
}

.page-header h1 {
    font-size: 32px;
    font-weight: 800;
    position: relative;
    z-index: 2;
}

.breadcrumb {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 10px;
    font-size: 14px;
    color: var(--color-secondary);
    position: relative;
    z-index: 2;
}

.breadcrumb a:hover {
    color: var(--color-white);
}

/* ============================================
   Product Detail Page
   ============================================ */
.product-detail {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    padding: 40px 0;
    max-width: 100%;
    box-sizing: border-box;
}

.product-detail-gallery {
    position: relative;
    max-width: 100%;
    box-sizing: border-box;
}

.product-main-image {
    width: 100%;
    height: 450px;
    object-fit: cover;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    background: var(--color-gray);
}

.product-detail-info h1 {
    font-size: 28px;
    font-weight: 800;
    color: var(--color-text);
    margin-bottom: 10px;
}

.detail-category {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--color-secondary);
    color: var(--color-primary);
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 15px;
}

.detail-price {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}

.detail-price .price-current {
    font-size: 32px;
    color: var(--color-primary);
    font-weight: 800;
}

.detail-price .price-old {
    font-size: 20px;
}

.detail-description {
    color: var(--color-gray-dark);
    font-size: 16px;
    margin-bottom: 25px;
    line-height: 1.8;
}

.detail-sections {
    margin-bottom: 25px;
}

.detail-section {
    background: var(--color-gray);
    border-radius: var(--radius-sm);
    padding: 15px 20px;
    margin-bottom: 10px;
}

.detail-section h4 {
    font-size: 15px;
    color: var(--color-primary);
    margin-bottom: 5px;
    font-weight: 700;
}

.detail-section p {
    font-size: 15px;
    color: var(--color-text);
}

.quantity-selector {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 25px;
}

.quantity-selector label {
    font-weight: 600;
    color: var(--color-text);
}

.qty-control {
    display: flex;
    align-items: center;
    border: 2px solid var(--color-gray);
    border-radius: 12px;
    overflow: hidden;
}

.qty-btn {
    width: 40px;
    height: 40px;
    background: var(--color-bg);
    border: none;
    font-size: 18px;
    cursor: pointer;
    color: var(--color-primary);
    transition: var(--transition);
}

.qty-btn:hover {
    background: var(--color-secondary);
}

.qty-input {
    width: 60px;
    height: 40px;
    text-align: center;
    border: none;
    font-size: 16px;
    font-weight: 700;
    color: var(--color-text);
    background: var(--color-white);
    font-family: var(--font-family);
}

.btn-large-add {
    width: 100%;
    padding: 16px;
    background: var(--color-primary);
    color: var(--color-white);
    border: none;
    border-radius: 14px;
    font-size: 17px;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    font-family: var(--font-family);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.btn-large-add:hover {
    background: var(--color-primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-large-add:disabled {
    background: var(--color-gray);
    color: var(--color-gray-dark);
    cursor: not-allowed;
    transform: none;
}

.availability-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 15px;
}

.availability-tag.in-stock {
    background: rgba(40, 167, 69, 0.1);
    color: var(--color-success);
}

.availability-tag.out-stock {
    background: rgba(220, 53, 69, 0.1);
    color: var(--color-danger);
}

/* ============================================
   Cart Page
   ============================================ */
.cart-page {
    padding: 40px 0;
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 30px;
    align-items: start;
}

.cart-items {
    background: var(--color-white);
    border-radius: var(--radius-md);
    padding: 25px;
    box-shadow: var(--shadow-sm);
}

.cart-items h2 {
    font-size: 22px;
    font-weight: 700;
    color: var(--color-primary);
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--color-gray);
}

.cart-item {
    display: grid;
    grid-template-columns: 100px 1fr auto;
    gap: 15px;
    padding: 18px 0;
    border-bottom: 1px solid var(--color-gray);
    align-items: center;
}

.cart-item:last-child {
    border-bottom: none;
}

.cart-item-image {
    width: 100px;
    height: 100px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    background: var(--color-gray);
}

.cart-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cart-item-info h4 {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 5px;
    color: var(--color-text);
}

.cart-item-price {
    color: var(--color-primary);
    font-weight: 700;
    font-size: 15px;
}

.cart-item-actions {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 10px;
}

.cart-qty {
    display: flex;
    align-items: center;
    border: 2px solid var(--color-gray);
    border-radius: 10px;
    overflow: hidden;
}

.cart-qty button {
    width: 32px;
    height: 32px;
    background: var(--color-bg);
    border: none;
    cursor: pointer;
    color: var(--color-primary);
    font-size: 16px;
}

.cart-qty span {
    width: 35px;
    text-align: center;
    font-weight: 700;
}

.cart-item-remove {
    background: none;
    border: none;
    color: var(--color-danger);
    cursor: pointer;
    font-size: 18px;
    padding: 5px;
    transition: var(--transition);
}

.cart-item-remove:hover {
    transform: scale(1.2);
}

.cart-summary {
    background: var(--color-white);
    border-radius: var(--radius-md);
    padding: 25px;
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 90px;
}

.cart-summary h2 {
    font-size: 20px;
    font-weight: 700;
    color: var(--color-primary);
    margin-bottom: 20px;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid var(--color-gray);
    font-size: 15px;
}

.summary-row.total {
    border-bottom: none;
    border-top: 2px solid var(--color-primary);
    margin-top: 10px;
    padding-top: 15px;
    font-size: 20px;
    font-weight: 800;
    color: var(--color-primary);
}

.coupon-section {
    margin: 20px 0;
}

.coupon-input {
    display: flex;
    gap: 8px;
}

.coupon-input input {
    flex: 1;
    padding: 10px 15px;
    border: 2px solid var(--color-gray);
    border-radius: 10px;
    font-family: var(--font-family);
    font-size: 14px;
}

.coupon-input input:focus {
    outline: none;
    border-color: var(--color-secondary);
}

.coupon-input button {
    padding: 10px 18px;
    background: var(--color-secondary);
    color: var(--color-primary);
    border: none;
    border-radius: 10px;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    font-family: var(--font-family);
}

.coupon-input button:hover {
    background: var(--color-secondary-dark);
}

.coupon-applied {
    background: rgba(40, 167, 69, 0.1);
    border: 1px solid var(--color-success);
    border-radius: 10px;
    padding: 10px 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 10px;
}

.coupon-applied span {
    color: var(--color-success);
    font-weight: 600;
    font-size: 14px;
}

.coupon-applied button {
    background: none;
    border: none;
    color: var(--color-danger);
    cursor: pointer;
}

.btn-checkout {
    width: 100%;
    padding: 16px;
    background: var(--color-primary);
    color: var(--color-white);
    border: none;
    border-radius: 14px;
    font-size: 17px;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    margin-top: 15px;
    font-family: var(--font-family);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.btn-checkout:hover {
    background: var(--color-primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.empty-cart {
    text-align: center;
    padding: 60px 20px;
}

.empty-cart i {
    font-size: 64px;
    color: var(--color-gray-dark);
    margin-bottom: 20px;
    opacity: 0.4;
}

.empty-cart h3 {
    font-size: 22px;
    color: var(--color-text);
    margin-bottom: 10px;
}

.empty-cart p {
    color: var(--color-gray-dark);
    margin-bottom: 20px;
}

.btn-continue {
    display: inline-block;
    padding: 12px 30px;
    background: var(--color-primary);
    color: var(--color-white);
    border-radius: 30px;
    font-weight: 700;
    transition: var(--transition);
}

.btn-continue:hover {
    background: var(--color-primary-dark);
    transform: translateY(-2px);
}

/* ============================================
   Checkout Page
   ============================================ */
.checkout-page {
    padding: 40px 0;
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 30px;
    align-items: start;
}

.checkout-form {
    background: var(--color-white);
    border-radius: var(--radius-md);
    padding: 30px;
    box-shadow: var(--shadow-sm);
}

.checkout-form h2 {
    font-size: 22px;
    font-weight: 700;
    color: var(--color-primary);
    margin-bottom: 25px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--color-text);
    font-size: 15px;
}

.form-group label .required {
    color: var(--color-danger);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--color-gray);
    border-radius: 10px;
    font-family: var(--font-family);
    font-size: 15px;
    color: var(--color-text);
    background: var(--color-bg);
    transition: var(--transition);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--color-secondary);
    background: var(--color-white);
    box-shadow: 0 0 0 3px rgba(215, 181, 133, 0.2);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.delivery-pref {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.radio-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    border: 2px solid var(--color-gray);
    border-radius: 10px;
    cursor: pointer;
    transition: var(--transition);
}

.radio-option:hover {
    border-color: var(--color-secondary);
}

.radio-option input:checked + span {
    color: var(--color-primary);
    font-weight: 700;
}

.radio-option:has(input:checked) {
    border-color: var(--color-primary);
    background: rgba(93, 45, 65, 0.05);
}

.city-select-wrapper {
    position: relative;
}

.delivery-fee-info {
    background: rgba(215, 181, 133, 0.15);
    border-radius: 10px;
    padding: 10px 15px;
    margin-top: 8px;
    font-size: 14px;
    color: var(--color-primary);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ============================================
   Order Success / WhatsApp Redirect
   ============================================ */
.order-success {
    text-align: center;
    padding: 60px 20px;
    max-width: 600px;
    margin: 0 auto;
}

.success-icon {
    width: 100px;
    height: 100px;
    background: rgba(40, 167, 69, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 25px;
    font-size: 50px;
    color: var(--color-success);
    animation: bounceIn 0.6s ease;
}

@keyframes bounceIn {
    0% { transform: scale(0); }
    60% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

.order-success h1 {
    font-size: 28px;
    color: var(--color-primary);
    margin-bottom: 10px;
}

.order-success p {
    color: var(--color-gray-dark);
    font-size: 16px;
    margin-bottom: 25px;
}

.order-info-card {
    background: var(--color-white);
    border-radius: var(--radius-md);
    padding: 25px;
    box-shadow: var(--shadow-sm);
    text-align: right;
    margin-bottom: 25px;
}

.order-info-card h3 {
    color: var(--color-primary);
    margin-bottom: 15px;
    font-size: 18px;
    border-bottom: 2px solid var(--color-gray);
    padding-bottom: 10px;
}

.order-info-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    font-size: 15px;
}

.order-info-row span:first-child {
    color: var(--color-gray-dark);
}

.order-info-row span:last-child {
    font-weight: 600;
}

.order-number-display {
    background: var(--color-primary);
    color: var(--color-secondary);
    padding: 15px;
    border-radius: var(--radius-sm);
    text-align: center;
    margin: 15px 0;
}

.order-number-display .number {
    font-size: 28px;
    font-weight: 800;
    letter-spacing: 2px;
}

.btn-whatsapp {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 16px 40px;
    background: #25D366;
    color: white;
    border-radius: 14px;
    font-size: 18px;
    font-weight: 700;
    transition: var(--transition);
    margin: 5px;
}

.btn-whatsapp:hover {
    background: #1da851;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-track {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 16px 40px;
    background: var(--color-primary);
    color: white;
    border-radius: 14px;
    font-size: 18px;
    font-weight: 700;
    transition: var(--transition);
    margin: 5px;
}

.btn-track:hover {
    background: var(--color-primary-dark);
    transform: translateY(-2px);
}

/* ============================================
   Track Order Page
   ============================================ */
.track-page {
    padding: 40px 0;
    max-width: 700px;
    margin: 0 auto;
}

.track-search {
    background: var(--color-white);
    border-radius: var(--radius-md);
    padding: 30px;
    box-shadow: var(--shadow-sm);
    text-align: center;
    margin-bottom: 25px;
}

.track-search h2 {
    color: var(--color-primary);
    font-size: 22px;
    margin-bottom: 8px;
}

.track-search p {
    color: var(--color-gray-dark);
    margin-bottom: 20px;
}

.track-input-group {
    display: flex;
    gap: 10px;
    max-width: 500px;
    margin: 0 auto;
}

.track-input-group input {
    flex: 1;
    padding: 14px 18px;
    border: 2px solid var(--color-gray);
    border-radius: 30px;
    font-family: var(--font-family);
    font-size: 16px;
    text-align: center;
}

.track-input-group input:focus {
    outline: none;
    border-color: var(--color-secondary);
}

.track-input-group button {
    padding: 14px 30px;
    background: var(--color-primary);
    color: white;
    border: none;
    border-radius: 30px;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    font-family: var(--font-family);
    white-space: nowrap;
}

.track-input-group button:hover {
    background: var(--color-primary-dark);
}

/* Order tracking timeline */
.order-tracking-card {
    background: var(--color-white);
    border-radius: var(--radius-md);
    padding: 30px;
    box-shadow: var(--shadow-sm);
}

.order-tracking-card h2 {
    color: var(--color-primary);
    margin-bottom: 5px;
    font-size: 22px;
}

.order-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 20px;
    border-radius: 30px;
    font-size: 14px;
    font-weight: 700;
    margin: 10px 0 25px;
}

.status-pending {
    background: rgba(255, 193, 7, 0.15);
    color: #856404;
}

.status-shipped {
    background: rgba(23, 162, 184, 0.15);
    color: #0c5460;
}

.status-completed {
    background: rgba(40, 167, 69, 0.15);
    color: var(--color-success);
}

.status-cancelled {
    background: rgba(220, 53, 69, 0.15);
    color: var(--color-danger);
}

.tracking-timeline {
    position: relative;
    padding: 0 10px;
    margin-bottom: 30px;
}

.tracking-timeline::before {
    content: '';
    position: absolute;
    right: 24px;
    top: 10px;
    bottom: 10px;
    width: 3px;
    background: var(--color-gray);
}

.tracking-step {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    margin-bottom: 25px;
    position: relative;
}

.tracking-step-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--color-gray);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: var(--color-gray-dark);
    z-index: 2;
    flex-shrink: 0;
    transition: var(--transition);
}

.tracking-step.active .tracking-step-icon {
    background: var(--color-primary);
    color: var(--color-white);
}

.tracking-step.current .tracking-step-icon {
    background: var(--color-secondary);
    color: var(--color-primary);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(215, 181, 133, 0.5); }
    70% { box-shadow: 0 0 0 15px rgba(215, 181, 133, 0); }
    100% { box-shadow: 0 0 0 0 rgba(215, 181, 133, 0); }
}

.tracking-step-content h4 {
    font-size: 16px;
    color: var(--color-text);
    margin-bottom: 3px;
}

.tracking-step-content p {
    font-size: 14px;
    color: var(--color-gray-dark);
}

.tracking-step.active .tracking-step-content h4 {
    color: var(--color-primary);
    font-weight: 700;
}

/* ============================================
   Saved Cart Notification
   ============================================ */
.saved-cart-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(74, 59, 56, 0.6);
    backdrop-filter: blur(4px);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.saved-cart-box {
    background: var(--color-white);
    border-radius: var(--radius-lg);
    padding: 35px;
    max-width: 500px;
    width: 100%;
    text-align: center;
    animation: slideUp 0.4s ease;
}

@keyframes slideUp {
    from { transform: translateY(50px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.saved-cart-box .icon {
    width: 80px;
    height: 80px;
    background: rgba(215, 181, 133, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 40px;
    color: var(--color-primary);
}

.saved-cart-box h3 {
    font-size: 22px;
    color: var(--color-text);
    margin-bottom: 10px;
}

.saved-cart-box p {
    color: var(--color-gray-dark);
    margin-bottom: 25px;
}

.saved-cart-actions {
    display: flex;
    gap: 12px;
    flex-direction: column;
}

.saved-cart-actions button {
    padding: 13px;
    border-radius: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    font-family: var(--font-family);
    font-size: 15px;
    border: none;
}

.btn-restore {
    background: var(--color-primary);
    color: white;
}

.btn-restore:hover {
    background: var(--color-primary-dark);
}

.btn-replace {
    background: var(--color-secondary);
    color: var(--color-primary);
}

.btn-replace:hover {
    background: var(--color-secondary-dark);
}

.btn-delete {
    background: transparent;
    color: var(--color-danger);
    border: 1px solid var(--color-gray) !important;
}

.btn-delete:hover {
    background: rgba(220, 53, 69, 0.05);
}

/* ============================================
   FAQ Page
   ============================================ */
.faq-page {
    padding: 40px 0;
    max-width: 800px;
    margin: 0 auto;
}

.faq-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.faq-item {
    background: var(--color-white);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.faq-item.active {
    box-shadow: var(--shadow-md);
}

.faq-question {
    padding: 20px 25px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    font-weight: 700;
    color: var(--color-primary);
    font-size: 16px;
    transition: var(--transition);
}

.faq-question:hover {
    background: var(--color-bg);
}

.faq-question i {
    transition: var(--transition);
    color: var(--color-secondary);
    font-size: 18px;
}

.faq-item.active .faq-question i {
    transform: rotate(180deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
    color: var(--color-gray-dark);
    font-size: 15px;
    line-height: 1.8;
}

.faq-item.active .faq-answer {
    max-height: 500px;
    padding: 0 25px 20px;
}

/* ============================================
   Toast Notification
   ============================================ */
.toast {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: var(--color-primary);
    color: white;
    padding: 15px 25px;
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    z-index: 3000;
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    font-size: 15px;
    transform: translateY(100px);
    opacity: 0;
    transition: var(--transition);
}

.toast.show {
    transform: translateY(0);
    opacity: 1;
}

.toast.success {
    background: var(--color-success);
}

.toast.error {
    background: var(--color-danger);
}

/* ============================================
   Admin Panel
   ============================================ */
.admin-wrapper {
    display: flex;
    min-height: 100vh;
}

.admin-sidebar {
    width: 260px;
    background: var(--color-primary);
    color: white;
    padding: 0;
    position: fixed;
    top: 0;
    bottom: 0;
    right: 0;
    overflow-y: auto;
    z-index: 100;
    transition: var(--transition);
}

.admin-sidebar-header {
    padding: 25px 20px;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.admin-sidebar-header h2 {
    color: var(--color-secondary);
    font-size: 22px;
    font-weight: 800;
}

.admin-sidebar-header p {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.6);
    margin-top: 3px;
}

.admin-nav {
    list-style: none;
    padding: 15px 0;
}

.admin-nav li a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 25px;
    color: rgba(255, 255, 255, 0.8);
    font-size: 15px;
    font-weight: 500;
    transition: var(--transition);
    border-right: 3px solid transparent;
}

.admin-nav li a:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.admin-nav li a.active {
    background: rgba(255, 255, 255, 0.1);
    color: var(--color-secondary);
    border-right-color: var(--color-secondary);
}

.admin-nav li a i {
    width: 20px;
    text-align: center;
    font-size: 17px;
}

.admin-content {
    flex: 1;
    margin-right: 260px;
    padding: 0;
    background: var(--color-bg);
}

.admin-topbar {
    background: white;
    padding: 15px 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--shadow-sm);
    margin-bottom: 25px;
}

.admin-topbar h1 {
    font-size: 22px;
    color: var(--color-primary);
    font-weight: 700;
}

.admin-user {
    display: flex;
    align-items: center;
    gap: 10px;
}

.admin-user .avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--color-primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
}

.admin-logout {
    padding: 8px 16px;
    background: var(--color-danger);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    font-family: var(--font-family);
    font-size: 14px;
}

.admin-logout:hover {
    opacity: 0.9;
}

.admin-content-inner {
    padding: 0 25px 40px;
}

/* Stats cards */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: white;
    border-radius: var(--radius-md);
    padding: 25px;
    box-shadow: var(--shadow-sm);
    display: flex;
    align-items: center;
    gap: 18px;
    transition: var(--transition);
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.stat-icon {
    width: 55px;
    height: 55px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.stat-icon.bg-primary { background: rgba(93, 45, 65, 0.1); color: var(--color-primary); }
.stat-icon.bg-warning { background: rgba(255, 193, 7, 0.1); color: #856404; }
.stat-icon.bg-info { background: rgba(23, 162, 184, 0.1); color: #0c5460; }
.stat-icon.bg-success { background: rgba(40, 167, 69, 0.1); color: var(--color-success); }
.stat-icon.bg-danger { background: rgba(220, 53, 69, 0.1); color: var(--color-danger); }

.stat-info h3 {
    font-size: 28px;
    font-weight: 800;
    color: var(--color-text);
    margin-bottom: 2px;
}

.stat-info p {
    font-size: 14px;
    color: var(--color-gray-dark);
}

/* Admin table */
.admin-table {
    background: white;
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    margin-bottom: 25px;
}

.table-header {
    padding: 20px 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid var(--color-gray);
}

.table-header h2 {
    font-size: 20px;
    color: var(--color-primary);
    font-weight: 700;
}

.btn-add {
    padding: 10px 20px;
    background: var(--color-primary);
    color: white;
    border: none;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    font-family: var(--font-family);
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-add:hover {
    background: var(--color-primary-dark);
}

table {
    width: 100%;
    border-collapse: collapse;
}

table th {
    padding: 15px 20px;
    text-align: right;
    font-size: 14px;
    font-weight: 700;
    color: var(--color-gray-dark);
    background: var(--color-bg);
    border-bottom: 2px solid var(--color-gray);
    white-space: nowrap;
}

table td {
    padding: 15px 20px;
    font-size: 14px;
    color: var(--color-text);
    border-bottom: 1px solid var(--color-gray);
}

table tr:last-child td {
    border-bottom: none;
}

table tr:hover {
    background: var(--color-bg);
}

.product-thumb {
    width: 50px;
    height: 50px;
    border-radius: 8px;
    object-fit: cover;
    background: var(--color-gray);
}

.action-btns {
    display: flex;
    gap: 8px;
}

.action-btn {
    width: 34px;
    height: 34px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    transition: var(--transition);
}

.action-btn.edit { background: rgba(23, 162, 184, 0.1); color: #0c5460; }
.action-btn.edit:hover { background: #17a2b8; color: white; }
.action-btn.delete { background: rgba(220, 53, 69, 0.1); color: var(--color-danger); }
.action-btn.delete:hover { background: var(--color-danger); color: white; }
.action-btn.view { background: rgba(93, 45, 65, 0.1); color: var(--color-primary); }
.action-btn.view:hover { background: var(--color-primary); color: white; }

/* Toggle switch */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--color-gray);
    border-radius: 24px;
    transition: var(--transition);
}

.toggle-slider::before {
    content: '';
    position: absolute;
    height: 18px;
    width: 18px;
    right: 3px;
    bottom: 3px;
    background: white;
    border-radius: 50%;
    transition: var(--transition);
}

.toggle-switch input:checked + .toggle-slider {
    background: var(--color-primary);
}

.toggle-switch input:checked + .toggle-slider::before {
    transform: translateX(-20px);
}

/* Admin form */
.admin-form {
    background: white;
    border-radius: var(--radius-md);
    padding: 30px;
    box-shadow: var(--shadow-sm);
    max-width: 800px;
}

.form-actions {
    display: flex;
    gap: 12px;
    margin-top: 25px;
}

.btn-save {
    padding: 12px 30px;
    background: var(--color-primary);
    color: white;
    border: none;
    border-radius: 10px;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    font-family: var(--font-family);
    font-size: 15px;
}

.btn-save:hover {
    background: var(--color-primary-dark);
}

.btn-cancel {
    padding: 12px 30px;
    background: transparent;
    color: var(--color-text);
    border: 2px solid var(--color-gray);
    border-radius: 10px;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    font-family: var(--font-family);
    font-size: 15px;
}

.btn-cancel:hover {
    background: var(--color-gray);
}

/* Admin login */
.admin-login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
}

.admin-login-box {
    background: white;
    border-radius: var(--radius-lg);
    padding: 45px;
    max-width: 400px;
    width: 90%;
    box-shadow: var(--shadow-lg);
    text-align: center;
}

.admin-login-box .logo {
    justify-content: center;
    margin-bottom: 25px;
}

.admin-login-box h2 {
    color: var(--color-primary);
    font-size: 24px;
    margin-bottom: 5px;
}

.admin-login-box p {
    color: var(--color-gray-dark);
    margin-bottom: 25px;
    font-size: 15px;
}

.alert {
    padding: 12px 18px;
    border-radius: 10px;
    margin-bottom: 18px;
    font-size: 14px;
    font-weight: 600;
}

.alert-danger {
    background: rgba(220, 53, 69, 0.1);
    color: var(--color-danger);
    border: 1px solid rgba(220, 53, 69, 0.3);
}

.alert-success {
    background: rgba(40, 167, 69, 0.1);
    color: var(--color-success);
    border: 1px solid rgba(40, 167, 69, 0.3);
}

/* Mobile sidebar toggle */
.admin-menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 22px;
    color: var(--color-primary);
    cursor: pointer;
}

/* ============================================
   Responsive Design
   ============================================ */
@media (max-width: 992px) {
    .product-detail {
        grid-template-columns: 1fr;
    }

    .cart-page,
    .checkout-page {
        grid-template-columns: 1fr;
    }

    .cart-summary {
        position: static;
    }

    .admin-sidebar {
        transform: translateX(100%);
    }

    .admin-sidebar.open {
        transform: translateX(0);
    }

    .admin-content {
        margin-right: 0;
    }

    .admin-menu-toggle {
        display: block;
    }
}

@media (max-width: 768px) {
    .hero h1 {
        font-size: 30px;
    }

    .hero p {
        font-size: 16px;
    }

    .search-box {
        display: none;
    }

    .header-actions .track-btn span {
        display: none;
    }

    .header-actions .home-btn span {
        display: none;
    }

    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 15px;
    }

    .product-image {
        height: 200px;
    }

    .product-info {
        padding: 12px;
    }

    .product-name {
        font-size: 14px;
    }

    .price-current {
        font-size: 17px;
    }

    .cart-item {
        grid-template-columns: 80px 1fr;
    }

    .cart-item-actions {
        grid-column: 1 / -1;
        flex-direction: row;
        justify-content: space-between;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .category-bar {
        top: 65px;
    }

    .category-pills {
        justify-content: flex-start;
        flex-wrap: nowrap;
        overflow-x: auto;
        padding-bottom: 5px;
        -webkit-overflow-scrolling: touch;
    }

    /* Mobile: show all categories (scrollable) */
    .category-pills > :not(:first-child) {
        display: flex;
    }

    .category-pills:hover {
        max-height: 42px;
        overflow-x: auto;
    }

    .cat-pill {
        white-space: nowrap;
        padding: 6px 14px;
        font-size: 12px;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 25px;
    }

    .page-header h1 {
        font-size: 24px;
    }

    .product-main-image {
        height: 300px;
    }

    .sort-bar h2 {
        font-size: 20px;
    }

    .admin-content-inner {
        padding: 0 15px 30px;
    }

    table {
        font-size: 13px;
    }

    table th,
    table td {
        padding: 10px 12px;
    }

    .stats-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 480px) {
    .header-inner {
        padding: 12px 15px;
    }

    .logo {
        font-size: 20px;
    }

    .hero {
        padding: 40px 0;
    }

    .hero h1 {
        font-size: 24px;
    }

    .hero-actions {
        flex-direction: column;
    }

    .btn-hero-primary,
    .btn-hero-secondary {
        width: 100%;
        justify-content: center;
    }

    .products-grid {
        grid-template-columns: 1fr 1fr;
        gap: 12px;
    }

    .product-image {
        height: 160px;
    }

    .cart-btn {
        padding: 10px 14px;
        font-size: 14px;
    }

    .cart-btn span {
        display: none;
    }

    .order-success h1 {
        font-size: 22px;
    }

    .btn-whatsapp,
    .btn-track {
        width: 100%;
        justify-content: center;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .admin-topbar h1 {
        font-size: 18px;
    }
}

/* ============================================
   Scrollbar Styling
   ============================================ */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: var(--color-gray);
}

::-webkit-scrollbar-thumb {
    background: var(--color-secondary);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--color-secondary-dark);
}

/* ============================================
   Loading Spinner
   ============================================ */
.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--color-gray);
    border-top-color: var(--color-primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 20px auto;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ============================================
   Utilities
   ============================================ */
.text-center { text-align: center; }
.mt-20 { margin-top: 20px; }
.mb-20 { margin-bottom: 20px; }
.hidden { display: none !important; }

/* ============================================
   Lightbox - Image Fullscreen Viewer
   ============================================ */
.lightbox-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 99999;
    justify-content: center;
    align-items: center;
    cursor: zoom-out;
    animation: lightboxFadeIn 0.3s ease;
}

.lightbox-overlay.active {
    display: flex;
}

.lightbox-img {
    max-width: 90%;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.5);
    cursor: zoom-out;
}

.lightbox-close {
    position: absolute;
    top: 20px;
    left: 30px;
    color: white;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    z-index: 100000;
    line-height: 1;
    user-select: none;
    transition: color 0.2s;
}

.lightbox-close:hover {
    color: #ef4444;
}

@keyframes lightboxFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Mobile: full width lightbox */
@media (max-width: 768px) {
    .lightbox-img {
        max-width: 95%;
        max-height: 85vh;
    }

    .lightbox-close {
        top: 15px;
        left: 15px;
        font-size: 35px;
    }
}

/* ============================================
   Hero Carousel
   ============================================ */
.hero-carousel {
    position: relative;
    width: 100%;
    height: 400px;
    overflow: hidden;
    background: #1a1a1a;
}

.carousel-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0;
    transition: opacity 1s ease-in-out;
    display: flex;
    align-items: flex-end;
}

.carousel-slide.active {
    opacity: 1;
}

.carousel-overlay {
    width: 100%;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.6));
    padding: 60px 0 40px;
}

.carousel-title {
    color: white;
    font-size: 32px;
    font-weight: 800;
    margin-bottom: 15px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.carousel-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 30px;
    background: var(--color-secondary);
    color: var(--color-primary);
    border-radius: 30px;
    font-weight: 700;
    font-size: 15px;
    transition: var(--transition);
}

.carousel-btn:hover {
    background: white;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.carousel-dots {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 10;
}

.carousel-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: var(--transition);
}

.carousel-dot.active {
    background: var(--color-secondary);
    transform: scale(1.3);
}

.carousel-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.8);
    border: none;
    color: var(--color-primary);
    font-size: 18px;
    cursor: pointer;
    z-index: 10;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.carousel-arrow:hover {
    background: white;
    box-shadow: var(--shadow-md);
}

.carousel-prev {
    right: 20px;
}

.carousel-next {
    left: 20px;
}

/* ============================================
   Category Grid (3x3 per category on homepage)
   ============================================ */
.category-section {
    margin-bottom: 40px;
}

.category-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 0 15px;
    border-bottom: 2px solid var(--color-gray);
    margin-bottom: 20px;
}

.category-section-title {
    font-size: 22px;
    font-weight: 700;
    color: var(--color-primary);
    display: flex;
    align-items: center;
    gap: 10px;
}

.category-section-title i {
    color: var(--color-secondary);
    font-size: 24px;
}

.category-view-all {
    color: var(--color-secondary-dark);
    font-size: 14px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: var(--transition);
}

.category-view-all:hover {
    color: var(--color-primary);
}

.category-grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

/* Used product badge */
.badge-used {
    position: absolute;
    top: 12px;
    left: 12px;
    background: #f59e0b;
    color: white;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    z-index: 2;
}

/* 4-column product grid (homepage) — responsive auto-fill for all devices */
.products-grid-4 {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)) !important;
    gap: 20px;
}

/* Responsive breakpoints */
@media (max-width: 1200px) {
    .products-grid-4 { grid-template-columns: repeat(4, 1fr) !important; }
}
@media (max-width: 1024px) {
    .products-grid-4 { grid-template-columns: repeat(3, 1fr) !important; }
}
@media (max-width: 768px) {
    .products-grid-4 { grid-template-columns: 1fr 1fr !important; gap: 15px; }
}
@media (max-width: 480px) {
    .products-grid-4 { grid-template-columns: 1fr 1fr !important; gap: 12px; }
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.pagination-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    height: 42px;
    padding: 0 14px;
    background: white;
    color: var(--color-text);
    border: 2px solid var(--color-gray);
    border-radius: 10px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: var(--transition);
    font-family: var(--font-family);
    text-decoration: none;
    gap: 6px;
}

.pagination-btn:hover {
    border-color: var(--color-secondary);
    color: var(--color-primary);
    background: var(--color-bg);
}

.pagination-btn.active {
    background: var(--color-primary);
    color: white;
    border-color: var(--color-primary);
}

.pagination-dots {
    color: var(--color-gray-dark);
    font-size: 14px;
    padding: 0 5px;
}

/* Seller info display on product page */
.seller-info {
    font-size: 13px;
    color: var(--color-gray-dark);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.seller-info i {
    color: var(--color-secondary);
}

/* Delivery time display on product page */
.delivery-time-info {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    background: rgba(23, 162, 184, 0.1);
    color: #0c5460;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 15px;
}

/* Used product section on detail page */
.used-product-notice {
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.3);
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 20px;
}

.used-product-notice h4 {
    color: #856404;
    font-size: 15px;
    margin-bottom: 5px;
}

.used-product-notice p {
    color: #856404;
    font-size: 14px;
}

/* ============================================
   Responsive - Carousel & Category Grid
   ============================================ */
@media (max-width: 768px) {
    .hero-carousel {
        height: 280px;
    }

    .carousel-title {
        font-size: 22px;
    }

    .carousel-overlay {
        padding: 30px 0 20px;
    }

    .category-grid-3 {
        grid-template-columns: 1fr 1fr;
        gap: 12px;
    }

    .category-section-title {
        font-size: 18px;
    }
}

@media (max-width: 480px) {
    .hero-carousel {
        height: 200px;
    }

    .carousel-title {
        font-size: 18px;
    }

    .carousel-arrow {
        width: 36px;
        height: 36px;
        font-size: 14px;
    }

    .category-grid-3 {
        grid-template-columns: 1fr;
    }

    .pagination-btn {
        min-width: 36px;
        height: 36px;
        padding: 0 10px;
        font-size: 13px;
    }
}

/* ============================================
   Image Zoom - Hover Magnifier
   ============================================ */
.zoom-container {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
}

.zoom-container .product-main-image {
    width: 100%;
    height: 450px;
    object-fit: cover;
    border-radius: 0;
    box-shadow: none;
    transition: transform 0.2s ease;
}

.zoom-lens {
    position: absolute;
    width: 120px;
    height: 120px;
    border: 2px solid #D7B585;
    background: rgba(215, 181, 133, 0.15);
    border-radius: 50%;
    pointer-events: none;
    display: none;
    z-index: 10;
    box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.1);
}

.zoom-result {
    position: absolute;
    top: 0;
    left: 105%;
    width: 300px;
    height: 300px;
    border-radius: var(--radius-md);
    overflow: hidden;
    display: none;
    z-index: 20;
    box-shadow: var(--shadow-lg);
    border: 2px solid #D7B585;
    background: #fff;
}

.zoom-result img {
    position: absolute;
    max-width: none !important;
    object-fit: cover;
}

.zoom-hint {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(93, 45, 65, 0.85);
    color: #fff;
    padding: 5px 14px;
    border-radius: 20px;
    font-size: 12px;
    white-space: nowrap;
    pointer-events: none;
    backdrop-filter: blur(4px);
    z-index: 10;
}

.zoom-hint i {
    color: #D7B585;
    margin-left: 4px;
}

/* Hide zoom result on mobile - use pinch zoom instead */
@media (max-width: 768px) {
    .zoom-result {
        display: none !important;
    }
    .zoom-lens {
        display: none !important;
    }
    .zoom-container .product-main-image {
        height: 300px;
        touch-action: pinch-zoom;
    }
    .zoom-hint {
        font-size: 11px;
    }
}

/* ============================================
   Purchase Counter - Promotional Badge
   ============================================ */
.purchase-counter {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, rgba(215, 181, 133, 0.15), rgba(93, 45, 65, 0.08));
    color: #5D2D41;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    border: 1px solid rgba(215, 181, 133, 0.4);
    margin-bottom: 12px;
    animation: pulseGlow 2s ease-in-out infinite alternate;
}

.purchase-counter i {
    color: #e25822;
    font-size: 16px;
}

.purchase-counter strong {
    color: #5D2D41;
    font-weight: 800;
    font-size: 16px;
}

@keyframes pulseGlow {
    from { box-shadow: 0 0 0 0 rgba(215, 181, 133, 0.3); }
    to { box-shadow: 0 0 0 6px rgba(215, 181, 133, 0); }
}

@media (max-width: 768px) {
    .purchase-counter {
        font-size: 12px;
        padding: 6px 12px;
    }
    .purchase-counter strong {
        font-size: 14px;
    }
}

/* ============================================
   Subcategory Dropdown
   ============================================ */
.cat-pill-wrapper {
    position: relative;
    display: inline-block;
}

.cat-arrow {
    font-size: 10px !important;
    color: #D7B585 !important;
    margin-right: 2px;
    transition: transform 0.3s ease;
}

.cat-pill-wrapper:hover .cat-arrow {
    transform: rotate(180deg);
}

.cat-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    min-width: 180px;
    background: #ffffff !important;
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(93, 45, 65, 0.2);
    padding: 8px;
    z-index: 1000;
    display: none;
    flex-direction: column;
    gap: 4px;
    border: 1px solid rgba(215, 181, 133, 0.3);
}

.cat-pill-wrapper:hover .cat-dropdown {
    display: flex;
}

/* Click-to-open state (mobile + desktop) */
.cat-pill-wrapper.cat-open .cat-dropdown {
    display: flex;
}
.cat-pill-wrapper.cat-open .cat-arrow {
    transform: rotate(180deg);
}

.cat-sub-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    background: transparent !important;
    color: #4A3B38 !important;
    border: none !important;
    border-radius: 8px !important;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: 'Tajawal', sans-serif;
    text-align: right;
    width: 100%;
}

.cat-sub-item:hover {
    background: #FCF9F6 !important;
    color: #5D2D41 !important;
}

.cat-sub-item.active {
    background: #5D2D41 !important;
    color: #ffffff !important;
}

.cat-sub-item i {
    color: #D7B585 !important;
    font-size: 13px;
    width: 18px;
    text-align: center;
}

.cat-sub-item.active i {
    color: #D7B585 !important;
}

.active-parent > .cat-pill {
    border-color: #D7B585 !important;
}

/* Mobile: dropdown shows as full-width */
@media (max-width: 768px) {
    .cat-dropdown {
        position: static;
        display: none;
        box-shadow: none;
        border: none;
        padding: 0 0 0 20px;
        background: transparent !important;
    }
    .cat-pill-wrapper.expanded .cat-dropdown {
        display: flex;
    }
    .cat-sub-item {
        background: #FCF9F6 !important;
        border-bottom: 1px solid rgba(215, 181, 133, 0.2);
    }
}
