/* Import Tajawal Font */
@import url('https://fonts.googleapis.com/css2?family=Tajawal:wght@400;500;700;900&display=swap');

/* Base Styles */
body {
    font-family: 'Tajawal', sans-serif; /* Applied globally! */
}

/* Hero Section */
.hero-section {
    height: 250px;
    background-image: url('../images/herotop.jpg');
    background-size: cover;
    background-position: center;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    margin-bottom: 40px;
    overflow: hidden;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
}

.hero-content {
    position: relative;
    z-index: 10;
    color: white;
    text-align: center;
}

/* The 3 Blurred Categories */
.category-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 50px;
}

.category-card {
    position: relative;
    height: 200px;
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.category-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    filter: blur(4px);
    transform: scale(1.1); /* Prevents blurred edges from showing white */
    z-index: 1;
    transition: filter 0.3s ease, transform 0.3s ease;
}

.category-card:hover .category-bg {
    filter: blur(2px);
    transform: scale(1.05);
}

.category-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.3);
    z-index: 2;
}

.category-title {
    position: relative;
    z-index: 3;
    color: white;
    font-size: 24px;
    font-weight: 900;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

/* Product Sections */
.section-title {
    font-size: 24px;
    font-weight: 900;
    color: #0f172a;
    border-bottom: 2px solid #e2e8f0;
    padding-bottom: 10px;
    margin-bottom: 20px;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 25px;
    margin-bottom: 50px;
}

.product-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #e2e8f0;
    text-decoration: none;
    color: inherit;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    transition: transform 0.2s;
}

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

.product-price {
    font-size: 20px;
    font-weight: 900;
    color: #2563eb;
}
/* ========================================== */
/* STORE PAGE LAYOUT                          */
/* ========================================== */
.store-container {
    display: flex;
    gap: 30px;
    align-items: flex-start;
}

/* Sidebar Styling */
.store-sidebar {
    width: 280px;
    flex-shrink: 0;
    background: white;
    padding: 25px;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.filter-link {
    display: block;
    padding: 10px 15px;
    color: #475569;
    text-decoration: none;
    border-radius: 8px;
    margin-bottom: 5px;
    transition: all 0.2s;
    font-weight: bold;
    font-size: 15px;
}

.filter-link:hover {
    background: #f8fafc;
    color: #2563eb;
    padding-inline-start: 20px; /* Slight indent effect on hover */
}

.filter-link.active {
    background: #eff6ff;
    color: #2563eb;
    border-right: 4px solid #2563eb; /* Blue accent line */
}

html[dir="ltr"] .filter-link.active {
    border-right: none;
    border-left: 4px solid #2563eb;
}

.store-content {
    flex: 1;
}

/* Mobile Responsive: Collapse to Top */
@media (max-width: 768px) {
    .store-container {
        flex-direction: column;
    }
    .store-sidebar {
        width: 100%;
        box-sizing: border-box;
    }
}

/* ========================================== */
/* UPGRADED STORE PRODUCT CARDS               */
/* ========================================== */
.product-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #e2e8f0;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    transition: transform 0.2s, box-shadow 0.2s;
    position: relative; /* Crucial for the link overlay */
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 20px rgba(0,0,0,0.1);
}

/* Makes the whole card clickable EXCEPT where buttons are */
.card-link-overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
}

/* Badges for Materials, Colors, etc. */
.product-meta-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 12px;
}

.badge {
    font-size: 11px;
    font-weight: bold;
    padding: 3px 8px;
    border-radius: 4px;
    background: #f1f5f9;
    color: #475569;
    border: 1px solid #e2e8f0;
}

.badge-category { background: #eff6ff; color: #2563eb; border-color: #bfdbfe; }
.badge-price { font-size: 20px; font-weight: 900; color: #0f172a; margin-bottom: 15px; }

/* Action Buttons (Elevated above the card link overlay) */
.product-actions {
    display: flex;
    gap: 10px;
    margin-top: auto; /* Pushes buttons to the bottom */
    position: relative;
    z-index: 2; /* Keeps buttons clickable over the link overlay */
}

.btn-cart, .btn-visit {
    flex: 1;
    padding: 10px;
    border-radius: 6px;
    font-weight: bold;
    font-size: 13px;
    text-align: center;
    cursor: pointer;
    border: none;
    transition: 0.2s;
    text-decoration: none;

    /* NEW: Force buttons to inherit the Tajawal font! */
    font-family: inherit;
}

.btn-cart {
    background: #5c3a21; /* Rich wood brown */
    color: white;
}

.btn-cart:hover {
    background: #462b18; /* Slightly darker brown for the hover effect */
}

.btn-visit {
    background: white;
    color: #0f172a;
    border: 1px solid #cbd5e1;
}
.btn-visit:hover { background: #f8fafc; border-color: #94a3b8; }

/* ========================================== */
/* SIDEBAR ACCORDION FILTERS                  */
/* ========================================== */
.filter-accordion {
    margin-bottom: 10px;
    border-bottom: 1px solid #e2e8f0;
    padding-bottom: 15px;
}

.filter-accordion summary {
    font-size: 15px;
    font-weight: 900;
    color: #0f172a;
    cursor: pointer;
    list-style: none; /* Removes default arrow */
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 5px 0;
}

/* Custom Accordion Arrow */
.filter-accordion summary::after {
    content: '\25BC'; /* Down Arrow */
    font-size: 10px;
    color: #64748b;
    transition: transform 0.3s;
}
.filter-accordion[open] summary::after {
    transform: rotate(180deg); /* Flips arrow when open */
}
.filter-accordion summary::-webkit-details-marker { display: none; }

/* Checkbox Row Styling */
.filter-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 15px;
}

.filter-label {
    display: flex;
    justify-content: space-between; /* Puts Checkbox on left, text/swatch on right */
    align-items: center;
    cursor: pointer;
    font-size: 14px;
    color: #475569;
    transition: color 0.2s;
}

.filter-label:hover { color: #0f172a; font-weight: bold; }

.filter-label-content {
    display: flex;
    align-items: center;
    gap: 10px;
}

.filter-checkbox {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #5c3a21; /* Makes the checkbox tick match your wood color */
}

/* Clear Filters Button */
.btn-clear-filters {
    display: block;
    text-align: center;
    padding: 10px;
    background: #f8fafc;
    color: #ef4444;
    text-decoration: none;
    font-weight: bold;
    border-radius: 8px;
    margin-bottom: 20px;
    border: 1px solid #e2e8f0;
}
.btn-clear-filters:hover { background: #fee2e2; }
/* ========================================== */
/* MOBILE FILTER DROPDOWNS                    */
/* ========================================== */

/* 1. BY DEFAULT (ON DESKTOP): Hide the mobile top-dropdowns */
.mobile-filter-wrapper {
    display: none !important;
    margin-bottom: 25px;
    background: white;
    padding: 15px;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

/* ... keep your existing .mobile-filters-grid and .mobile-filter-select CSS here ... */

/* 2. ON MOBILE PHONES: Hide the sidebar, show the top-dropdowns */
@media (max-width: 768px) {
    .store-sidebar {
        display: none !important;
    }
    .mobile-filter-wrapper {
        display: block !important;
    }
}
