/* ===================================
   CATEGORY PAGE STYLES
   =================================== */

/* Breadcrumb */
.breadcrumb-container {
  background: rgba(255, 255, 255, 0.03);
  padding: 1rem 0;
  margin-top: 80px;
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
}

.breadcrumb a {
  color: rgba(255, 255, 255, 0.7);
  transition: color 0.3s;
}

.breadcrumb a:hover {
  color: var(--gold);
}

.breadcrumb .separator {
  color: rgba(255, 255, 255, 0.4);
}

.breadcrumb .current {
  color: var(--white);
  font-weight: 600;
}

/* Category Header */
.category-header {
  padding: 3rem 0 2rem;
  text-align: center;
  background: linear-gradient(180deg, rgba(255,255,255,0.05) 0%, transparent 100%);
}

.category-title {
  font-family: var(--font-heading);
  font-size: 3rem;
  letter-spacing: 0.1em;
  margin-bottom: 1rem;
}

.title-underline {
  width: 100px;
  height: 3px;
  background: var(--gold);
  margin: 0 auto;
}

/* Main Layout */
.category-main {
  padding: 3rem 0;
}

.category-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 3rem;
}

/* ===================================
   FILTERS SIDEBAR
   =================================== */
.filters-sidebar {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 1.5rem;
  height: fit-content;
  position: sticky;
  top: 100px;
}

.filters-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.filters-header svg {
  color: var(--gold);
}

.filters-header h3 {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  letter-spacing: 0.1em;
  color: var(--gold);
}

/* Filter Groups */
.filter-group {
  margin-bottom: 1.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  padding-bottom: 1rem;
}

.filter-group:last-child {
  border-bottom: none;
  margin-bottom: 0;
}

.filter-group-header {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: none;
  border: none;
  color: var(--white);
  font-family: var(--font-heading);
  font-size: 0.9rem;
  letter-spacing: 0.05em;
  padding: 0.75rem 0;
  cursor: pointer;
  transition: color 0.3s;
}

.filter-group-header:hover {
  color: var(--gold);
}

.filter-group-header svg {
  transition: transform 0.3s;
}

.filter-group-header.active svg {
  transform: rotate(180deg);
}

.filter-group-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.filter-group-content.active {
  max-height: 500px;
  padding-top: 0.5rem;
}

/* Checkbox Filters */
.filter-checkbox {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 0;
  cursor: pointer;
  position: relative;
}

.filter-checkbox input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  cursor: pointer;
}

.checkmark {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 3px;
  transition: all 0.3s;
  position: relative;
}

.filter-checkbox:hover .checkmark {
  border-color: var(--gold);
}

.filter-checkbox input[type="checkbox"]:checked ~ .checkmark {
  background: var(--gold);
  border-color: var(--gold);
}

.filter-checkbox input[type="checkbox"]:checked ~ .checkmark::after {
  content: '';
  position: absolute;
  left: 5px;
  top: 2px;
  width: 4px;
  height: 8px;
  border: solid var(--navy);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.label-text {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.8);
  transition: color 0.3s;
}

.filter-checkbox:hover .label-text {
  color: var(--white);
}

/* Price Range */
.price-range-inputs {
  display: flex;
  flex-direction: column; /* Stack them */
  gap: 0.5rem;
  margin-bottom: 0.75rem;
  width: 100%;
}

.price-range-inputs input {
  width: 100%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  padding: 0.6rem;
  color: var(--white);
  font-size: 0.9rem;
}

.price-range-inputs span {
  display: none; /* Hide the dash separator */
}

.price-range-inputs input:focus {
  outline: none;
  border-color: var(--gold);
}

.price-range-inputs span {
  color: rgba(255, 255, 255, 0.5);
}

.apply-price-btn {
  width: 100%;
  background: var(--gold);
  color: var(--navy);
  border: none;
  border-radius: 6px;
  padding: 0.5rem;
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.3s;
}

.apply-price-btn:hover {
  background: #f4d03f;
  transform: translateY(-2px);
}

/* ===================================
   PRODUCTS SECTION
   =================================== */
.products-section {
  flex: 1;
}

/* Sort Bar */
.sort-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  padding: 1.25rem;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 12px;
  gap: 1rem;
  flex-wrap: wrap;
}

.results-count {
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.7);
  font-weight: 500;
  flex: 1;
  min-width: 150px;
}

.results-count span {
  color: var(--gold);
  font-weight: 600;
}

.sort-dropdown {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.sort-dropdown label {
  font-size: 0.85rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.6);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.sort-select {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(212, 175, 55, 0.3);
  border-radius: 8px;
  padding: 0.65rem 2.5rem 0.65rem 1rem;
  color: var(--white);
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23D4AF37' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  transition: all 0.3s;
  min-width: 180px;
}

.sort-select:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: var(--gold);
}

.sort-select:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.1);
}

/* Products Grid */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1.5rem;
}

/* No Results */
.no-results {
  text-align: center;
  padding: 4rem 2rem;
}

.no-results svg {
  color: rgba(255, 255, 255, 0.3);
  margin-bottom: 1.5rem;
}

.no-results h3 {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
  color: var(--white);
}

.no-results p {
  color: rgba(255, 255, 255, 0.6);
}

/* ===================================
   RESPONSIVE
   =================================== */
@media (max-width: 1024px) {
  .category-layout {
    grid-template-columns: 1fr;
  }

  .filters-sidebar {
    position: static;
    margin-bottom: 2rem;
  }

  .products-grid {
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1.5rem;
  }
}

@media (max-width: 768px) {
  .breadcrumb-container {
    margin-top: 60px;
  }

  .category-title {
    font-size: 2rem;
  }

  .category-main {
    padding: 2rem 0;
  }

  .sort-bar {
    flex-direction: column;
    gap: 1rem;
    align-items: stretch;
    padding: 1rem;
  }

  .results-count {
    order: 2;
    text-align: center;
    min-width: 100%;
    padding: 0.75rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    font-size: 0.9rem;
  }

  .mobile-filter-btn {
    order: 1;
    width: 100%;
    justify-content: center;
  }

  .sort-dropdown {
    order: 3;
    width: 100%;
    justify-content: space-between;
  }

  .sort-dropdown label {
    font-size: 0.8rem;
  }

  .sort-select {
    flex: 1;
    min-width: 0;
  }

  .products-grid {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 1rem;
  }

  .filters-sidebar {
    padding: 1rem;
  }
}

/* ===================================
   PRODUCT CARD STYLES
   =================================== */
.product-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  overflow: hidden;
  transition: all 0.3s ease;
  position: relative;
  display: flex;
  flex-direction: column;
}

.product-card:hover {
  transform: translateY(-10px);
  border-color: var(--gold);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.product-image-wrapper {
  position: relative;
  width: 100%;
  padding-top: 120%; /* Aspect ratio 5:6 */
  overflow: hidden;
  background: #0a1b2a;
}

.product-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.product-card:hover .product-image {
  transform: scale(1.1);
}

.product-link-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

/* Badges */
.product-badge, .sale-badge {
  position: absolute;
  top: 10px;
  padding: 4px 10px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  z-index: 2;
  letter-spacing: 0.05em;
}

.product-badge {
  left: 10px;
  background: var(--gold);
  color: var(--navy);
}

.sale-badge {
  right: 10px;
  background: #e74c3c;
  color: white;
}

/* Product Info */
.product-info {
  padding: 1.5rem;
  background: linear-gradient(180deg, rgba(255,255,255,0.02) 0%, transparent 100%);
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.product-name {
  margin: 0;
  font-size: 1.1rem;
  line-height: 1.4;
}

.product-name a {
  color: var(--white);
  text-decoration: none;
  transition: color 0.3s;
  font-family: var(--font-heading);
  letter-spacing: 0.05em;
}

.product-card:hover .product-name a {
  color: var(--gold);
}

.product-brand {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.5);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin: 0;
}

.product-price-wrapper {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: auto;
  padding-top: 0.5rem;
}

.product-price {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--white);
}

.original-price {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.5);
  text-decoration: line-through;
}

/* Card Actions */
.card-actions {
  padding: 0 1.5rem 1.5rem;
  display: flex;
  gap: 0.75rem;
  opacity: 0;
  transform: translateY(10px);
  transition: all 0.3s ease;
}

.product-card:hover .card-actions {
  opacity: 1;
  transform: translateY(0);
}

.card-action-btn {
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.3s;
  font-family: var(--font-body);
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: center;
}

.card-action-btn:first-child {
  flex: 1;
  background: var(--white);
  color: var(--navy);
  padding: 0.75rem;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
}

.card-action-btn:first-child:hover {
  background: var(--gold);
}

.wishlist-btn {
  width: 42px;
  background: rgba(255, 255, 255, 0.1);
  color: var(--white);
  padding: 0;
}

.wishlist-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  color: #e74c3c;
}

.wishlist-btn.active {
  color: #e74c3c;
  fill: #e74c3c;
}

.wishlist-btn svg {
  width: 20px;
  height: 20px;
}

/* Mobile Adjustments for Cards */
@media (max-width: 768px) {
  .product-image-wrapper {
    padding-top: 100%; /* Square on mobile */
  }

  .card-actions {
    opacity: 1;
    transform: translateY(0);
    padding: 1rem;
  }
  
  .product-info {
    padding: 1rem;
  }
  
  .product-name {
    font-size: 1rem;
  }
}

/* ===================================
   MOBILE FILTER BUTTON & MENU
   =================================== */

.mobile-filter-btn {
  display: none;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  background: var(--gold);
  color: var(--navy);
  border: none;
  border-radius: 8px;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  cursor: pointer;
  transition: all 0.3s ease;
}

.mobile-filter-btn:active {
  transform: scale(0.95);
}

.mobile-filter-btn svg {
  width: 18px;
  height: 18px;
}

.filters-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  z-index: 9998;
  backdrop-filter: blur(4px);
}

.filters-overlay.active {
  display: block;
}

@media (max-width: 992px) {
  .mobile-filter-btn {
    display: flex;
  }

  .filters-sidebar {
    position: fixed;
    left: -100%;
    top: 0;
    bottom: 0;
    width: 85%;
    max-width: 350px;
    z-index: 9999;
    background: var(--secondary);
    overflow-y: auto;
    transition: left 0.3s ease;
    padding: 1.5rem;
    box-shadow: 4px 0 20px rgba(0, 0, 0, 0.5);
  }

  .filters-sidebar.active {
    left: 0;
  }

  .filters-header {
    position: sticky;
    top: 0;
    background: var(--secondary);
    z-index: 10;
    padding-bottom: 1rem;
    margin-bottom: 1rem;
    border-bottom: 2px solid var(--gold);
  }

  .filter-close-btn {
    display: block;
    position: absolute;
    top: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
  }

  .filter-close-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(90deg);
  }

  .category-layout {
    grid-template-columns: 1fr;
  }

  .products-section {
    width: 100%;
  }
}

.filter-close-btn {
  display: none;
}
