/**
 * Shop Stylesheet - Layout Overrides Only
 * Depends on style.css
 */

.top-bar {
  background: var(--color-cabernet);
  color: white;
  padding: 12px 0;
  text-align: center;
  font-size: 14px;
  display: none;
}

.shop-header {
  background: linear-gradient(135deg, #2D2A29 0%, #64242E 100%);
  box-shadow: 0 4px 20px rgba(100, 36, 46, 0.3);
  position: fixed;
  width: 100%;
  top: 0;
  left: 0;
  z-index: 100;
}

/* Compensar altura do header fixo */
body {
  padding-top: 60px;
  background: linear-gradient(180deg, #FFFFFF 0%, #FAF8F5 100%); /* Subtle premium warmth */
  min-height: 100vh;
}

 /* Product Modal Styling */
.modal-overlay {
  z-index: 5000;
}

.header-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 12px 30px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
}

.logo img {
  height: 40px;
}

.search-bar {
  flex: 1;
  max-width: 600px;
  position: relative;
}

.search-input {
  width: 100%;
  padding: 8px 50px 8px 20px;
  border: 2px solid rgba(255,255,255,0.3);
  border-radius: 30px;
  font-size: 15px;
  background: rgba(255,255,255,0.15);
  color: white;
}

.search-input::placeholder {
  color: rgba(255,255,255,0.7);
}

.search-btn {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  background: var(--color-sand);
  color: var(--color-marsala);
  border: none;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  cursor: pointer;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.header-actions {
  display: flex;
  gap: 25px;
}

/* ===== HERO BANNER ===== */
.hero-banner {
  /* background: linear-gradient(135deg, var(--color-cabernet) 0%, var(--color-marsala) 100%); */
  /* color: white; */
  background: white;
  color: var(--color-cabernet);
 /*  padding: 0px 20px; */
  text-align: center;
  /* margin-bottom: 40px; */
}

.hero-title {
  font-family: 'Oranienbaum', serif;
  font-size: 52px;
  margin-bottom: 25px;
  font-weight: 400;
  color: white;
}

.hero-subtitle {
  font-size: 20px;
  margin-bottom: 35px;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

.hero-cta {
  display: inline-block;
  padding: 18px 45px;
  background: var(--color-sand);
  color: var(--color-marsala);
  text-decoration: none;
  border-radius: 30px;
  font-weight: 700;
  font-size: 17px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* ===== LAYOUT ===== */
.shop-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 30px 20px;
  display: grid;
  grid-template-columns: 250px 1fr;
  gap: 20px;
}

.filters-sidebar {
  background: white;
  padding: 25px;
  border-radius: 0;
  height: fit-content;
  position: sticky;
  top: 100px;
  box-shadow: 0 5px 20px rgba(0,0,0,0.05);
}

.filter-title {
  font-weight: 600;
  font-size: 16px;
  margin-bottom: 20px;
  color: var(--color-marsala);
  position: relative;
  display: inline-block;
}

.filter-title::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 30px;
  height: 2px;
  background: var(--color-sand);
}

.filter-option {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  cursor: pointer;
}

/* Custom Premium Checkbox */
.filter-option input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  border: 2px solid #e0e0e0;
  border-radius: 4px;
  outline: none;
  cursor: pointer;
  position: relative;
  background: white;
  margin-right: 0; /* Flex gap handles spacing */
  flex-shrink: 0;
  transition: all 0.2s ease;
}

.filter-option input[type="checkbox"]:checked {
  background-color: var(--color-marsala);
  border-color: var(--color-marsala);
}

.filter-option input[type="checkbox"]:checked::after {
  content: '\f00c';
  font-family: 'Font Awesome 5 Free';
  font-weight: 900;
  color: white;
  position: absolute;
  font-size: 12px;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.filter-option:hover input[type="checkbox"] {
  border-color: var(--color-sand);
}

.filter-option label {
  font-size: 14px;
  cursor: pointer;
}

/* ===== PRODUCTS ===== */
.products-section {
  background: white;
  padding: 30px;
  border-radius: 0;
  box-shadow: 0 5px 20px rgba(0,0,0,0.05);
}

.products-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 25px;
  padding-bottom: 20px;
  border-bottom: 2px solid #f0f0f0;
}

.products-count {
  font-size: 16px;
  color: #666;
}

.sort-select {
  padding: 10px 15px;
  border: 2px solid #e0e0e0;
  border-radius: 0;
  font-size: 14px;
  cursor: pointer;
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 25px;
}

/* ===== SHOP CARD (From main site) ===== */
.shop-card {
  background: linear-gradient(135deg, 
    rgba(248, 247, 242, 0.95) 0%, 
    rgba(255, 255, 255, 0.95) 100%);
  border-radius: 0;
  overflow: hidden;
  transition: all 0.4s ease;
  box-shadow: 0 5px 20px rgba(0,0,0,0.05);
  border: 1px solid rgba(241, 204, 152, 0.2);
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.shop-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--color-sand), var(--color-marsala));
  transition: width 0.4s ease;
}

.shop-card:hover::before {
  width: 100%;
}

.shop-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 15px 40px rgba(100, 36, 46, 0.15);
  border-color: var(--color-sand);
}

.card-image {
  position: relative;
  height: 240px;
  overflow: hidden;
  background: #f5f5f5;
  flex-shrink: 0;
}

.card-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform 0.6s ease;
  background: #fff;
}

.shop-card:hover .card-image img {
  transform: scale(1.08);
}

.card-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(100, 36, 46, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.shop-card:hover .card-overlay {
  opacity: 1;
}

.btn-wishlist-card {
  background: white;
  color: var(--color-marsala);
  border: none;
  width: 45px;
  height: 45px;
  border-radius: 50%;
  font-size: 1.3rem;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.btn-wishlist-card:hover {
  background: var(--color-sand);
  transform: scale(1.15);
}

.btn-wishlist-card.active {
  background: var(--color-marsala);
  color: white;
}

.btn-wishlist-card.active i {
  animation: heartbeat 0.6s ease;
}

@keyframes heartbeat {
  0%, 100% { transform: scale(1); }
  25% { transform: scale(1.3); }
  50% { transform: scale(1.1); }
}

.card-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(100, 36, 46, 0.4);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  opacity: 0;
  transition: opacity 0.3s ease;
  padding: 20px;
}

.card-info {
  padding: 0.8rem 1rem;
  text-align: center;
  background: #fff;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  flex: 1;
  padding-bottom: 20px;
}

.card-info h3 {
  font-size: 0.65rem;
  margin-bottom: 5px;
  font-family: var(--font-heading);
  color: var(--color-marsala);
  line-height: 1.3;
  min-height: 38px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-info .product-code {
  font-size: 0.50rem;
  color: var(--text-grey);
  font-weight: 300;
  margin-top: -0.1rem;
}

.product-price {
  margin: 10px 0;
}

.product-price .price {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--color-marsala);
}

/* ===== STATES ===== */
.loading {
  text-align: center;
  padding: 60px;
}

.loading i {
  font-size: 48px;
  color: var(--color-marsala);
  animation: spin 1s linear infinite;
}

@keyframes spin {
  100% { transform: rotate(360deg); }
}

.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: #999;
}



/* Content Wrapper - Inner 2x2 Grid */
.item-content-wrapper {
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-rows: auto auto;
  column-gap: 0.5rem;
  row-gap: 0.25rem;
  align-items: center;
}

.item-details {
  display: contents;
}

.item-details h4 {
  grid-row: 1;
  grid-column: 1;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-marsala);
  margin: 0;
  line-height: 1.2;
  align-self: end;
}

.item-remove {
  grid-row: 1;
  grid-column: 2;
  background: none;
  border: none;
  color: #ccc;
  cursor: pointer;
  font-size: 1.2rem;
  padding: 0.25rem;
  transition: all 0.3s ease;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  justify-self: end;
}

.item-remove:hover {
  color: #d32f2f;
  background: rgba(211, 47, 47, 0.1);
}




/* ===== RESPONSIVE ===== */
@media (max-width: 1400px) {
  .products-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (max-width: 1100px) {
  .products-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 968px) {
  .shop-container {
    grid-template-columns: 1fr;
  }
  
  .filters-sidebar {
    position: static;
  }
  
  .products-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  /* Compact Header container */
  .header-container {
    flex-wrap: wrap;
    padding: 10px 15px; /* Reduced padding */
    gap: 10px; /* Reduced gap */
  }

  /* Smaller Logo */
  .logo img {
    height: 35px; /* Smaller */
  }

  /* Compact Search Bar */
  .search-bar {
    order: 3;
    flex-basis: 100%;
    margin-top: 5px; /* Reduced top margin */
  }
  
  .search-input {
    padding: 10px 40px 10px 15px; /* Compact input */
    font-size: 14px;
    height: 40px; /* Fixed height */
  }

  .search-btn {
    width: 32px;
    height: 32px;
    font-size: 12px;
    right: 4px; /* Adjust position */
    height: 32px; /* Match button size */
    width: 32px;
    top: 50%;
  }
  
  /* Compact Actions */
  .header-actions {
    gap: 15px; /* Tighter icons */
  }

  .btn-cart {
    font-size: 1.1rem; /* Slightly smaller icons */
    padding: 0.3rem;
  }

  /* Adjust body padding to account for taller header due to wrapping */
  /* header approx: 10px pad + 35px logo + 10px gap + 40px search + 5px margin + 10px pad = ~90px */
  body {
    padding-top: 90px; 
  }

  /* Ensure Hero doesn't touch the header immediately */
  .hero-banner {
    margin-top: 0;
  }

  /* ===== MOBILE FILTERS & HEADER ===== */
  
  /* Products Header - Reorganized */
  .products-header {
    flex-wrap: wrap;
    gap: 15px;
    align-items: center;
    justify-content: space-between;
  }

  .products-count {
    width: 100%;
    order: 2; /* Move count below controls */
    text-align: center;
    font-size: 14px;
    padding-bottom: 0;
    margin-bottom: 0;
  }

  /* Filter Button */
  .btn-mobile-filter {
    display: flex !important;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    background: white;
    border: 1px solid var(--color-marsala);
    color: var(--color-marsala);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 13px;
    flex: 1; /* Take half width */
    cursor: pointer;
    transition: all 0.3s ease;
  }

  .btn-mobile-filter:hover {
    background: var(--color-marsala);
    color: white;
  }
  
  /* Sort Select */
  .sort-select {
    flex: 1; /* Take half width */
    padding: 10px;
    height: 42px; /* Match button height */
  }

  /* Off-Canvas Filters Sidebar */
  .filters-sidebar {
    position: fixed;
    top: 0;
    left: -100%; /* Hidden by default */
    width: 85%;
    max-width: 320px;
    height: 100vh;
    background: white;
    z-index: 2000;
    padding: 20px;
    box-shadow: 2px 0 20px rgba(0,0,0,0.2);
    transition: left 0.3s ease-in-out;
    overflow-y: auto;
  }

  .filters-sidebar.active {
    left: 0; /* Slide in */
  }

  /* Mobile Filter Header */
  .filter-header-mobile {
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
  }

  .filter-header-mobile h3 {
    margin: 0;
    color: var(--color-marsala);
    font-size: 1.2rem;
  }

  .btn-close-filter {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #666;
    cursor: pointer;
    padding: 5px;
  }
  
  /* Overlay Backdrop */
  .filter-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 1999; /* Below sidebar */
    display: none;
    animation: fadeIn 0.3s ease;
  }

  .filter-backdrop.active {
    display: block;
  }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@media (max-width: 480px) {
  .products-grid {
    grid-template-columns: 1fr;
  }
  
  .hero-title {
    font-size: 36px;
  }
  

}



/* ===== ADVANCED FILTERS (Accordion) ===== */
.advanced-filters-section {
  border-top: 1px solid #eee;
  margin-top: 20px;
  padding-top: 20px;
}

.filter-accordion {
  border-bottom: 1px solid #eee;
  margin-bottom: 10px;
}

.filter-accordion:last-child {
  border-bottom: none;
}

.filter-accordion-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  cursor: pointer;
  transition: all 0.3s ease;
}

.filter-accordion-header h4 {
  font-size: 15px;
  font-weight: 600;
  color: var(--color-marsala);
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.filter-accordion-header i.chevron {
  font-size: 12px;
  color: #999;
  transition: transform 0.3s ease;
}

.filter-accordion-header:hover h4 {
  color: var(--color-cabernet);
}

.filter-accordion.collapsed .filter-accordion-header i.chevron {
  transform: rotate(-90deg);
}

.filter-accordion-content {
  padding-bottom: 15px;
  padding-left: 5px;
  display: block;
  animation: slideDown 0.3s ease-out;
}

.filter-accordion.collapsed .filter-accordion-content {
  display: none;
}

@keyframes slideDown {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Adjust standard filter checkboxes to match */
.advanced-filter-checkbox {
  accent-color: var(--color-marsala);
}



/* Responsive Clear Filters Button */
.btn-clear-filters {
  width: auto;
  display: block;
  margin: 20px auto 0;
  transition: all 0.3s;
}

@media (max-width: 768px) {
  .btn-clear-filters {
    width: 100%;
    padding: 12px;
    background: #f8f8f8;
    border-color: #ddd;
    color: #333;
  }
  .btn-clear-filters:hover {
    background: #eee;
    color: black;
  }
}
