/* =====================================================
   Features Bar - Minimal Strip
   ===================================================== */
.features-bar {
    display: flex;
    justify-content: center;
    gap: 0;
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
    padding: 20px 20px;
    margin-bottom: 40px;
    overflow-x: auto;
    scrollbar-width: none;
    box-shadow: 0 1px 8px rgba(60,50,40,0.03);
}

.features-bar::-webkit-scrollbar { display: none; }

[data-theme="dark"] .features-bar {
    background: var(--bg-secondary);
    box-shadow: 0 1px 8px rgba(0,0,0,0.2);
}

.feature-item {
    flex: 0 0 auto;
    padding: 8px 24px;
    text-align: center;
    border-left: 1px solid var(--border);
    transition: all 0.3s;
}

.feature-item:last-child { border-left: none; }

.feature-item:hover { opacity: 0.8; }

.feature-item .icon { font-size: 22px; margin-bottom: 4px; display: block; }
.feature-item h4 { font-size: 12px; font-weight: 700; margin-bottom: 1px; color: var(--text-primary); }
.feature-item p { font-size: 11px; color: var(--text-muted); }

/* =====================================================
   Section Titles - Enhanced
   ===================================================== */
.section-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 8px;
    position: relative;
    padding-bottom: 10px;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 40px;
    height: 2px;
    background: var(--accent);
    border-radius: 2px;
    opacity: 0.6;
}

/* =====================================================
   Categories Grid - Enhanced
   ===================================================== */
.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 50px;
}

.category-card {
    background: var(--gradient-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: 32px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    text-decoration: none;
    color: var(--text-primary);
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.category-card::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 100%;
    height: 100%;
    background: var(--accent);
    opacity: 0;
    transition: opacity 0.4s;
    border-radius: var(--radius-xl);
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: rgba(184, 147, 111, 0.2);
}

.category-card:hover::before { opacity: 0.04; }

[data-theme="dark"] .category-card {
    box-shadow: 0 1px 4px rgba(0,0,0,0.3);
}

[data-theme="dark"] .category-card:hover {
    box-shadow: 0 8px 32px rgba(0,0,0,0.4), 0 0 24px rgba(212, 173, 136, 0.06);
    border-color: rgba(212, 173, 136, 0.2);
}

[data-theme="dark"] .category-card:hover::before { opacity: 0.06; }

.category-card .icon {
    font-size: 44px;
    margin-bottom: 14px;
    display: block;
    transition: transform 0.4s ease;
}

.category-card:hover .icon { transform: scale(1.08); }

.category-card h3 { font-size: 16px; font-weight: 700; position: relative; z-index: 1; }
.category-card p { font-size: 13px; color: var(--text-muted); margin-top: 6px; position: relative; z-index: 1; }

/* =====================================================
   Products Grid - Consistent & Professional
   ===================================================== */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 50px;
}

.product-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-sm);
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: rgba(184, 147, 111, 0.2);
}

[data-theme="dark"] .product-card {
    box-shadow: 0 1px 4px rgba(0,0,0,0.3);
}

[data-theme="dark"] .product-card:hover {
    box-shadow: 0 8px 32px rgba(0,0,0,0.4), 0 0 20px rgba(212, 173, 136, 0.06);
    border-color: rgba(212, 173, 136, 0.2);
}

.product-image {
    width: 100%;
    aspect-ratio: 1 / 1;
    background: var(--gradient-card);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    position: relative;
    overflow: hidden;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.product-card:hover .product-image img { transform: scale(1.04); }

.product-image .emoji-icon {
    transition: transform 0.4s ease;
}

.product-card:hover .product-image .emoji-icon {
    transform: scale(1.08);
}

.product-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: var(--danger);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 20px;
    z-index: 2;
}

.product-info {
    padding: 14px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.product-info h3 {
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 4px;
    transition: color 0.2s;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-card:hover .product-info h3 { color: var(--accent); }

.product-info p {
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 10px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-price {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 10px;
    margin-top: auto;
}

.price-current { font-size: 16px; font-weight: 800; color: var(--accent); }
.price-old { font-size: 13px; color: var(--text-muted); text-decoration: line-through; }

/* Add to cart button */
.btn-add-cart {
    width: 100%;
    padding: 11px;
    font-family: 'Tajawal', sans-serif;
    font-size: 13px;
    font-weight: 700;
    color: var(--accent);
    background: var(--accent-light);
    border: 1.5px solid transparent;
    border-radius: var(--radius);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    overflow: hidden;
}

.btn-add-cart:hover {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
    box-shadow: 0 4px 14px rgba(184, 147, 111, 0.25);
    transform: translateY(-1px);
}

.btn-add-cart:active { transform: scale(0.97); }

[data-theme="dark"] .btn-add-cart {
    background: rgba(212, 173, 136, 0.1);
    color: var(--accent);
}

[data-theme="dark"] .btn-add-cart:hover {
    background: var(--accent);
    color: #1a1510;
    box-shadow: 0 4px 16px rgba(212, 173, 136, 0.2);
}

/* Mobile product grid - 2 columns */
@media (max-width: 768px) {
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    .product-info { padding: 12px; }
    .product-info h3 { font-size: 13px; }
    .product-info p { font-size: 11px; margin-bottom: 8px; }
    .price-current { font-size: 14px; }
    .btn-add-cart { padding: 9px; font-size: 12px; }
}

/* Ripple effect */
.ripple {
    position: absolute;
    border-radius: 50%;
    background: rgba(255,255,255,0.4);
    transform: scale(0);
    animation: ripple 0.6s ease-out;
    pointer-events: none;
}

@keyframes ripple {
    to { transform: scale(4); opacity: 0; }
}

/* =====================================================
   Card Generic - Enhanced
   ===================================================== */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: 28px;
    box-shadow: var(--shadow-sm);
    transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }

[data-theme="dark"] .card {
    box-shadow: 0 1px 4px rgba(0,0,0,0.3);
}

[data-theme="dark"] .card:hover {
    box-shadow: 0 6px 24px rgba(0,0,0,0.4);
    border-color: rgba(212, 173, 136, 0.12);
}

.card-title {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* =====================================================
   Buttons - Enhanced
   ===================================================== */
.btn {
    padding: 12px 24px;
    font-family: 'Tajawal', sans-serif;
    font-size: 15px;
    font-weight: 600;
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: var(--accent);
    color: #fff;
}

.btn-primary:hover {
    background: var(--accent-hover);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-primary:active { transform: translateY(0); }

.btn-submit {
    width: 100%;
    padding: 16px;
    font-family: 'Tajawal', sans-serif;
    font-size: 17px;
    font-weight: 700;
    color: #fff;
    background: var(--accent);
    border: none;
    border-radius: var(--radius-lg);
    cursor: pointer;
    margin-top: 20px;
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
}

.btn-submit:hover {
    background: var(--accent-hover);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-submit:active { transform: translateY(0); }
.btn-submit:disabled { opacity: 0.6; cursor: not-allowed; transform: none; box-shadow: none; }

/* Button loading spinner */
.btn-loading {
    pointer-events: none;
    color: transparent !important;
}

.btn-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 22px;
    height: 22px;
    margin: -11px 0 0 -11px;
    border: 3px solid rgba(255,255,255,0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}

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

/* =====================================================
   Image Placeholder with gradient
   ===================================================== */
.img-placeholder {
    background: linear-gradient(135deg, var(--bg-input), var(--accent-light));
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ===== Out of Stock ===== */
.product-card.out-of-stock .product-image {
    opacity: 0.5;
    filter: grayscale(40%);
}

/* ===== Spinner ===== */
@keyframes spin {
    to { transform: rotate(360deg); }
}
