/* ============================================================
   SHOP INDEX (CATEGORY/PRODUCT LISTING) PAGE STYLES
   Page: resources/views/main/shop/index.blade.php
   Depends on global variables defined in style.css:
   - Colors: --text-dark, --text-dark-alt, --gray-text, --gray-bg,
     --gray-light, --primary-blue, --primary-green, --primary-gold,
     --accent-yellow
   - Spacing: --spacing-*
   - Typography: --font-size-*
   - Shadows: --shadow-sm, --shadow-lg, --shadow-hover
   - Radius: --radius-*
   ============================================================ */

/* ============================================================
   PAGE WRAPPER – main container
   ============================================================ */

   .shop-page-wrapper {
    padding-bottom: var(--spacing-xxl, 3rem);
    background-color: var(--gray-bg, #f8f9fa);
}

/* ============================================================
   SORTING CARD & SIDEBAR CARD – white card containers
   ============================================================ */

.sorting-card,
.sidebar-card {
    color: var(--text-dark);
    background: #fff;
    border-radius: var(--radius-lg, 12px);
    padding: var(--spacing-lg, 1.5rem);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.sorting-card {
    margin-bottom: 10px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
}

/* ============================================================
   FILTER TITLE – section heading with icon
   ============================================================ */

.filter-title {
    font-size: 1rem;
    color: var(--text-dark-alt);
    font-weight: 600;
    margin-bottom: var(--spacing-md, 1rem);
    display: flex;
    align-items: center;
}

/* ============================================================
   FILTER ITEMS – radio buttons with labels
   ============================================================ */

.filter-item {
    display: flex;
    align-items: center;
    padding: var(--spacing-sm, 0.5rem);
    border-radius: var(--radius-md, 8px);
    transition: background 0.18s ease;
}

.filter-item:hover {
    background-color: rgba(16, 134, 202, 0.05);
}

.filter-radio {
    accent-color: var(--primary-blue);
    flex-shrink: 0;
}

.filter-label {
    font-size: 0.9rem;
    color: var(--gray-text);
    cursor: pointer;
    flex-grow: 1;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.item-count {
    color: var(--text-dark);
    font-weight: 600;
    font-size: 0.82rem;
}

/* ============================================================
   PRICE RANGE – custom slider
   ============================================================ */

.price-range-badge {
    background: var(--gray-light, #f1f3f5);
    color: var(--text-dark);
    font-size: 0.78rem;
    font-weight: 500;
}

.multi-range-slider {
    border: 1px solid #d4d0d0;
    border-radius: 10px;
    position: relative;
    height: 40px;
    display: flex;
    align-items: center;
    margin-bottom: var(--spacing-sm, 0.5rem);
}

.price-range {
    position: absolute;
    width: 100%;
    height: 5px;
    -webkit-appearance: none;
    appearance: none;
    background: none;
    z-index: 2;
    cursor: pointer;
}

.slider-track {
    position: absolute;
    width: 100%;
    height: 5px;
    background: #e0e0e0;
    border-radius: 2px;
}

.price-indicator {
    font-size: 12px;
    color: #555;
    font-weight: 400;
}

/* ============================================================
   QUICK CART BUTTONS – add to cart action
   ============================================================ */

.btn-quick-cart,
.btn-quick-cart-ad {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    border-radius: var(--radius-md, 8px);
    padding: 0.4rem 0.75rem;
    cursor: pointer;
    text-decoration: none;
    font-weight: 600;
    transition: background 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
    user-select: none;
    border-width: 1px;
    border-style: solid;
}

/* Gold/primary variant */
.btn-quick-cart {
    color: var(--text-dark-alt);
    background: var(--primary-gold, #ffc107);
    border-color: var(--accent-yellow, #ffc107);
}

.btn-quick-cart:hover {
    background: #e6ac00;
    border-color: #d39e00;
    color: var(--text-dark-alt);
}

.btn-quick-cart:focus-visible {
    box-shadow: 0 0 0 3px rgba(255, 193, 7, 0.4);
    outline: none;
}

/* Green variant */
.btn-quick-cart-ad {
    color: #fff;
    background: var(--primary-green);
    border-color: var(--primary-green);
}

.btn-quick-cart-ad:hover {
    filter: brightness(0.92);
    color: #fff;
}

/* ============================================================
   FEATURED PRODUCT ITEM – horizontal sidebar product
   ============================================================ */

.featured-product-item {
    padding: 0.75rem;
    border-radius: 10px;
    transition: border-color 0.18s ease, box-shadow 0.18s ease;
    border: 1px solid rgba(0, 0, 0, 0.06);
    display: flex;
    align-items: center;
}

.featured-product-item:hover {
    border-color: var(--primary-blue);
    box-shadow: var(--shadow-hover);
}

.product-thumbnail {
    width: 70px;
    height: 70px;
    overflow: hidden;
    flex-shrink: 0;
    border-radius: 6px;
}

/* ============================================================
   PRODUCT CARD – main product grid item
   ============================================================ */

.product-card {
    background: #fff;
    border-radius: var(--radius-lg, 12px);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    border: 1px solid rgba(0, 0, 0, 0.04);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

/* ============================================================
   PRODUCT IMAGE – with hover zoom
   ============================================================ */

.product-img {
    width: 100%;
    overflow: hidden;
    background: #f8f9fa;
}

.product-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.product-card:hover .product-img img {
    transform: scale(1.05);
}

/* ============================================================
   PRODUCT PRICING – price display with ellipsis
   ============================================================ */

.product-pricing span {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
    display: inline-block;
}

/* ============================================================
   WISHLIST BUTTONS – active/inactive states
   ============================================================ */

.btn-wishlist-active {
    color: #ff3b3b;
    background: transparent;
    border: none;
    padding: 0.3rem 0.5rem;
    cursor: pointer;
    transition: transform 0.15s ease;
}

.btn-wishlist-active:hover {
    transform: scale(1.15);
}

.btn-wishlist-inactive {
    color: #adb5bd;
    background: transparent;
    border: none;
    padding: 0.3rem 0.5rem;
    cursor: pointer;
    transition: color 0.18s ease, transform 0.15s ease;
}

.btn-wishlist-inactive:hover {
    color: #ff3b3b;
    transform: scale(1.15);
}

/* ============================================================
   PROMO BANNER – promotional image with overlay
   ============================================================ */

.promo-banner {
    overflow: hidden;
    border-radius: var(--radius-lg, 12px);
    margin-top: var(--spacing-lg, 1.5rem);
    position: relative;
}

.promo-banner img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    display: block;
}

.banner-overlay {
    position: absolute;
    inset: 0;
    background: var(--gradient-banner, linear-gradient(135deg, rgba(0,0,0,0.55), rgba(0,0,0,0.25)));
}

.banner-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    width: 100%;
    padding: var(--spacing-md, 1rem);
}

/* ============================================================
   PAGINATION – custom styled
   ============================================================ */

.pagination .page-link {
    border: 1px solid var(--gray-medium, #dee2e6);
    padding: 0.5rem 0.9rem;
    color: var(--primary-blue);
    border-radius: 8px !important;
    transition: background 0.18s ease, color 0.18s ease;
}

.pagination .page-link:hover {
    background: rgba(16, 134, 202, 0.08);
    border-color: var(--primary-blue);
}

.pagination .page-item.active .page-link {
    background: var(--gradient-primary-dark, var(--primary-blue));
    border-color: transparent;
    color: #fff;
}

.pagination .page-item.disabled .page-link {
    opacity: 0.45;
    pointer-events: none;
}

/* ============================================================
   RESPONSIVE: DESKTOP (≥992px)
   ============================================================ */

@media (min-width: 992px) {

    .product-content .fw-bold {
        font-size: 0.88rem;
    }

    .product-content .text-danger,
    .product-content .fw-bold {
        font-size: 0.9rem;
    }
}

/* ============================================================
   RESPONSIVE: MOBILE (≤576px)
   ============================================================ */

@media (max-width: 576px) {

    .sorting-card {
        padding: 0.75rem 1rem;
    }
}