/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  padding: 0.75rem 1.75rem;
  font-family: var(--font-body);
  font-size: var(--font-size-sm);
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border-radius: var(--border-radius);
  transition: all var(--transition);
  cursor: pointer;
  white-space: nowrap;
}

.btn-primary {
  background: var(--color-navy);
  color: var(--color-white);
  border: 2px solid var(--color-navy);
}
.btn-primary:hover {
  background: var(--color-navy-light);
  border-color: var(--color-gold);
  color: var(--color-gold-light);
}

.btn-gold {
  background: var(--color-gold);
  color: var(--color-navy);
  border: 2px solid var(--color-gold);
}
.btn-gold:hover {
  background: var(--color-gold-light);
  border-color: var(--color-gold-light);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(184,134,11,0.3);
}

.btn-outline {
  background: transparent;
  color: var(--color-gold-light);
  border: 2px solid var(--color-gold-light);
}
.btn-outline:hover {
  background: var(--color-gold-light);
  color: var(--color-navy);
}

.btn-outline-dark {
  background: transparent;
  color: var(--color-navy);
  border: 2px solid var(--color-navy);
}
.btn-outline-dark:hover {
  background: var(--color-navy);
  color: var(--color-white);
}

.btn-sm { padding: 0.5rem 1.25rem; font-size: var(--font-size-xs); }
.btn-full { width: 100%; }

/* Badges */
.badge {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  font-size: var(--font-size-xs);
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  border-radius: 2px;
}
.badge-sale { background: var(--color-sale); color: var(--color-white); }
.badge-new { background: var(--color-teal); color: var(--color-white); }
.badge-gold { background: var(--color-gold); color: var(--color-white); }

/* Product Card */
.product-card {
  background: var(--color-white);
  border-radius: var(--border-radius-lg);
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
  border: 1px solid rgba(0,0,0,0.04);
  transition: transform var(--transition), box-shadow var(--transition);
  cursor: pointer;
  position: relative;
  text-align: center;
  display: flex;
  flex-direction: column;
}
.product-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
  overflow: visible;
}
.product-card { overflow: hidden; }

.product-card-image-wrap {
  position: relative;
  overflow: hidden;
  height: 220px;       /* Fixed height — text always starts at the same position */
  flex-shrink: 0;
  background: var(--color-white);
  padding: var(--space-sm);
}

.product-card-image-wrap img {
  width: 100%;
  height: 100%;
  object-fit: contain; /* Don't crop if they aren't square */
  transition: transform 0.5s ease;
}
.product-card:hover .product-card-image-wrap img {
  transform: scale(1.05);
}

.product-card-badge {
  position: absolute;
  top: var(--space-sm);
  left: var(--space-sm);
  z-index: 2;
}

.product-card-quick-view {
  display: none; /* Keep it clean like reference */
}

.product-card-info {
  padding: var(--space-md) var(--space-md) 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
  position: relative;
}

.product-card-name {
  font-family: var(--font-heading);
  font-size: var(--font-size-base);
  font-weight: 600;
  color: var(--color-navy);
  margin-bottom: var(--space-xs);
  line-height: 1.35;
}

.product-card-price-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  margin-bottom: var(--space-sm);
  color: var(--color-gold);
  font-weight: 600;
}

.product-card-add {
  display: block;
  width: calc(100% + 2 * var(--space-md));
  padding: 0.7rem;
  font-size: var(--font-size-xs);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: var(--color-gold);
  color: var(--color-white);
  border: none;
  cursor: pointer;
  transition: background var(--transition);
  border-radius: 0 0 var(--border-radius-lg) var(--border-radius-lg);
  margin: var(--space-md) calc(-1 * var(--space-md)) 0;
  margin-top: auto;
  opacity: 0;
  transform: translateY(100%);
  transition: opacity var(--transition), transform var(--transition), background var(--transition);
}
.product-card:hover .product-card-add {
  opacity: 1;
  transform: translateY(0);
}
.product-card-add:hover { background: var(--color-gold-light); }

/* Star Rating */
.star-rating {
  display: flex;
  align-items: center;
  gap: 2px;
  font-size: var(--font-size-xs);
}
.star-rating .star { color: #ddd; font-size: 12px; }
.star-rating .star.filled { color: var(--color-star); }
.star-rating .review-count {
  color: var(--color-text-light);
  margin-left: 4px;
  font-size: var(--font-size-xs);
}

/* Quantity Selector */
.qty-selector {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--color-border);
  border-radius: var(--border-radius);
  overflow: hidden;
}
.qty-btn {
  width: 36px;
  height: 36px;
  background: var(--color-cream);
  border: none;
  font-size: 1.1rem;
  cursor: pointer;
  transition: background var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
}
.qty-btn:hover { background: var(--color-cream-dark); }
.qty-input {
  width: 48px;
  height: 36px;
  border: none;
  border-left: 1px solid var(--color-border);
  border-right: 1px solid var(--color-border);
  text-align: center;
  font-family: var(--font-body);
  font-weight: 700;
  background: var(--color-white);
}
.qty-input:focus { outline: none; }

/* Toast Notification */
.toast-container {
  position: fixed;
  bottom: var(--space-xl);
  right: var(--space-xl);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}
.toast {
  background: var(--color-navy);
  color: var(--color-white);
  padding: var(--space-md) var(--space-lg);
  border-radius: var(--border-radius-lg);
  border-left: 4px solid var(--color-gold);
  box-shadow: var(--shadow-modal);
  display: flex;
  align-items: center;
  gap: var(--space-md);
  animation: slideInRight 0.3s ease, fadeOut 0.3s ease 2.7s forwards;
  max-width: 320px;
  min-width: 280px;
}
.toast img {
  width: 48px;
  height: 48px;
  object-fit: cover;
  border-radius: var(--border-radius);
  flex-shrink: 0;
}
.toast-text strong { display: block; font-size: var(--font-size-sm); margin-bottom: 2px; }
.toast-text span { font-size: var(--font-size-xs); color: var(--color-gold-pale); }

@keyframes slideInRight {
  from { transform: translateX(120%); opacity: 0; }
  to   { transform: translateX(0); opacity: 1; }
}
@keyframes fadeOut {
  to { opacity: 0; transform: translateX(120%); }
}

/* Modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-lg);
  animation: fadeIn 0.2s ease;
}
.modal-box {
  background: var(--color-white);
  border-radius: var(--border-radius-lg);
  max-width: 800px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  animation: slideUp 0.3s ease;
}
.modal-close {
  position: absolute;
  top: var(--space-md);
  right: var(--space-md);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--color-cream);
  border: none;
  font-size: 1.2rem;
  cursor: pointer;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
}
.modal-close:hover { background: var(--color-cream-dark); }

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp { from { transform: translateY(30px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

/* Accordion */
.accordion-item {
  border-bottom: 1px solid var(--color-border);
}
.accordion-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-md) 0;
  font-family: var(--font-heading);
  font-size: var(--font-size-md);
  font-weight: 600;
  color: var(--color-navy);
  background: none;
  border: none;
  cursor: pointer;
  text-align: left;
}
.accordion-trigger .chevron {
  transition: transform var(--transition);
  flex-shrink: 0;
}
.accordion-trigger.open .chevron {
  transform: rotate(180deg);
}
.accordion-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease, padding 0.3s ease;
}
.accordion-content.open {
  max-height: 500px;
  padding-bottom: var(--space-md);
}
.accordion-content p, .accordion-content li {
  font-size: var(--font-size-sm);
  color: var(--color-text-light);
  line-height: 1.7;
}
.accordion-content table { width: 100%; border-collapse: collapse; }
.accordion-content td { padding: var(--space-sm); border-bottom: 1px solid var(--color-border); font-size: var(--font-size-sm); }
.accordion-content td:first-child { font-weight: 600; color: var(--color-navy); width: 45%; }

/* Breadcrumb */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-size: var(--font-size-sm);
  color: var(--color-text-light);
  padding: var(--space-md) 0;
}
.breadcrumb a { color: var(--color-text-light); }
.breadcrumb a:hover { color: var(--color-gold); }
.breadcrumb .sep { color: var(--color-border); }
.breadcrumb .current { color: var(--color-navy); }

/* Filter Sidebar */
.sidebar {
  position: sticky;
  top: calc(var(--header-height) + var(--space-lg));
}
.filter-group {
  border-bottom: 1px solid var(--color-border);
  padding: var(--space-md) 0;
}
.filter-group-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-heading);
  font-size: var(--font-size-base);
  font-weight: 600;
  color: var(--color-navy);
  cursor: pointer;
  padding-bottom: var(--space-sm);
  margin-bottom: var(--space-sm);
}
.filter-group-title .chevron { transition: transform var(--transition); }
.filter-group-title.open .chevron { transform: rotate(180deg); }
.filter-body { display: flex; flex-direction: column; gap: var(--space-sm); }
.filter-body.hidden { display: none; }

.color-swatches { display: flex; flex-wrap: wrap; gap: var(--space-sm); }
.color-swatch {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  cursor: pointer;
  border: 2px solid transparent;
  transition: transform var(--transition), border-color var(--transition);
}
.color-swatch:hover { transform: scale(1.1); }
.color-swatch.active { border-color: var(--color-navy); box-shadow: 0 0 0 2px var(--color-white) inset; }

.filter-checkbox {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-size: var(--font-size-sm);
  cursor: pointer;
}
.filter-checkbox input { accent-color: var(--color-navy); width: 15px; height: 15px; }
.filter-checkbox label { cursor: pointer; }

.price-inputs {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-size: var(--font-size-sm);
}
.price-input {
  width: 80px;
  padding: var(--space-xs) var(--space-sm);
  border: 1px solid var(--color-border);
  border-radius: var(--border-radius);
  text-align: center;
}
.price-input:focus { outline: 2px solid var(--color-gold); border-color: transparent; }

.sidebar-header-mobile {
  display: none;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-lg);
  font-family: var(--font-heading);
  font-size: var(--font-size-lg);
  font-weight: 700;
  color: var(--color-navy);
}
.sidebar-close-btn {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--color-navy);
}

/* Page Transitions */
#app {
  transition: opacity 0.2s ease;
}
#app.page-exit { opacity: 0; }
.page-enter-animation {
  animation: pageEnter 0.35s ease forwards;
}
@keyframes pageEnter {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Empty state */
.empty-state {
  text-align: center;
  padding: var(--space-3xl) var(--space-lg);
}
.empty-state-icon {
  font-size: 4rem;
  margin-bottom: var(--space-lg);
  opacity: 0.3;
}
.empty-state h2 { margin-bottom: var(--space-md); color: var(--color-navy); }
.empty-state p { color: var(--color-text-light); margin-bottom: var(--space-xl); }

/* Trust badges */
.trust-badges {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-lg);
  padding: var(--space-lg) 0;
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
  margin: var(--space-lg) 0;
}
.trust-badge {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-size: var(--font-size-sm);
  color: var(--color-text-light);
}
.trust-badge-icon {
  font-size: 1.5rem;
}

/* Scrollbar */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--color-cream); }
::-webkit-scrollbar-thumb { background: var(--color-gold); border-radius: 3px; }
