/* ============================= */
/* RIGHT DRAWERS (Search + Cart) */
/* ============================= */

#search-drawer,
#cart-drawer,
#filter-drawer {
  position: fixed;
  top: 0;
  right: 0;
  height: 100%;
  width: 420px;
  max-width: 100%;
  background: var(--bg-main);
  transform: translateX(100%);
  transition: transform 0.6s cubic-bezier(0.19, 1, 0.22, 1);
  z-index: 3000;
  overflow-y: auto;
  scrollbar-width: none;
}

body.search-open #search-drawer,
body.cart-open #cart-drawer,
body.filter-open #filter-drawer {
  transform: translateX(0);
}

.drawer-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 40px;
}

.drawer-close {
  border: none;
  background: transparent;
  font-size: 20px;
  cursor: pointer;
}

.drawer-body input {
  padding: 14px;
  font-size: 14px;
}

/* ============================= */
/* FILTER DRAWER                 */
/* ============================= */

.filter-drawer {
  position: fixed;
  top: 0;
  right: 0;
  height: 100%;
  width: 420px;
  max-width: 100%;
  background: var(--bg-main);
  transform: translateX(100%);
  transition: transform 0.6s cubic-bezier(0.19, 1, 0.22, 1);
  z-index: 3000;
  padding: 20px 40px 0px 40px;
  overflow-y: auto;
  box-shadow: -5px 0 30px rgba(0, 0, 0, 0.05);
}

.filter-drawer.active {
  transform: translateX(0);
}

.filter-section {
  margin-bottom: 40px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 30px;
}

.filter-title {
  font-family: var(--font-headline);
  font-size: 12px;
  letter-spacing: 0.25em;
  margin-bottom: 20px;
  color: var(--text-primary);
  font-weight: 600;
}

.filter-options {
  display: flex;
  gap: 12px;
    flex-direction: row;
    flex-wrap: wrap;
}

.filter-option {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--text-secondary);
  transition: color 0.3s ease;
}

.filter-option:hover {
  color: var(--text-primary);
}

.filter-checkbox {
  width: 18px;
  height: 18px;
  border: 1px solid var(--border);
  border-radius: 0;
  background: transparent;
  cursor: pointer;
  accent-color: var(--brand);
}

.filter-actions {
  position: sticky;
  bottom: 0;
  background: var(--bg-main);
  padding-top: 20px;
  padding-bottom: 10px;
  margin-top: 20px;
  border-top: 1px solid var(--border);
}

.filter-toggle-btn {
  display: inline-flex;
  align-items: center;
  padding: 12px 30px !important;
  background: transparent !important;
  color: var(--text-primary) !important;
  border: 1px solid var(--border) !important;
}

.filter-toggle-btn:hover {
  background: var(--brand) !important;
  color: white !important;
  border-color: var(--brand) !important;
}

.filter-group {
    margin-bottom: 20px;
    padding: 15px;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
}

.filter-group h4 {
    margin-bottom: 12px;
    font-size: 16px;
    font-weight: 600;
    color: #333;
}

.filter-option {
    display: flex;
    align-items: center;
    cursor: pointer;
    margin-bottom: 10px;
    font-size: 14px;
    color: #666;
    width: 45%;
}

.filter-option input {
    margin-right: 8px;
    cursor: pointer;
}

.sort-options-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sort-option {
    margin-bottom: 10px;
}

.sort-option label {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 14px;
    color: #666;
}

.sort-option input {
    margin-right: 8px;
    cursor: pointer;
}

.filter-option:hover,
.sort-option:hover {
    color: #333;
}

@media (max-width: 420px) {
  .filter-drawer {
    padding: 40px 25px;
  }
}

/* ACCORDION FILTER DRAWER */
.filter-drawer .drawer-body {
    padding: 0;
}

.accordion-filter-item {
    border-bottom: 1px solid var(--border);
}

.accordion-filter-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.accordion-filter-header:hover {
    background-color: rgba(0, 0, 0, 0.02);
}

.accordion-filter-header .filter-title {
    margin-bottom: 0;
    font-size: 12px;
    letter-spacing: 0.25em;
    color: var(--text-primary);
    font-weight: 600;
}

.accordion-icon {
    font-size: 18px;
    font-weight: 300;
    color: var(--text-secondary);
    transition: transform 0.3s ease;
}

.accordion-filter-item.active .accordion-icon {
    transform: rotate(45deg);
}

.accordion-filter-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.accordion-filter-item.active .accordion-filter-content {
    max-height: 500px;
    margin-bottom: 20px;
}

.accordion-filter-item:last-child {
    border-bottom: none;
}

.accordion-filter-content .filter-options {
    padding-bottom: 10px;
}

/* CART DRAWER */
#cart-drawer.active {
    visibility: visible;
    pointer-events: all;
}

.cart-drawer__overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.3);
    opacity: 0;
    transition: opacity 0.3s ease;
}

#cart-drawer.active .cart-drawer__overlay {
    opacity: 1;
}

.drawer__inner {
    position: relative;
    width: 100%;
    max-width: 460px;
    height: 100%;
    box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);   
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
    z-index: 3001;
}

#cart-drawer.active .drawer__inner {
    transform: translateX(0);
}

.drawer__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2rem;
    border-bottom: 1px solid #eaeaea;
}

.drawer__heading {
    font-size: 1.2rem;
    font-weight: 400;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.drawer__close {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #000;
}

.drawer__close svg {
    width: 15px;
    height: 15px;
}

.promo-bar {
    background-color: #eaeaea;
    color: #0a0a0a;
    overflow: hidden;
    padding: 1rem 0;
}

.promo-bar__slides {
    position: relative;
    min-height: 50px;
}

.promo-bar__slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    opacity: 0;
    transition: opacity 0.5s ease;
    pointer-events: none;
}

.promo-bar__slide.active {
    opacity: 1;
    position: relative;
    pointer-events: auto;
}

.promo-bar__content {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0 2rem;
    font-size: 12px;
    line-height: 18px;
}

.promo-bar__content p {
    margin: 0;
    color: inherit;
}

.promo-bar__icon {
    width: 19px;
    height: auto;
    flex-shrink: 0;
}

.drawer__contents-wrapper {
    flex: 1;
    overflow-y: auto;
    scrollbar-width: thin;
}

.drawer__contents-inner {
    display: flex;
    flex-direction: column;
    min-height: 100%;
}

.drawer__body {
    padding: 2rem;
}

.cart-item {
    display: flex;
    gap: 1.5rem;
    position: relative;
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid #f0f0f0;
}

.cart-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.cart-item__media {
    width: 100px;
    flex-shrink: 0;
    position: relative;
}

.cart-item__media img {
    width: 100%;
    height: auto;
    aspect-ratio: 0.86;
    object-fit: cover;
}

.cart-item__link {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.cart-item__details {
    flex: 1;
    min-width: 0;
}

.cart-item__details-title-price {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 0.5rem;
}

.cart-item__name {
    font-size: 14px;
    font-weight: 400;
    text-decoration: none;
    color: inherit;
    margin: 0;
    line-height: 1.4;
}

.cart-item__price {
    font-size: 14px;
    white-space: nowrap;
    color: #000;
}

.cart-item__details-properties {
    margin: 0 0 0.75rem 0;
    font-size: 12px;
    color: #666;
}

.cart-item__details-properties .product-option {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0.25rem;
}

.cart-item__details-properties dt {
    font-weight: 400;
    min-width: 60px;
    color: #999;
}

.cart-item__details-properties dd {
    margin: 0;
    color: #333;
}

.cart-item__actions {
    display: flex;
    gap: 1rem;
}

.cart-item__action {
    background: none;
    border: none;
    padding: 0;
    font-size: 12px;
    text-decoration: underline;
    cursor: pointer;
    color: #666;
}

.cart-item__action:hover {
    color: #000;
}

.cart-item__quantity-controls {
    margin: 0.75rem 0;
}

.quantity-selector {
    display: inline-flex;
    align-items: center;
    border: 1px solid #ddd;
    border-radius: 4px;
    overflow: hidden;
}

.quantity-selector__btn {
    width: 32px;
    height: 32px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s;
}

.quantity-selector__btn:hover:not(:disabled) {
    background-color: #f5f5f5;
}

.quantity-selector__btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.quantity-selector__value {
    min-width: 32px;
    text-align: center;
    font-size: 14px;
}

.cart-empty {
    text-align: center;
    padding: 3rem 0;
}

.recently-viewed-products {
    margin-top: auto;
    padding: 2rem;
    border-top: 1px solid #eaeaea;
    background-color: #fafafa;
}

.recently-viewed-products__container {
    position: relative;
}

.recently-viewed-products__heading {
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    margin: 0 0 1rem 0;
    color: #333;
}

.recently-viewed-products__slider {
    display: flex;
    gap: 1rem;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding-bottom: 0.5rem;
}

.recently-viewed-products__slider::-webkit-scrollbar {
    display: none;
}

.recently-viewed-products__item {
    min-width: 120px;
    flex: 0 0 auto;
}

.recent-product-card {
    width: 100%;
}

.recent-product-card__link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.recent-product-card__image {
    aspect-ratio: 0.86;
    background-color: #f5f5f5;
    margin-bottom: 0.5rem;
    overflow: hidden;
}

.recent-product-card__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.recent-product-card__content {
    font-size: 11px;
}

.recent-product-card__title {
    font-size: 11px;
    font-weight: 400;
    margin: 0 0 0.25rem 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.recent-product-card__category {
    font-size: 9px;
    color: #999;
    text-transform: uppercase;
    display: block;
    margin-bottom: 0.25rem;
}

.recent-product-card__price {
    font-size: 11px;
    color: #000;
}

.recently-viewed-products__nav {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
    margin-top: 1rem;
}

.slider-nav {
    width: 28px;
    height: 28px;
    border: 1px solid #ddd;
    background: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    transition: all 0.2s;
}

.slider-nav:hover:not(:disabled) {
    background-color: #000;
    color: #fff;
    border-color: #000;
}

.slider-nav:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.drawer__footer {
    border-top: 1px solid #eaeaea;
    padding: 1.5rem 2rem;
    background-color: #fff;
}

.cart-footer {
    margin-bottom: 1.5rem;
}

.cart-footer__row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
    font-size: 14px;
}

.cart-footer__row--total {
    font-weight: 700;
    font-size: 16px;
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid #eaeaea;
}

.cart-footer__label {
    color: #666;
}

.cart-footer__row--total .cart-footer__label {
    color: #000;
}

.cart-footer__value {
    color: #000;
}

.cart-actions {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.cart-checkout-btn {
    width: 100%;
    padding: 1rem;
    background-color: #000;
    color: #fff;
    border: none;
    cursor: pointer;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-decoration: none;
    text-align: center;
    transition: background-color 0.2s;
}

.cart-checkout-btn:hover {
    background-color: #333;
    color: #fff;
}

.cart-view-btn {
    width: 100%;
    padding: 1rem;
    background: none;
    border: 1px solid #000;
    color: #000;
    cursor: pointer;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-decoration: none;
    text-align: center;
    transition: all 0.2s;
}

.cart-view-btn:hover {
    background-color: #000;
    color: #fff;
}

.cart-item-loading {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.cart-item-loading .spinner {
    width: 30px;
    height: 30px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #000;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@media screen and (max-width: 480px) {
    .drawer__inner {
        max-width: 100%;
    }
    
    .drawer__header,
    .drawer__body,
    .recently-viewed-products,
    .drawer__footer {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    .cart-item__media {
        width: 80px;
    }
    
    .recently-viewed-products__item {
        min-width: 100px;
    }
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

/* ============================= */
/* SEARCH DRAWER                 */ 
/* Filter Drawer Styles */
.filter-drawer {
    position: fixed;
    top: 0;
    right: -100%;
    width: 100%;
    max-width: 480px;
    height: 100vh;
    background: #fff;
    z-index: 10000;
    transition: right 0.3s ease;
    display: flex;
    flex-direction: column;
    box-shadow: -2px 0 10px rgba(0,0,0,0.1);
}

.filter-drawer.active {
    right: 0;
}

.filter-drawer .drawer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #eee;
}

.filter-drawer .drawer-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
}

.filter-drawer .drawer-body {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

/* Accordion Styles */
.accordion-filter-item {
    border-bottom: 1px solid #eee;
    margin-bottom: 10px;
}

.accordion-filter-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    cursor: pointer;
    font-weight: 600;
}

.accordion-filter-header .accordion-icon {
    transition: transform 0.3s ease;
}

.accordion-filter-item.active .accordion-icon {
    transform: rotate(45deg);
}

.accordion-filter-content {
    display: none;
    padding-bottom: 15px;
}

.accordion-filter-item.active .accordion-filter-content {
    display: block;
}

/* Filter Options */

/* Size Grid */
.size-grid, .width-grid, .pattern-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.size-btn, .width-btn, .pattern-btn {
    padding: 8px;
    border: 1px solid #ddd;
    background: transparent;
    cursor: pointer;
    transition: all 0.3s ease;
}

.size-btn.active, .width-btn.active, .pattern-btn.active {
    border-color: #000;
}

/* Color Grid */
.color-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    padding: 10px;
}

.color-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    border:2px solid #c0c0c0;
}

.color-btn.active {
    transform: scale(1.1);
    box-shadow: 0 0 0 2px #fff, 0 0 0 4px #000;
}

/* Price Range */
.price-range {
    padding: 10px 0;
}

.price-inputs {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
}

.price-input {
    width: 100px;
    padding: 8px;
    border: 1px solid #ddd;
}

.price-slider {
    position: relative;
    height: 4px;
    background: #ddd;
    border-radius: 2px;
}

.range-slider {
    position: absolute;
    width: 100%;
    height: 4px;
    background: transparent;
    pointer-events: none;
    -webkit-appearance: none;
}

.range-slider::-webkit-slider-thumb {
    pointer-events: auto;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #000;
    cursor: pointer;
    -webkit-appearance: none;
}

/* Sort Options */
.sort-options-list {
    list-style: none;
    margin: 0;
}

.sort-option {
    margin-bottom: 10px;
}

.sort-option label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

/* Filter Actions */
.filter-actions {
    padding: 20px;
    border-top: 1px solid #eee;
}



#overlay.active {
    display: block;
}

body.filter-open {
    overflow: hidden;
}
.pattern-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}
.pattern-btn {
    padding:0px;
    width: 60px;
    height: 60px;
    border: 1px solid #ddd;
    background: transparent;
    cursor: pointer;
    transition: all 0.3s ease;
}
.pattern-btn.active {
    border-color: #000;
} 
.pattern-btn img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 4px;
}  