/* ====================================
   PRODUCTS PAGE - CUSTOM STYLES
   ==================================== */

/* ==========================================
   HERO SECTION
   ========================================== */
.products-hero-section {
  padding: 80px 0 0 0;
  margin-top: 80px;
  animation: fadeInUp 0.9s cubic-bezier(0.25, 1, 0.5, 1) backwards;
  background-color: var(--color-bg);
  transition: padding-top 0.3s ease;
}

body.announcement-hidden .products-hero-section {
  padding-top: 40px;
}

@media (max-width: 576px) {
  .products-hero-section {
    margin-top: 90px;
    padding: 24px 0 0 0;
  }

  body.announcement-hidden .products-hero-section {
  padding-top: 70px !important;
  margin-top: 0px;
  /* border: 3px solid red !important; */
}
}

.products-hero-banner {
  position: relative;
  width: 100%;
  height: 460px;
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 15px 45px rgba(30, 41, 59, 0.1);
}

@media (max-width: 991px) {
  .products-hero-banner {
    height: 380px;
    margin: 30px 20px 0 20px;
  }
}

@media (max-width: 576px) {
  .products-hero-banner {
    height: 320px;
    margin: 0px;
    border-radius: 16px;
  }
}

.products-hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.8s cubic-bezier(0.25, 1, 0.5, 1);
}

.products-hero-banner:hover .products-hero-bg {
  transform: scale(1.04);
}

.products-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.65) 0%, rgba(30, 41, 59, 0.35) 50%, transparent 100%);
  z-index: 2;
}

.products-hero-content {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 60px 80px;
  max-width: 600px;
  z-index: 10;
  animation: fadeInLeft 1s cubic-bezier(0.25, 1, 0.5, 1) backwards;
  animation-delay: 0.2s;
}

@media (max-width: 991px) {
  .products-hero-content {
    padding: 50px 60px;
    max-width: 100%;
  }
}

@media (max-width: 768px) {
  .products-hero-content {
    padding: 40px 40px;
    justify-content: flex-end;
  }
}

@media (max-width: 576px) {
  .products-hero-content {
    padding: 30px 24px;
    justify-content: center;
    align-items: center;
    text-align: center;
  }
}

.products-hero-label {
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--color-secondary);
  margin-bottom: 16px;
  display: block;
}

.products-hero-heading {
  font-family: var(--font-heading);
  font-size: 3rem;
  font-weight: 700;
  line-height: 1.2;
  color: var(--color-white);
  margin-bottom: 20px;
  margin-top: 0;
}

@media (max-width: 991px) {
  .products-hero-heading {
    font-size: 2.5rem;
  }
}

@media (max-width: 576px) {
  .products-hero-heading {
    font-size: 1.9rem;
  }
}

.products-hero-desc {
  font-family: var(--font-body);
  font-size: 1.05rem;
  font-weight: 400;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.95);
  margin-bottom: 32px;
  margin-top: 0;
  max-width: 500px;
}

@media (max-width: 768px) {
  .products-hero-desc {
    font-size: 1rem;
    margin-bottom: 28px;
  }
}

@media (max-width: 576px) {
  .products-hero-desc {
    font-size: 0.95rem;
    margin-bottom: 24px;
  }
}

/* ==========================================
   BREADCRUMB
   ========================================== */
.breadcrumb-wrapper {
  padding: 24px 0;
}

@media (max-width: 576px) {
  .breadcrumb-wrapper {
    padding: 16px 0;
  }
}

.breadcrumb {
  background-color: transparent;
  padding: 0;
  margin-bottom: 0;
}

.breadcrumb-item {
  font-size: 0.9rem;
  color: var(--color-body);
}

.breadcrumb-item a {
  color: var(--color-body);
  text-decoration: none;
  transition: color 0.3s ease;
}

.breadcrumb-item a:hover {
  color: var(--color-primary);
}

.breadcrumb-item.active {
  color: var(--color-heading);
  font-weight: 500;
}

/* ==========================================
   PRODUCTS SECTION LAYOUT
   ========================================== */
.products-section {
  padding: 40px 0 60px 0;
  background-color: var(--color-bg);
}

@media (max-width: 576px) {
  .products-section {
    padding: 24px 0 40px 0;
  }
}

.products-container {
  display: flex;
  gap: 40px;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 40px;
}

@media (max-width: 991px) {
  .products-container {
    gap: 30px;
    padding: 0 24px;
  }
}

@media (max-width: 768px) {
  .products-container {
    gap: 20px;
    padding: 0 16px;
  }
}

@media (max-width: 576px) {
  .products-container {
    flex-direction: column;
    gap: 0;
    padding: 0 16px;
  }
}

/* ==========================================
   SIDEBAR
   ========================================== */
.products-sidebar {
  width: 280px;
  flex-shrink: 0;
}

@media (max-width: 991px) {
  .products-sidebar {
    width: 240px;
  }
}

@media (max-width: 576px) {
  .products-sidebar {
    display: none;
  }
}

.products-sidebar-sticky {
  position: sticky;
  top: 140px;
  max-height: calc(100vh - 160px);
  overflow-y: auto;
  padding-right: 16px;
  /* padding: 14px;
  border: 1px solid var(--color-primary-hover);
  border-radius: 16px; */
}

.products-sidebar-sticky::-webkit-scrollbar {
  width: 6px;
}

.products-sidebar-sticky::-webkit-scrollbar-track {
  background: transparent;
}

.products-sidebar-sticky::-webkit-scrollbar-thumb {
  background: var(--color-secondary);
  border-radius: 3px;
}

.filter-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--color-border);
}

.filter-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--color-heading);
  margin: 0;
}

.filter-clear-btn {
  background: none;
  border: none;
  color: var(--color-primary);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: underline;
  transition: color 0.3s ease;
  padding: 0;
}

.filter-clear-btn:hover {
  color: var(--color-primary-hover);
}

.filter-group {
  margin-bottom: 28px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--color-border);
}

.products-sidebar-sticky > .filter-group:last-of-type {
  border-bottom: none;
  margin-bottom: 8px;
  padding-bottom: 0;
}

.filter-group-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--color-heading);
  margin-bottom: 12px;
  margin-top: 0;
}

.filter-checkboxes {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.filter-checkbox {
  display: flex;
  align-items: center;
  cursor: pointer;
  font-size: 0.9rem;
  color: var(--color-body);
  user-select: none;
  transition: color 0.2s ease;
}

.filter-checkbox input[type="checkbox"] {
  width: 16px;
  height: 16px;
  margin-right: 8px;
  cursor: pointer;
  accent-color: var(--color-primary);
}

.filter-checkbox:hover {
  color: var(--color-heading);
}

/* Price Range Styling */
.price-range-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.price-inputs {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.price-input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--color-border);
  border-radius: 6px;
  font-size: 0.85rem;
  color: var(--color-heading);
  transition: border-color 0.3s ease;
}

.price-input:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 2px rgba(140, 189, 188, 0.1);
}

.price-separator {
  display: none;
}

.price-slider {
  width: 100%;
  height: 4px;
  border-radius: 2px;
  background: var(--color-border);
  outline: none;
  -webkit-appearance: none;
}

.price-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--color-primary);
  cursor: pointer;
  transition: background 0.3s ease;
}

.price-slider::-webkit-slider-thumb:hover {
  background: var(--color-primary-hover);
}

.price-slider::-moz-range-thumb {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--color-primary);
  cursor: pointer;
  border: none;
  transition: background 0.3s ease;
}

.price-slider::-moz-range-thumb:hover {
  background: var(--color-primary-hover);
}

/* Color Swatches */
.color-swatches {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.color-swatch {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  border-radius: 8px;
  cursor: pointer;
  overflow: hidden;
  background-color: var(--color);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  box-shadow: 0 2px 8px rgba(30, 41, 59, 0.05);
}

.color-swatch:hover {
  transform: scale(1.08);
  box-shadow: 0 4px 12px rgba(30, 41, 59, 0.15);
}

.color-swatch input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  cursor: pointer;
  width: 100%;
  height: 100%;
}

.color-swatch input[type="checkbox"]:checked + label::after {
  content: '✓';
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.4);
  color: white;
  font-weight: bold;
  font-size: 1rem;
}

/* ==========================================
   MAIN CONTENT AREA
   ========================================== */
.products-main {
  flex: 1;
  min-width: 0;
}

/* TOOLBAR */
.products-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 32px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--color-border);
  gap: 20px;
}

@media (max-width: 576px) {
  .products-toolbar {
    margin-bottom: 24px;
    padding-bottom: 16px;
  }
}

.toolbar-left {
  display: flex;
  align-items: center;
}

.product-count {
  font-size: 0.95rem;
  color: var(--color-body);
  font-weight: 500;
}

.toolbar-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.sort-wrapper {
  min-width: 180px;
}

.sort-select {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  font-size: 0.9rem;
  color: var(--color-heading);
  background-color: var(--color-white);
  cursor: pointer;
  transition: border-color 0.3s ease;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%238CBDBC' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center;
  padding-right: 32px;
}

.sort-select:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 2px rgba(140, 189, 188, 0.1);
}

/* Grid Toggle */
.grid-toggle {
  display: flex;
  gap: 6px;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  padding: 4px;
  background-color: var(--color-white);
}

@media (max-width: 576px) {
  .grid-toggle {
    display: none;
  }
}

.grid-btn {
  padding: 6px 10px;
  border: 1px solid transparent;
  background: none;
  color: var(--color-body);
  cursor: pointer;
  border-radius: 6px;
  font-size: 0.9rem;
  transition: all 0.3s ease;
}

.grid-btn.active {
  background-color: var(--color-primary);
  color: var(--color-white);
  border-color: var(--color-primary);
}

.grid-btn:hover:not(.active) {
  color: var(--color-heading);
}

.mobile-filter-btn {
  display: none;
  padding: 8px 16px;
  border: 1px solid var(--color-border);
  background-color: var(--color-white);
  border-radius: 8px;
  font-size: 0.85rem;
  color: var(--color-heading);
  cursor: pointer;
  transition: all 0.3s ease;
  font-weight: 600;
  gap: 8px;
}

@media (max-width: 576px) {
  .mobile-filter-btn {
    display: flex;
    align-items: center;
  }
}

.mobile-filter-btn:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
}

/* PRODUCT GRID */
.products-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  row-gap: 36px;
  margin-bottom: 50px;
}

@media (max-width: 991px) {
  .products-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    row-gap: 32px;
  }
}

@media (max-width: 768px) {
  .products-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    row-gap: 28px;
  }
}

@media (max-width: 576px) {
  .products-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
    row-gap: 24px;
  }
}

/* Product Grid Columns */
.products-grid.grid-2 {
  grid-template-columns: repeat(2, 1fr) !important;
}

@media (max-width: 768px) {
  .products-grid.grid-2 {
    grid-template-columns: repeat(2, 1fr) !important;
  }
}

@media (max-width: 576px) {
  .products-grid.grid-2 {
    grid-template-columns: repeat(2, 1fr) !important;
  }
}

.products-grid.grid-4 {
  grid-template-columns: repeat(4, 1fr) !important;
}

@media (max-width: 991px) {
  .products-grid.grid-4 {
    grid-template-columns: repeat(3, 1fr) !important;
  }
}

@media (max-width: 768px) {
  .products-grid.grid-4 {
    grid-template-columns: repeat(2, 1fr) !important;
  }
}

/* ==========================================
   PRODUCT CARD (reuse from homepage)
   ========================================== */
/* These styles are already defined in style.css */
/* We're just ensuring the arrival-product-card is displayed properly */

.arrival-product-card {
  animation: fadeInUp 0.6s cubic-bezier(0.25, 1, 0.5, 1) backwards;
}

@for $i from 1 to 13 {
  .arrival-product-card:nth-child(#{$i}) {
    animation-delay: calc(0.05s * #{$i});
  }
}

/* ==========================================
   PAGINATION
   ========================================== */
.pagination-wrapper {
  display: flex;
  justify-content: center;
  margin-top: 60px;
  padding-top: 40px;
  border-top: 1px solid var(--color-border);
}

@media (max-width: 576px) {
  .pagination-wrapper {
    margin-top: 40px;
    padding-top: 24px;
  }
}

.pagination {
  display: flex;
  gap: 4px;
}

.page-item {
  margin: 0;
}

.page-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-width: 40px;
  height: 40px;
  padding: 8px 12px;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  color: var(--color-heading);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.9rem;
  transition: all 0.3s ease;
  background-color: transparent;
}

.page-link:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
  transform: translateY(-2px);
}

.page-item.active .page-link {
  background-color: var(--color-primary);
  border-color: var(--color-primary);
  color: var(--color-white);
}

.page-link i {
  font-size: 0.85rem;
}

@media (max-width: 576px) {
  .page-link {
    width: 36px;
    height: 36px;
    font-size: 0.85rem;
    padding: 4px 8px;
  }

  .page-link .pagination-text {
    display: none;
  }

  .page-link i {
    font-size: 0.75rem;
  }

  .products-toolbar {
    flex-wrap: wrap;
  }

  .toolbar-left {
    flex: 1 1 100%;
    min-width: 100%;
    order: 1;
    margin-bottom: 12px;
  }

  .toolbar-right {
    flex: 1 1 100%;
    min-width: 100%;
    order: 2;
    flex-wrap: wrap;
    gap: 8px;
  }

  .sort-wrapper {
    flex: 1 1 60%;
    min-width: 150px;
  }

  .mobile-filter-btn {
    flex: 1 1 calc(40% - 4px);
    min-width: 80px;
  }
}

/* ==========================================
   FILTER ACTION BUTTONS
   ========================================== */
.filter-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 14px;
  padding-top: 0px;
  position: sticky;
  bottom: 0;
  background-color: var(--color-white);
  z-index: 1000;
  /* box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05); */
  /* border-top: 1px solid var(--color-border); */
}

.filter-actions .btn {
  padding: 12px 16px;
  font-weight: 600;
  font-size: 0.9rem;
  border-radius: 8px;
  transition: all 0.3s ease;
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  cursor: pointer;
}

.filter-actions .btn i {
  font-size: 0.9rem;
}

.filter-actions .btn-secondary {
  background-color: var(--color-white);
  border: 1px solid var(--color-border);
  color: var(--color-heading);
}

.filter-actions .btn-secondary:hover {
  background-color: var(--color-bg-alt);
  border-color: var(--color-primary);
  color: var(--color-primary);
}

.filter-actions .btn-premium-primary {
  background-color: var(--color-primary);
  color: var(--color-white);
  border: none;
}

.filter-actions .btn-premium-primary:hover {
  background-color: var(--color-primary-hover);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(140, 189, 188, 0.2);
}

/* ==========================================
   MOBILE FILTER MODAL
   ========================================== */
.mobile-filter-modal {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  max-height: 80vh;
  background-color: var(--color-white);
  border-radius: 24px 24px 0 0;
  z-index: 1090;
  animation: slideUp 0.4s cubic-bezier(0.25, 1, 0.5, 1);
  flex-direction: column;
  display: none;
}

.mobile-filter-modal.active {
  display: flex;
}

@media (max-width: 576px) {
  .mobile-filter-modal {
    display: none;
  }
}

.mobile-filter-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
  border-bottom: 1px solid var(--color-border);
  flex-shrink: 0;
}

.mobile-filter-header h6 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--color-heading);
  margin: 0;
}

.mobile-filter-close {
  background: none;
  border: none;
  font-size: 1.25rem;
  color: var(--color-heading);
  cursor: pointer;
  padding: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.3s ease;
}

.mobile-filter-close:hover {
  color: var(--color-primary);
}

.mobile-filter-content {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
  -webkit-overflow-scrolling: touch;
}

.mobile-filter-content .filter-group {
  margin-bottom: 28px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--color-border);
}

.mobile-filter-content .filter-group:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.mobile-filter-footer {
  display: flex;
  gap: 12px;
  padding: 20px 24px;
  border-top: 1px solid var(--color-border);
  flex-shrink: 0;
}

.mobile-filter-footer .btn {
  flex: 1;
  padding: 12px 16px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.3s ease;
  text-decoration: none;
  cursor: pointer;
}

.mobile-filter-footer .btn i {
  font-size: 0.9rem;
}

.mobile-filter-footer .btn-secondary {
  background-color: var(--color-white);
  border: 1px solid var(--color-border);
  color: var(--color-heading);
}

.mobile-filter-footer .btn-secondary:hover {
  background-color: var(--color-bg-alt);
  border-color: var(--color-primary);
  color: var(--color-primary);
}

.mobile-filter-footer .btn-premium-primary {
  background-color: var(--color-primary);
  color: var(--color-white);
  border: none;
}

.mobile-filter-footer .btn-premium-primary:hover {
  background-color: var(--color-primary-hover);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(140, 189, 188, 0.2);
}

/* ==========================================
   ANIMATIONS
   ========================================== */
@keyframes slideUp {
  from {
    transform: translateY(100%);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInLeft {
  from {
    opacity: 0;
    transform: translateX(-40px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* ==========================================
   UTILITY CLASSES
   ========================================== */
body.filter-modal-open {
  overflow: hidden;
}

.mobile-filter-modal-backdrop {
  position: fixed;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.4);
  z-index: 1080;
  display: none;
  animation: fadeIn 0.3s ease;
}

.mobile-filter-modal-backdrop.active {
  display: block;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
