/**
 * Custom Shop Archive Styles
 * 
 * Styles for the WooCommerce shop/archive pages with faceted filtering
 * Loaded only on is_shop() and is_product_taxonomy()
 * 
 * @package Grabit
 * @version 1.0
 */

/* ============================================
   Checkbox & Radio Styling
   ============================================ */
.gi-sidebar-block-item input[type="checkbox"]:checked ~ .checked,
.gi-sidebar-block-item input[type="radio"]:checked ~ .checked {
    background-color: #5caf90;
    border-color: #5caf90;
}

.gi-sidebar-block-item input[type="checkbox"]:checked ~ .checked::after,
.gi-sidebar-block-item input[type="radio"]:checked ~ .checked::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 12px;
    font-weight: bold;
}

.gi-sidebar-block-item input:disabled {
    cursor: not-allowed;
}

.gi-sidebar-block-item input:disabled ~ label {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ============================================
   Star Rating Styling
   ============================================ */
.star-icon {
    font-size: 16px;
    line-height: 1;
    display: inline-block;
}

.gi-pro-rating {
    white-space: nowrap;
}

.gi-pro-rating .star-icon {
    transition: color 0.2s ease;
}

.gi-sidebar-block-item:hover .star-icon {
    transform: scale(1.1);
    transition: transform 0.2s ease;
}

/* ============================================
   Primary Theme Color Overrides
   ============================================ */
.bg-primary {
    background-color: #5caf90 !important;
}

.text-primary {
    color: #5caf90 !important;
}

.border-primary {
    border-color: #5caf90 !important;
}

.hover\:bg-primary:hover {
    background-color: #5caf90 !important;
}

.hover\:text-primary:hover {
    color: #5caf90 !important;
}

.bg-primary\/10 {
    background-color: rgba(92, 175, 144, 0.1) !important;
}

.bg-primary\/20 {
    background-color: rgba(92, 175, 144, 0.2) !important;
}

/* ============================================
   Sticky Toolbar
   ============================================ */
.gi-catalog-toolbar {
    transition: box-shadow 0.3s ease;
}

/* ============================================
   Loading State
   ============================================ */
.gi-catalog-loading {
    pointer-events: none;
    opacity: 0.6;
    position: relative;
}

.gi-catalog-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 40px;
    height: 40px;
    margin: -20px 0 0 -20px;
    border: 4px solid #5caf90;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 0.8s linear infinite;
    z-index: 10;
}

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

/* ============================================
   Responsive Improvements
   ============================================ */
@media (max-width: 991px) {
    .gi-shop-sidebar {
        order: 1;
        margin-top: 2rem;
    }
    
    .gi-shop-rightside {
        order: 0;
    }
}

/* ============================================
   Print Styles
   ============================================ */
@media print {
    .gi-shop-sidebar,
    .gi-catalog-toolbar,
    .gi-pagination {
        display: none;
    }
}


