@tailwind base;
@tailwind components;
@tailwind utilities;
/* ==========================================
   FuseCommerce Frontend Styles
   ========================================== */

/* ==========================================
   Price Range Slider -
   ========================================== */

.price-range-filter {
    padding: 10px 0;
}

.price-range-values {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 1.5rem;
}
.price-range-value-min,
.price-range-value-max {
    color: #222;
}

.price-range-separator {
    color: #717171;
    font-weight: 400;
}

.price-range-slider-container {
    position: relative;
    height: 40px;
    margin: 0 5px;
}

/* Track styling */
.price-range-track {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: #ddd;
    border-radius: 2px;
    transform: translateY(-50%);
}

.price-range-track-active {
    position: absolute;
    height: 100%;
    background: #222;
    border-radius: 2px;
    transition: all 0.1s ease;
}

/* Hide default slider styling */
.price-range-slider {
    position: absolute;
    top: -10px;
    left: 0;
    width: 100%;
    height: 4px;
    margin: 0;
    padding: 0;
    pointer-events: none;
    transform: translateY(-50%);
    background: transparent;
    -webkit-appearance: none;
    appearance: none;
}

.price-range-slider::-webkit-slider-track {
    background: transparent;
}
.price-range-slider::-webkit-slider-runnable-track {
  height: 0 !important;
  background: none !important;
  border: none !important;
}


.price-range-slider::-moz-range-track {
  height: 0 !important;
  background: none !important;
  border: none !important;
}

.price-range-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 24px;
    height: 24px;
    background: #222 !important;
    border: 2px solid #222 !important;
    border-radius: 50%;
    cursor: pointer;
    pointer-events: all;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    transition: all 0.1s ease;
}

.price-range-slider::-webkit-slider-thumb:hover {
    transform: scale(1.1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}

.price-range-slider::-webkit-slider-thumb:active {
    transform: scale(1.15);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
}

.price-range-slider::-moz-range-thumb {
    width: 24px;
    height: 24px;
    background: #222 !important;
    border: 2px solid #222 !important;
    border-radius: 50%;
    cursor: pointer;
    pointer-events: all;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    transition: all 0.1s ease;
}

.price-range-slider::-moz-range-thumb:hover {
    transform: scale(1.1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}

.price-range-slider::-moz-range-thumb:active {
    transform: scale(1.15);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
}

/* Focus states */
.price-range-slider:focus {
    outline: none;
}

.price-range-slider:focus::-webkit-slider-thumb {
    border-color: #000;
    box-shadow: 0 0 0 3px rgba(34, 34, 34, 0.1);
    outline: none !important;
}

.price-range-slider:focus::-moz-range-thumb {
    border-color: #000;
    box-shadow: 0 0 0 3px rgba(34, 34, 34, 0.1);
    outline: none !important;
}

/* Z-index fix for overlapping sliders */
.price-range-slider-min {
    z-index: 1;
}

.price-range-slider-max {
    z-index: 2;
}

/* Filter group styling */
.filter-group[data-filter-type="price"] {
    margin-top: 20px;
}

.filter-group-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 15px;
    color: #222;
}

/* ==========================================
   Hierarchical Category Filter Styles
   ========================================== */

.category-item-wrapper {
    width: 100%;
}

.category-item-wrapper.hidden-initially {
    display: none;
}

.category-item-row {
    display: flex;
    width: 100%;
    gap: 0.5rem;
    padding-top: 0.375rem;
    padding-bottom: 0.375rem;
    padding-left: 0.5rem;
    padding-right: 0.5rem;
    border-radius: 0.25rem;
    transition: background-color 150ms ease-in-out;
}

.category-item-row:hover {
    background-color: #F3F3F3;
}

/* Checkbox styling */
.filter-category-checkbox:link {
    flex-shrink: 0;
    width: 1.25rem;
    height: 1.25rem;
    border: 2px solid #d1d5db;
    border-radius: 0.25rem;
    transition: all 200ms ease-in-out;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    outline: none;
}

.filter-category-checkbox:visited {
    background: #fff;
    outline: none;
}

.filter-category-checkbox:hover {
    border-color: #6b7280;
    background: #fff;
    outline: none;
}

.filter-category-checkbox:active {
    background: #fff;
    outline: none;
}

.filter-category-checkbox:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(85, 86, 86, 1);
    background: #fff;
}

.filter-category-checkbox.checked {
    border-color: #555656;
    background-color: #555656;
}

.filter-category-checkbox .checkmark {
    width: 100%;
    height: 100%;
    color: #fff;
}

.filter-category-checkbox .checkmark.hidden {
    display: none;
}

/* Label styling */
.filter-category-label {
    box-shadow: none;
}
.filter-category-label:link {
    flex: 1;
    text-align: left;
    font-size: 0.875rem;
    color: #374151;
    cursor: pointer;
    transition: color 150ms ease-in-out;
}

.filter-category-label:visited {
    color: #111827;
    background: none;
}
.filter-category-label:hover {
    color: #111827;
    background: none;
}
.filter-category-label:active {
    color: #111827;
    background: none;
}

.filter-category-label:focus {
    outline: none;
    background: none;
    color: #111827;
}

/* Expand toggle styling */
.category-expand-toggle:link {
    flex-shrink: 0;
    width: 1.5rem;
    height: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 150ms ease-in-out;
    color: #6b7280;
    cursor: pointer;
    background: none;
}

.category-expand-toggle:visited {
    background: none;
}

.category-expand-toggle:hover {
    color: #374151;
    background: none;
}

.category-expand-toggle:active {
    background: none;
}

.category-expand-toggle:focus {
    outline: none;
    background: none;
}

.category-expand-toggle .chevron-icon {
    width: 1rem;
    height: 1rem;
    transition: transform 200ms ease-in-out;
}

button.filter-attribute {
    background: #F2F2F2;
    color: rgb(55, 65, 81);
}
.filter-attribute:link {
    background: #F2F2F2;
}
.filter-attribute:visited {
    background: #F2F2F2;
}
.filter-attribute:hover {
    background: #cac9c9;
}
.filter-attribute:active {
    background: #F2F2F2;
}
.filter-attribute:focus {
    background: #F2F2F2;
}
.filter-attribute.active {
    background: #cac9c9;
}

.filter-tag {
    background: #F2F2F2;
    color: rgb(55, 65, 81);
}
.filter-tag:link {
    background: #F2F2F2;
    color: rgb(55, 65, 81);
}
.filter-tag:visited {
    background: #F2F2F2;
    color: rgb(55, 65, 81);
}
.filter-tag:hover {
    background: #cac9c9;
    color: rgb(55, 65, 81);
}
.filter-tag:active {
    background: #F2F2F2;
    color: rgb(55, 65, 81);
}
.filter-tag:focus {
    background: #F2F2F2;
    color: rgb(55, 65, 81);
}
.filter-tag.active {
    background: #cac9c9;
    color: rgb(55, 65, 81);
}

.category-expand-toggle .chevron-icon.rotate-90 {
    transform: rotate(90deg);
}

/* Children container */
.category-children {
    width: 100%;
}

.category-children.hidden {
    display: none;
}

/* Show all button */
.category-show-all-btn {
    width: 100%;
    margin-top: 0.5rem;
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
    color: #4b5563;
    border-radius: 0.25rem;
    transition: all 150ms ease-in-out;
    background-color: transparent;
    border: 1px solid #e5e7eb;
}

.category-show-all-btn:hover {
    color: #111827;
    background-color: #f3f4f6;
    border-color: #d1d5db;
}

.category-show-all-btn:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(85, 86, 86, 1);;
}

/* ==========================================
   Variation Selector Styles
   ========================================== */

.variation-selector {
    margin: 1rem 0;
    padding: 1rem;
    background-color: #f9f9f9;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
}

.variation-attribute {
    margin-bottom: 1rem;
}

.variation-attribute:last-child {
    margin-bottom: 0;
}

.variation-attribute-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 0.5rem;
    text-transform: capitalize;
}

.variation-attribute-select {
    width: 100%;
    padding: 0.625rem 0.875rem;
    font-size: 0.9375rem;
    line-height: 1.5;
    color: #495057;
    background-color: #fff;
    background-clip: padding-box;
    border: 1px solid #ced4da;
    border-radius: 4px;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.variation-attribute-select:focus {
    color: #495057;
    background-color: #fff;
    border-color: #80bdff;
    outline: 0;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

.variation-attribute-select:disabled {
    background-color: #e9ecef;
    opacity: 0.6;
    cursor: not-allowed;
}

/* Variation Info Section */
.variation-info {
    margin-top: 1.25rem;
    padding-top: 1rem;
    border-top: 1px solid #e0e0e0;
    animation: fadeIn 0.3s ease-in-out;
}

.variation-price {
    font-size: 1.5rem;
    font-weight: 700;
    color: #333;
    margin-bottom: 0.5rem;
}

.variation-price-regular {
    font-size: 1.125rem;
    color: #999;
    margin-right: 0.5rem;
}

.variation-price-regular del {
    text-decoration: line-through;
}

.variation-price-sale {
    color: #e74c3c;
    font-weight: 700;
}

.variation-price-amount {
    color: #333;
}

.variation-stock {
    font-size: 0.875rem;
    font-weight: 600;
    margin-top: 0.5rem;
}

.variation-stock-in {
    color: #27ae60;
}

.variation-stock-low {
    color: #f39c12;
    padding: 0.25rem 0.5rem;
    background-color: #fff3cd;
    border-radius: 4px;
    display: inline-block;
}

.variation-stock-out {
    color: #e74c3c;
}

/* Product Card Price Range Styling */
/* .product-card-price-range {
    font-size: 1.25rem;
    color: #666;
} */

/* ==========================================
   Responsive Styles
   ========================================== */

@media (max-width: 768px) {
    .variation-selector {
        padding: 0.75rem;
    }

    .variation-attribute-label {
        font-size: 0.8125rem;
    }

    .variation-attribute-select {
        font-size: 0.875rem;
        padding: 0.5rem 0.75rem;
    }

    .variation-price {
        font-size: 1.25rem;
    }
}

/* ==========================================
   Animations
   ========================================== */

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
/* ==========================================
   Filters
   ========================================== */
@media (max-width: 767px) {
    .fusecommerce-filters-background.active {
        position: fixed;
        left: 0px; top: 0px;
        width: 100%;
        height: 100%;
        z-index: 99999;
        display: block;
        padding: 5rem 2rem;
        padding-top: 5rem;
        padding-bottom: 0px;
    }
    .fusecommerce-filters-background-black {
        left: 0px; top: 0px;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, .5);
        position: absolute;
        z-index: 5;
    }
    .fusecommerce-filters-content {
        z-index: 10;
        background: #FFFFFF;
        border-top-left-radius: 1rem;
        border-top-right-radius: 1rem;
        position: relative;
        height: calc(100vh - 5rem); /* subtract padding from background */
        overflow: hidden;
        position: relative;
        opacity: 0;
        transform: translateY(30%);
        transition: opacity 0.3s ease-out, transform 0.3s ease-out;
    }
    .fusecommerce-filters-content.show {
        opacity: 1;
        transform: translateY(0);
    }
    body.no-scroll {
        overflow: hidden;
        height: 100vh; /* prevents body from expanding */
    }
    .fusecommerce-filters-mobile-top {
        height: 4rem;
        display: flex;
        align-items: center;
        justify-content: center;
        position: relative;
        border-bottom: solid;
        border-bottom-width: 1px;
        border-bottom-color: #d6d6d6;
    }
    .fusecommerce-filters-mobile-bottom {
        position: absolute;
        left: 0;
        width: 100%;
        bottom: 0;
        height: 4rem;
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 0 1rem;
        text-align: center;
        background: #FFFFFF;
        box-shadow: 0px -3px 6px -3px rgba(117,117,117,0.57);
        -webkit-box-shadow: 0px -3px 6px -3px rgba(117,117,117,0.57);
        -moz-box-shadow: 0px -3px 6px -3px rgba(117,117,117,0.57);
    }
    .fusecommerce-scroll-content-ui {
        height: calc(100% - 8rem);
    }
    .fusecommerce-scroll-content {
        position: relative;
        height: 100%;
        overflow: auto;
        padding: 1rem;
        height: 100%;
    }
}
.fuse-popup-btn:hover, .fuse-search-filter-input {
    color: #000 !important;
}
.fuse-popup-btn:focus {
    color: #000;
    background: none;
    outline: none;
}
.fuse-search-filter-input {
    border: solid !important;
    border-width: 2px !important;
    border-color: #000000 !important;
    border-radius: 2rem !important;
    outline: none !important;
}
.fuse-search-clear-btn:hover {
    color: black;
}
.fuse-apply-filters-popup-btn {
    min-width: 150px;
}
.fuse-apply-filters-popup-btn:hover {
    color: white !important;
}
.fuse-load-more {
    color: black;
    border-color: black;
    background: #FFFFFF !important;
}
.fuse-load-more:visited {
    background: white !important;
    color: black !important;
    border-color: black !important;
}
.fuse-load-more:hover {
    background: #ebebeb !important;
    color: black;
}
.fuse-load-more:active {
    color: black !important;
    border-color: black !important;
}
.fuse-load-more:focus {
    color: black !important;
    border-color: black !important;
}
@keyframes shimmer {
    100% {
        transform: translateX(100%);
    }
}
.product-card-title {
    display: block;
    margin-bottom: 1rem;
    font-size: 1.3rem;
}