:root {
    --ag-primary: #111;
    --ag-secondary: #666;
    --ag-border: #e5e5e5;
    --ag-bg-light: #f9f9f9;
    --ag-accent: #000;
    --ag-white: #fff;
    --ag-radius: 12px;
    --ag-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    --ag-shadow-hover: 0 10px 30px rgba(0, 0, 0, 0.1);
}

/* --- Container & Layout --- */
.ag-shop-container {
    display: flex;
    gap: 40px;
    width: 90%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 40px 0;
}

.ag-shop-filters {
    width: 25%;
    flex-shrink: 0;
    min-width: 280px;
}

.ag-shop-products {
    flex-grow: 1;
    width: auto;
    /* Let flex handle it */
    min-width: 0;
    /* Prevent flex child overflow */
}

/* --- Mobile / Tablet Responsive --- */
@media (max-width: 1024px) {
    .ag-shop-container {
        flex-direction: column;
        width: 95%;
    }

    .ag-shop-filters {
        width: 100%;
        margin-bottom: 30px;
    }

    .ag-shop-products {
        width: 100%;
    }
}

/* --- Filters Styling - Digging Station --- */
.ag-filters-wrapper {
    background: #ffffff !important;
    padding: 30px !important;
    border: 1px solid #f0f0f0 !important;
    border-radius: 12px !important;
    position: sticky;
    top: 120px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.02) !important;
}

.ag-widget-title {
    font-size: 11px !important;
    font-weight: 800 !important;
    margin-bottom: 25px !important;
    color: #999 !important;
    text-transform: uppercase !important;
    letter-spacing: 2px !important;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    border-bottom: 1px solid #f0f0f0;
    padding-bottom: 12px !important;
}

.ag-widget-title::after {
    content: '\002B'; /* Plus sign for cleaner look */
    font-size: 14px;
    transition: transform 0.3s;
}

.ag-widget-title.active::after {
    transform: rotate(45deg); /* Becomes an X or just rotates */
}

/* Checkboxes - Custom Mix Station Style */
.ag-filter-checkbox-list {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

.ag-filter-checkbox-list li {
    margin-bottom: 8px !important;
}

.ag-filter-checkbox-list label {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    cursor: pointer !important;
    font-size: 13px !important;
    font-weight: 500 !important;
    color: #444 !important;
    transition: all 0.2s ease !important;
    padding: 4px 0 !important;
}

.ag-filter-checkbox-list label:hover {
    color: #ED8936 !important;
}

.ag-filter-checkbox-list input[type="checkbox"] {
    appearance: none !important;
    -webkit-appearance: none !important;
    width: 14px !important;
    height: 14px !important;
    border: 1.5px solid #DDD !important;
    border-radius: 50% !important; /* Circular look */
    margin-right: 12px !important;
    position: relative !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    flex-shrink: 0 !important;
}

.ag-filter-checkbox-list input[type="checkbox"]:checked {
    background: #ED8936 !important;
    border-color: #ED8936 !important;
}

/* Count Pills */
.ag-filter-checkbox-list .count {
    font-size: 10px !important;
    font-weight: 700 !important;
    color: #BBB !important;
    background: #F8F8F8 !important;
    padding: 2px 8px !important;
    border-radius: 20px !important;
    min-width: 24px !important;
    text-align: center !important;
    display: inline-block !important;
    transition: all 0.2s ease !important;
}

.ag-filter-checkbox-list label:hover .count {
    color: #ED8936 !important;
    background: rgba(237, 137, 54, 0.05) !important;
}

/* Clear Filters Button */
.ag-clear-filters {
    display: block !important;
    width: 100% !important;
    text-align: center !important;
    margin-top: 30px !important;
    padding: 12px !important;
    background: transparent !important;
    border: 1px solid #EEE !important;
    color: #666 !important;
    font-size: 11px !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 1.5px !important;
    border-radius: 8px !important;
    text-decoration: none !important;
    transition: all 0.3s ease !important;
}

.ag-clear-filters:hover {
    background: #111 !important;
    border-color: #111 !important;
    color: #FFF !important;
    transform: translateY(-2px) !important;
}

/* Price Slider */
.ag-price-slider-range {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
    color: var(--ag-secondary);
    margin-top: 15px;
}

/* --- Product Grid --- */
.ag-products-grid {
    display: grid;
    /* Default to 3, but allow Elementor to override via style attribute */
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    width: 100%;
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

.ag-products-grid .product {
    list-style: none !important;
    margin-bottom: 0 !important;
    /* Grid handles gap */
}

@media (max-width: 1024px) {
    .ag-products-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .ag-products-grid {
        grid-template-columns: 1fr;
    }
}

/* --- Product Card --- */
/* --- Product Card --- */
/* --- Product Card - NEUTRALIZED to avoid conflict with Phonica Design ---
.ag-products-grid .product,
.product-card {
    background: var(--ag-white);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    border: 1px solid #f0f0f0;
    position: relative;
    text-align: left;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03);
}

.ag-products-grid .product:hover,
.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.08);
    border-color: transparent;
}
*/

/* Product Info - Keeping basic padding if needed, but Phonica handles it */
.product-details {
    padding: 0; 
}

/* Category Pill - Keeping simplified version for AJAX grid */
body .ag-category-wrap .product-category {
    font-size: 10px !important;
    color: #ED8936 !important;
    text-transform: uppercase !important;
    font-weight: 700 !important;
    border: 1px solid #ED8936 !important;
    border-radius: 20px !important;
    padding: 2px 8px !important;
    display: inline-block !important;
    text-decoration: none !important;
    margin: 10px 15px 0 15px !important;
}

/* Titles, Prices, Buttons - Neutralized to let style.css take over */
/*
body .product-title,
body .woocommerce-loop-product__title {
    font-size: 16px !important;
    ...
}
*/

body .ag-add-to-cart-btn.loading,
body .add_to_cart_button.loading {
    opacity: 0.7 !important;
    cursor: wait !important;
}

/* --- Loader --- */
.ag-loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.8);
    z-index: 10;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding-top: 100px;
    border-radius: 12px;
}

.ag-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(0, 0, 0, 0.05);
    border-radius: 50%;
    border-top-color: #ED8936;
    animation: ag-spin 0.8s ease-in-out infinite;
}

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

/* --- Pagination --- */
.ag-pagination {
    margin-top: 50px;
    text-align: center;
    display: flex;
    justify-content: center;
}

.ag-pagination ul {
    list-style: none;
    display: flex;
    padding: 0;
    gap: 10px;
    margin: 0;
}

.ag-pagination .page-numbers {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 8px;
    /* Square with radius */
    background: #fff;
    border: 1px solid #eee;
    color: #000;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.2s;
}

.ag-pagination .page-numbers.current,
.ag-pagination .page-numbers:hover {
    background: #000;
    color: white;
    border-color: #000;
}