/* Product Filter Sidebar - Sticky and Far Left Edge */
.shop-full-wrapper {
  width: 100%;
  padding: 0 40px; /* Some padding from the extreme edge */
  margin-top: 40px;
}

.shop-layout {
  display: flex;
  gap: 60px; /* Wide gap between sidebar and content */
  align-items: flex-start;
  position: relative;
  width: 100%;
  max-width: none;
  margin: 0;
}

.filter-sidebar {
  width: 250px;
  flex-shrink: 0;
  font-family: "DM Sans", sans-serif;
  position: sticky;
  top: 100px; /* Aligns with header height */
  height: calc(100vh - 120px);
  overflow-y: auto;
  padding-right: 15px;
  z-index: 10;
  /* Custom scrollbar for sidebar itself if content is long */
  scrollbar-width: thin;
  scrollbar-color: #eee transparent;
}

.filter-sidebar::-webkit-scrollbar {
  width: 4px;
}

.filter-sidebar::-webkit-scrollbar-thumb {
  background: #eee;
  border-radius: 10px;
}

/* Header */
.filter-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 2px solid #edeff2;
}

.filter-title {
  font-size: 18px;
  font-weight: 600;
  color: #1a1a1a;
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.filter-count {
  font-size: 13px;
  color: #888;
  font-weight: 400;
}



/* Accordion Sections */
.filter-section {
  border-bottom: 1px solid #edeff2;
  padding: 20px 0;
}

.filter-toggle {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  font-size: 15px;
  font-weight: 600;
  color: #1a1a1a;
  text-transform: capitalize;
}

.filter-toggle .icon-chevron {
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  width: 14px;
  height: 14px;
  stroke: #888;
}

.filter-section.active .icon-chevron {
  transform: rotate(180deg);
}

.filter-content {
  display: none;
  margin-top: 15px;
  animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-5px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.filter-section.active .filter-content {
  display: block;
}

/* Checkbox Items */
.filter-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  cursor: pointer;
  font-size: 14px;
  color: #4b5563;
  transition: color 0.2s;
}

.filter-item:hover {
  color: #1a1a1a;
}

.filter-checkbox {
  display: flex;
  align-items: center;
  gap: 12px;
}

.filter-checkbox input[type="checkbox"] {
  width: 18px;
  height: 18px;
  border: 2px solid #d1d5da;
  border-radius: 4px;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  position: relative;
  background: #fff;
  transition: all 0.2s;
}

.filter-checkbox input[type="checkbox"]:checked {
  background: #1a1a1a;
  border-color: #1a1a1a;
}

.filter-checkbox input[type="checkbox"]:checked::after {
  content: "";
  position: absolute;
  left: 4px;
  top: 0px;
  width: 6px;
  height: 10px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.text-count {
  color: #9ca3af;
  font-size: 12px;
  font-weight: 500;
}

/* Price Inputs */
.price-inputs {
  display: flex;
  gap: 8px;
  margin-top: 15px;
  align-items: center;
  padding: 0 5px;
}

.price-input {
  width: 100%;
  padding: 8px 10px;
  background: #fff;
  border: 1px solid #d1d5da;
  border-radius: 6px;
  font-size: 13px;
  color: #1a1a1a;
  outline: none;
  transition: border-color 0.2s;
}

.price-input:focus {
  border-color: #1a1a1a;
}

.btn-apply {
  background: #1a1a1a;
  border: none;
  padding: 8px 12px;
  color: #fff;
  font-size: 12px;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
  transition: background 0.2s;
}

.btn-apply:hover {
  background: #333;
}

/* Mobile Filter Button and Overlay Desktop Initial States */
.mobile-filter-bar {
  display: none;
  width: 100%;
  margin-bottom: 20px;
}

.btn-mobile-filter {
  width: 100%;
  padding: 12px;
  background: #1a1a1a;
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  cursor: pointer;
}

.filter-sidebar-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 999;
}

.filter-close-btn {
  display: none;
}

/* Responsive */
.shop-content {
  flex-grow: 1;
  max-width: 1600px; /* Prevent products from spreading too thin on ultrawide */
}
/* 
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 30px;
} */

@media (max-width: 1024px) {
  .mobile-filter-bar {
    display: block;
  }

  .shop-full-wrapper {
    padding: 0 15px;
  }

  .shop-layout {
    flex-direction: column;
    gap: 0px;
  }

  .mobile-filter-bar {
    display: block;
    margin-bottom: 20px;
  }

  .filter-sidebar-overlay.show {
    display: none !important;
  }

  .filter-sidebar {
    position: static;
    display: none;
    width: 100%;
    z-index: 10;
    padding: 5px;
    margin: -20px 0 20px 0;
    height: auto;
    max-height: none;
    overflow-y: visible;
    border-radius:  0 0 8px 8px;
    transition: none;
  }

  .filter-sidebar.show-mobile {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 10px;
    animation: fadeInDropdown 0.3s ease-out;
  }

  @keyframes fadeInDropdown {
    from { opacity: 0; transform: translateY(-5px); }
    to { opacity: 1; transform: translateY(0); }
  }

  .filter-header {
    display: none;
  }

  .filter-close-btn {
    display: none;
  }



  .filter-section {
    width: calc(50% - 5px);
    border: 1px solid #e1e4e8;
    border-radius: 6px;
    padding: 10px 12px;
    margin: 0;
  }

  .filter-toggle {
    font-size: 13px;
    font-weight: 500;
  }

  .filter-content {
    max-height: none;
    margin-top: 10px;
    background: #f9fafb;
    padding: 10px;
    border-radius: 6px;
  }
}

/* Shop Toolbar */
.shop-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding: 15px 0;
    border-bottom: 1px solid #edeff2;
}

.view-mode-toggles {
    display: flex;
    align-items: center;
    gap: 4px;
}

.toolbar-category-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #000;
    text-align: center;
    flex: 1;
    margin: 0 20px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

@media (max-width: 768px) {
    .toolbar-category-title {
        font-size: 0.95rem;
        margin: 0 10px;
    }
}

.view-mode-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 6px;
    color: #9ca3af;
    cursor: pointer;
    transition: all 0.2s ease;
}

.view-mode-btn:hover {
    color: #1a1a1a;
    background-color: transparent;
}

.view-mode-btn.active {
    color: #1a1a1a;
    background-color: transparent;
    border-color: transparent;
}

/* Dots style view buttons */
.view-mode-btn.view-dots {
    width: auto;
    min-width: 32px;
    height: 32px;
    padding: 0 8px;
}

.view-mode-btn.view-dots .dot-grid {
    display: grid;
    grid-template-rows: repeat(2, 1fr);
    gap: 3px;
}

.view-mode-btn.view-dots .dot-grid > span {
    display: block;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background-color: currentColor;
    opacity: 0.4;
    transition: opacity 0.15s ease;
}

.view-mode-btn.view-dots:hover .dot-grid > span,
.view-mode-btn.view-dots.active .dot-grid > span {
    opacity: 1;
}

.dot-grid-1 { grid-template-columns: repeat(1, 5px); }
.dot-grid-2 { grid-template-columns: repeat(2, 5px); }
.dot-grid-3 { grid-template-columns: repeat(3, 5px); }
.dot-grid-4 { grid-template-columns: repeat(4, 5px); }
.dot-grid-5 { grid-template-columns: repeat(5, 5px); }

@media (max-width: 768px) {
    .view-mode-btn.view-dots[data-view="1"],
    .view-mode-btn.view-dots[data-view="4"],
    .view-mode-btn.view-dots[data-view="5"] {
        display: none !important;
    }
    .view-mode-toggles {
        gap: 0px;
    }
}

/* Products Grid Modifiers */
.products-grid {
    gap: 10px !important;
}

@media (max-width: 768px) {
    .products-grid {
        gap: 8px !important;
    }
}

@media (max-width: 480px) {
    .products-grid {
        gap: 6px !important;
    }
}

.products-grid.grid-view-1 {
    grid-template-columns: repeat(1, 1fr) !important;
}

.products-grid.grid-view-2 {
    grid-template-columns: repeat(2, 1fr) !important;
}

.products-grid.grid-view-3 {
    grid-template-columns: repeat(3, 1fr) !important;
}

.products-grid.grid-view-4 {
    grid-template-columns: repeat(4, 1fr) !important;
}

.products-grid.grid-view-5 {
    grid-template-columns: repeat(5, 1fr) !important;
}

.products-grid.grid-view-list {
    grid-template-columns: 1fr !important;
}

.products-grid.grid-view-list .product-card {
    display: flex;
    flex-direction: row;
    gap: 20px;
    align-items: center;
    text-align: left;
}

.products-grid.grid-view-list .product-card__image {
    width: 250px;
    flex-shrink: 0;
}

.products-grid.grid-view-list .product-card__content {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
}

.products-grid.grid-view-list .product-card__price,
.products-grid.grid-view-list .product-card__colors {
    justify-content: flex-start;
}

.toolbar-item {
    display: flex;
    align-items: center;
    gap: 12px;
}

.toolbar-label {
    font-size: 14px;
    font-weight: 500;
    color: #6b7280;
}

.toolbar-select {
    padding: 8px 32px 8px 12px;
    font-size: 14px;
    font-weight: 600;
    color: #111;
    background-color: #f9fafb;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%236B7280'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 8px center;
    background-size: 16px;
    appearance: none;
    -webkit-appearance: none;
    transition: all 0.2s;
}

@media (max-width: 768px) {
    .shop-toolbar {
        gap: 10px;
        overflow-x: clip;
    }

    .toolbar-item {
        position: relative;
        min-width: 0;
    }

    .toolbar-category-title {
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .toolbar-label {
        display: block !important;
        position: absolute;
        left: 8px; /* Slightly closer to edge */
        top: 50%;
        transform: translateY(-50%);
        font-size: 11px !important; /* Smaller text */
        font-weight: 700 !important;
        color: #111;
        pointer-events: none;
        z-index: 2;
        margin: 0;
    }
    
    .toolbar-select {
        min-width: 80px; /* More compact */
        padding-left: 45px !important; /* Proper padding for 'Show:' */
        text-align: left !important;
        height: 38px;
        background-color: #f3f4f6;
        border-color: #d1d5db;
        position: relative;
        z-index: 1;
        font-size: 13px; /* Slightly smaller number */
    }

    /* Sort select: clean standalone, no label overlay */
    .sort-toolbar-item .toolbar-label {
        display: none !important;
    }

    .sort-toolbar-item {
        flex: 0 0 44px;
        width: 44px;
        min-width: 44px;
        max-width: 44px;
        overflow: hidden;
    }

    /* Mobile: compact icon-only sort button ~44px wide */
    .sort-select-wrap {
        position: relative;
        width: 44px;
        min-width: 44px;
        max-width: 44px;
        height: 38px;
        display: flex;
        align-items: center;
        justify-content: center;
        background-color: #ffffff;
        border: 1px solid #e5e7eb;
        border-radius: 6px;
        box-shadow: 0 1px 2px rgba(0,0,0,0.04);
        cursor: pointer;
        overflow: hidden;
        contain: layout paint;
    }

    .sort-select-wrap .sort-icon {
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        pointer-events: none;
        color: #111;
        display: flex;
        align-items: center;
        justify-content: center;
        z-index: 2;
    }

    .sort-select-wrap .sort-select {
        /* Fill the wrapper but hide text — user sees only the icon */
        position: absolute;
        top: 0;
        left: 0;
        width: 100% !important;
        max-width: 100% !important;
        height: 100% !important;
        min-width: 0 !important;
        margin: 0;
        padding: 0 !important;
        opacity: 0.001; /* Fully transparent but still clickable */
        border: 0 !important;
        background: transparent !important;
        box-shadow: none !important;
        z-index: 3; /* Above the icon so taps register */
        cursor: pointer;
        color: transparent !important;
        text-shadow: 0 0 0 transparent !important;
        -webkit-appearance: none;
        appearance: none;
    }

    /* Remove default dropdown arrow on mobile (we show the icon instead) */
    .sort-select-wrap .sort-select::-ms-expand {
        display: none;
    }
    .sort-select-wrap .sort-select {
        background-image: none !important;
    }
    /* Hide options text from being rendered on some browsers */
    .sort-select-wrap .sort-select option {
        color: #111;
        background: #fff;
    }
}

.toolbar-select:focus {
    outline: none;
    border-color: #111;
    background-color: #fff;
    box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.05);
}

/* Sort wrapper (has icon + select): on desktop, icon is hidden */
.sort-select-wrap {
    position: relative;
    display: inline-block;
}

/* Sort Icon: hidden on DESKTOP, shown only on mobile */
.sort-icon {
    display: none;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

/* Sort by Select: standalone style matching the image (desktop only looks like this) */
.sort-select {
    background-color: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    padding: 8px 36px 8px 14px;
    font-size: 14px;
    font-weight: 500;
    color: #111;
    height: auto;
    line-height: 1.4;
    box-shadow: 0 1px 2px rgba(0,0,0,0.04);
    transition: all 0.15s ease;
    width: auto;
    min-width: 0;
    text-align: left;
}

.sort-select:hover {
    border-color: #d1d5db;
    background-color: #fafafa;
}

.sort-select:focus {
    border-color: #111;
    background-color: #fff;
    box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.05);
}

/* Ensure dropdown (native) options are well-styled if browser supports it */
.sort-select option {
    background: #fff;
    color: #111;
    padding: 8px 12px;
    font-size: 14px;
}

.sort-select option:checked {
    background-color: #f3f4f6;
    color: #111;
    font-weight: 600;
}

.pagination-container {
    margin-top: 40px;
    display: flex;
    justify-content: center;
}

/* Re-use admin pagination styles if needed or let Laravel defaults work */
.pagination-container .pagination {
    display: flex;
    list-style: none;
    gap: 8px;
    padding: 0;
}

.pagination-container .page-item .page-link {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    color: #374151;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s;
}

.pagination-container .page-item.active .page-link {
    background: #111;
    color: #fff;
    border-color: #111;
}

.pagination-container .page-item.disabled .page-link {
    opacity: 0.5;
    cursor: not-allowed;
}

/* -----------------------------------
   Promo Banners & Category Slider
----------------------------------- */


.category-slider-wrapper {
  position: relative;
  margin-bottom: 40px;
  display: flex;
  align-items: center;
  width: 100%;
  overflow: hidden;
  border-radius: 20px; /* Matching the overall rounded feel */
}
.slider-arrow {
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid #e1e4e8;
  border-radius: 50%;
  width: 46px;
  height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
  z-index: 10;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  flex-shrink: 0;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
}
.slider-arrow:hover {
  background: #ffffff;
  transform: translateY(-50%) scale(1.1);
  box-shadow: 0 8px 25px rgba(0,0,0,0.15);
  border-color: #d1d5db;
}
.prev-arrow { left: 15px; }
.next-arrow { right: 15px; }

.category-slider-track {
  display: flex;
  gap: 15px;
  overflow-x: auto;
  scroll-behavior: smooth;
  scroll-snap-type: x mandatory;
  scrollbar-width: none; /* Firefox */
  padding: 10px 10px 20px 10px;
  flex-grow: 1;
}
.category-slider-track::-webkit-scrollbar { display: none; /* Chrome/Safari */ }

.category-slider-card {
  background: #ffffff;
  border-radius: 12px;
  width: 160px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
  padding: 10px;
  flex-shrink: 0;
  scroll-snap-align: start;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
  border: 1px solid #f3f4f6;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.category-slider-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 5px 15px rgba(0,0,0,0.1);
  text-decoration: none;
}
.category-slider-image-wrapper {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #f9fafb;
}
.category-slider-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}
.category-slider-card:hover .category-slider-image {
  transform: scale(1.05);
}
.category-slider-name {
  font-weight: 600;
  font-size: 15px;
  color: #111;
  text-align: center;
  line-height: 1.2;
}
.category-slider-card:hover .category-slider-name {
  color: #d13030;
}

@media (max-width: 768px) {
  .slider-arrow {
    display: none; /* Hide arrows on mobile, prioritize swipe */
  }
  .category-slider-track {
    padding: 10px 5px 20px 5px;
    gap: 10px;
  }
  .category-slider-card {
    width: 130px;
    padding: 8px;
  }
  .category-slider-image-wrapper {
    margin-bottom: 10px;
  }
  .category-slider-name {
    font-size: 13px;
  }
}
