/* ==========================================================================
   Shop Page Customizations
   ========================================================================== */

.iris-shop-header {
    display: grid;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 60px;
    grid-template-columns: repeat(3, 1fr);
}

.iris-shop-header .shop-controls:last-child {
    justify-content: flex-end;
}

.shop-title h1 {
    font-size: 32px;
    font-weight: 300;
    margin: 0;
    color: #072128;
    text-transform: uppercase;
    font-family: 'Georgia Pro';
}

.shop-controls {
    display: flex;
    gap: 15px;
    align-items: center;
    flex-wrap: wrap;
    justify-content: center;
}

.active-filters-container {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin-right: 10px;
}

.active-filter-tag {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
    transition: all 0.2s ease;
    color: #072128;
    text-transform: uppercase;
}

.active-filter-tag a {
    font-family: 'eicons';
    background: none;
    border: none;
    cursor: pointer;
    font-size: 25px;
    text-decoration: none;
    padding: 0;
    margin-top: 0px;
    margin-left: 0px;
    transition: opacity 0.2s ease;
}

.active-filter-tag a:hover {
    opacity: 0.7;
}

.iris-shop-header .filters-btn,
.iris-shop-header .sort-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    background: transparent;
    border: none;
    padding: 0;
    font-size: 14px;
    font-weight: 500;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #072128;
}

.iris-shop-header .filters-btn svg,
.iris-shop-header .sort-btn svg {
    transition: transform 0.3s ease;
}

.iris-shop-header .filters-btn.active svg,
.iris-shop-header .sort-btn.active svg {
    transform: rotate(180deg);
}

/* ==========================================================================
   Popup Styles
   ========================================================================== */

.iris-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.iris-popup-overlay.active {
    opacity: 1;
    visibility: visible;
}

.iris-popup {
    position: absolute;
    top: 15px;
    left: -50%;
    width: 343px;
    height: calc(100% - 30px);
    background: #fafafa;
    transition: 0.3s;
    display: flex;
    flex-direction: column;
    border-radius: 5px;
}

.iris-popup-overlay.active .iris-popup {
    left: 15px;
}

.iris-popup-overlay .sort-popup {
    right: -50%;
    left: auto !important;
}

.iris-popup-overlay.active .sort-popup {
    right: 15px;
}

.popup-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 20px 0px 20px;
    font-family: 'Basis Grotesque';
}

.popup-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 500;
    text-transform: uppercase;
    color: #072128;
    line-height: 18px;
}

.popup-header .close-popup {
    font-family: 'eicons';
    background: none;
    border: none;
    font-size: 35px;
    cursor: pointer;
    color: #072128;
    padding: 0;
    width: 15px;
    height: 15px;
    display: flex;
    align-items: flex-start;
    justify-content: flex-end;
    transition: all 0.2s ease;
}

.close-popup:hover {
    background: #e1e1e1;
    color: #07212833;
}

.popup-content {
    flex: 1;
    padding: 70px 20px;
    overflow-y: auto;
}

.popup-footer {
    padding: 0 20px 20px;
}

.popup-footer .reset-filters,
.popup-footer .apply-filters {
    flex: 1;
    border: 1px solid #072128;
    background: transparent;
    font-size: 14px;
    font-weight: 400;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    height: 50px;
    padding: 0;
    color: #072128;
}

.popup-footer .reset-filters {
    margin-bottom: 5px;
}

.popup-footer .reset-filters:hover {
    background: #f8f8f8;
}

.popup-footer .apply-filters {
    background: #072128;
    color: white;
}

.popup-footer .apply-filters:hover {
    /* background: #555; */
}

/* ==========================================================================
   Filter Styles
   ========================================================================== */

.filter-section {
    margin-bottom: 30px;
}

.filter-section h4 {
    font-size: 12px;
    font-weight: 700;
    margin: 0 0 10px 0;
    text-transform: uppercase;
    color: #072128;
    line-height: normal;
}

.filter-options {
    display: flex;
    flex-direction: column;
}

.filter-option {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    padding: 5px 0;
    transition: all 0.2s ease;
    position: relative;
    line-height: normal;
}

.filter-option:hover {
    color: #072128;
}

.filter-options .filter-option input[type="radio"] {
    width: 100%;
    height: 23px;
    border: 1px solid #ddd;
    border-radius: 3px;
    appearance: none;
    cursor: pointer;
    transition: all 0.2s ease;
    position: absolute;
    opacity: 0;
}

.filter-option input[type="radio"]:checked {
    background: #07212833;
    border-color: #07212833;
}

.filter-option input[type="radio"]:checked::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 12px;
    font-weight: bold;
}

.filter-option span {
    font-size: 18px;
    font-weight: 400;
    color: #072128;
    opacity: 0.3;
    transition: .3s;
}

.filter-option:hover span,
.filter-option input[type="radio"]:checked + span {
    opacity: 1;
}

/* ==========================================================================
   Sort Options Styles
   ========================================================================== */

.sort-option {
    display: block;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    padding: 5px 0;
}

.sort-option:last-child {
    border-bottom: none;
}

.sort-option input[type="radio"] {
    width: 100%;
    height: 18px;
    border: 2px solid #ddd;
    border-radius: 50%;
    appearance: none;
    cursor: pointer;
    transition: all 0.2s ease;
    position: absolute;
    opacity: 0;
}

.sort-option span {
    font-size: 16px;
    font-weight: 400;
    color: #072128;
    text-transform: uppercase;
    opacity: 0.3;
    transition: .3s;
}

.sort-option:hover span,
.sort-option input[type="radio"]:checked + span {
    opacity: 1;
}

#sort-overlay.iris-popup-overlay.active .sort-popup {
    left: unset;
    right: 20px;
}

.iris-popup.sort-popup {
    left: unset;
    right: -50%;
}

body.popup-open {
    overflow: auto !important;
}

/* ==========================================================================
   Price Filter Styles
   ========================================================================== */

.price-filter {
    margin-top: 10px;
}

.price-inputs {
    display: flex;
    align-items: center;
    gap: 10px;
}

.price-inputs input {
    flex: 1;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    transition: border-color 0.2s ease;
}

.price-inputs input:focus {
    outline: none;
    border-color: #07212833;
}

.price-inputs span {
    color: #072128;
    font-weight: 500;
}

.iris-empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #072128;
}

.iris-empty-state h3 {
    font-size: 24px;
    margin-bottom: 15px;
}

.iris-empty-state p {
    font-size: 16px;
    margin-bottom: 25px;
}

.iris-empty-state .reset-all-filters {
    background: #072128;
    color: #FAFAFA;
    border: none;
    cursor: pointer;
    font-size: 14px;
    text-transform: uppercase;
    font-weight: 400;
    max-width: 340px;
    width: 100%;
    border-radius: 0px;
    height: 50px;
    transition: .3s;
    border: 1px solid #072128;
    line-height: 10px;
}

.iris-empty-state .reset-all-filters:hover {
    background: transparent;
    color: #072128;
}

/* ==========================================================================
   Mobile Responsive
   ========================================================================== */

@media (max-width: 768px) {
    .woocommerce-page:not(.woocommerce-cart):not(.woocommerce-checkout) .page {
        padding: 160px 10px 200px 10px;
    }

    .iris-shop-header {
        gap: 20px;
        text-align: center;
        align-items: center;
        flex-direction: row;
        margin-bottom: 100px;
    }
    
    .shop-title h1 {
        font-size: 26px;
        line-height: normal;
    }
    
    .shop-controls {
        width: auto;
        justify-content: center;
        gap: 5px;
    }

    .active-filter-tag a {
        line-height: 10px;
    }

    .active-filter-tag {
        padding: 0px;
    }
    
    .filters-btn,
    .sort-btn {
        flex: 1;
        justify-content: center;
        max-width: 150px;
    }
    
    .iris-popup {
        width: calc(100vw - 20px);
        height: calc(100dvh - 20px);
        top: 10px;
    }
    
    .popup-footer {
        flex-direction: column;
    }
    
    .reset-filters,
    .apply-filters {
        width: 100%;
    }

    .iris-popup-overlay.active .iris-popup{
        left: 10px;
    }

    #sort-overlay.iris-popup-overlay.active .sort-popup {
        right: 10px;
    }
}

@media (max-width: 480px) {
    
    .shop-title h1 {
        font-size: 1.8em;
        letter-spacing: 1px;
    }
    
    .filters-btn,
    .sort-btn {
        font-size: 12px;
        padding: 10px 15px;
    }
}

/* ==========================================================================
   Animation Classes
   ========================================================================== */

.fade-in {
    animation: fadeIn 0.3s ease;
}

.slide-in-left {
    animation: slideInLeft 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideInLeft {
    from {
        transform: translateX(-100%);
    }
    to {
        transform: translateX(0);
    }
}

/* ==========================================================================
   Loading States
   ========================================================================== */

.loading {
    position: relative;
    pointer-events: none;
    opacity: 0.7;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #07212833;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
