/* Components Stylesheet for Anmore */

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 16px 36px;
  font-size: 13px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  transition: var(--transition-smooth);
  border-radius: 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.btn-primary {
  background-color: var(--text-primary);
  color: white;
  border: 1px solid var(--text-primary);
}

.btn-primary:hover {
  background-color: transparent;
  color: var(--text-primary);
}

.btn-secondary {
  background-color: transparent;
  color: var(--text-primary);
  border: 1px solid var(--text-primary);
}

.btn-secondary:hover {
  background-color: var(--text-primary);
  color: white;
}

.btn-accent {
  background-color: var(--accent-clay);
  color: white;
  border: 1px solid var(--accent-clay);
}

.btn-accent:hover {
  background-color: var(--accent-clay-hover);
  border-color: var(--accent-clay-hover);
}

.btn-text {
  padding: 8px 0;
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  border-bottom: 1px solid var(--text-primary);
  align-self: flex-start;
}

.btn-text:hover {
  color: var(--accent-clay);
  border-bottom-color: var(--accent-clay);
}

/* Product Cards */
.product-card {
  display: flex;
  flex-direction: column;
  position: relative;
  background-color: transparent;
  transition: var(--transition-smooth);
  overflow: hidden;
}

.product-image-container {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1.25;
  overflow: hidden;
  background-color: var(--bg-secondary);
}

.product-image-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: var(--transition-smooth);
}

.product-image-alt {
  position: absolute;
  top: 0;
  left: 0;
  opacity: 0;
  z-index: 2;
}

.product-card:hover .product-image-primary {
  opacity: 0;
  transform: scale(1.05);
}

.product-card:hover .product-image-alt {
  opacity: 1;
  transform: scale(1.05);
}

.product-badge {
  position: absolute;
  top: 16px;
  left: 16px;
  background-color: white;
  color: var(--text-primary);
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 6px 12px;
  z-index: 3;
  box-shadow: 0 4px 10px rgba(0,0,0,0.03);
}

.product-card-info {
  padding: 20px 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.product-card-category {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.product-card-title {
  font-family: var(--font-serif);
  font-size: 18px;
  font-weight: 400;
}

.product-card-rating {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  color: #D4AF37; /* Gold */
}

.rating-count {
  color: var(--text-muted);
  margin-left: 2px;
}

.product-card-price {
  font-size: 15px;
  font-weight: 500;
  color: var(--text-primary);
}

/* Quick Add Button overlay */
.quick-add-btn {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  background-color: rgba(28,27,26,0.9);
  color: white;
  padding: 14px;
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  text-align: center;
  transform: translateY(100%);
  transition: var(--transition-smooth);
  z-index: 4;
  backdrop-filter: blur(5px);
}

.product-image-container:hover .quick-add-btn {
  transform: translateY(0);
}

/* Trending Products Row (Homepage) */
.trending-products-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
}

.trending-product-card {
  display: flex;
  flex-direction: column;
  text-align: center;
}

.trending-product-card .product-image-container {
  aspect-ratio: 3 / 4;
}

.trending-product-card h4 {
  font-weight: 400;
}

.trending-product-card h4 a,
.trending-product-card h4 a:hover {
  color: var(--text-primary);
}

.view-product-btn {
  display: block;
  width: 100%;
  margin-top: 16px;
  padding: 13px 20px;
  background-color: var(--text-primary);
  color: white;
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  text-align: center;
  border: 1px solid var(--text-primary);
  transition: var(--transition-smooth);
}

.view-product-btn:hover {
  background-color: transparent;
  color: var(--text-primary);
}

/* Cart Drawer */
.cart-drawer-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(28, 27, 26, 0.4);
  backdrop-filter: blur(4px);
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition-smooth);
}

.cart-drawer-overlay.open {
  opacity: 1;
  visibility: visible;
}

.cart-drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: 460px;
  max-width: 100%;
  height: 100%;
  background-color: var(--bg-primary);
  z-index: 1001;
  box-shadow: -10px 0 40px rgba(0,0,0,0.1);
  transform: translateX(100%);
  transition: var(--transition-smooth);
  display: flex;
  flex-direction: column;
}

.cart-drawer-overlay.open .cart-drawer {
  transform: translateX(0);
}

.cart-header {
  padding: 24px 32px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.cart-header h2 {
  font-size: 24px;
  font-family: var(--font-serif);
}

.close-cart-btn {
  font-size: 24px;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  transition: var(--transition-fast);
}

.close-cart-btn:hover {
  background-color: var(--bg-secondary);
}

.cart-items-container {
  flex: 1;
  overflow-y: auto;
  padding: 24px 32px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.cart-empty-message {
  text-align: center;
  margin: auto 0;
  color: var(--text-secondary);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.cart-item {
  display: flex;
  gap: 16px;
  border-bottom: 1px solid var(--border-color-light);
  padding-bottom: 24px;
}

.cart-item:last-child {
  border-bottom: none;
}

.cart-item-image {
  width: 90px;
  height: 110px;
  background-color: var(--bg-secondary);
  overflow: hidden;
}

.cart-item-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cart-item-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.cart-item-title {
  font-family: var(--font-serif);
  font-size: 16px;
  margin-bottom: 4px;
}

.cart-item-category {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-bottom: 8px;
}

.cart-item-price {
  font-size: 14px;
  font-weight: 500;
}

.cart-item-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 8px;
}

.quantity-selector {
  display: flex;
  align-items: center;
  border: 1px solid var(--border-color);
  background-color: white;
}

.quantity-btn {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
}

.quantity-value {
  width: 32px;
  text-align: center;
  font-size: 14px;
}

.remove-item-btn {
  font-size: 12px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 1px solid transparent;
}

.remove-item-btn:hover {
  color: var(--text-primary);
  border-bottom-color: var(--text-primary);
}

.cart-footer {
  padding: 32px;
  border-top: 1px solid var(--border-color);
  background-color: var(--bg-secondary);
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.cart-summary-row {
  display: flex;
  justify-content: space-between;
  font-size: 15px;
}

.cart-total-label {
  font-weight: 500;
}

.cart-total-value {
  font-size: 18px;
  font-weight: 600;
}

/* Toast Notifications */
.toast-container {
  position: fixed;
  bottom: 40px;
  left: 40px;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.toast {
  background-color: var(--text-primary);
  color: white;
  padding: 16px 24px;
  font-size: 14px;
  font-weight: 400;
  letter-spacing: 0.02em;
  box-shadow: 0 10px 30px rgba(0,0,0,0.15);
  display: flex;
  align-items: center;
  gap: 16px;
  transform: translateY(20px);
  opacity: 0;
  animation: toast-in 0.4s cubic-bezier(0.25, 1, 0.5, 1) forwards;
}

@keyframes toast-in {
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.toast-close {
  color: var(--text-muted);
  font-size: 16px;
}

.toast-close:hover {
  color: white;
}

/* Form Inputs */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-label {
  font-size: 12px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-secondary);
}

.form-input {
  width: 100%;
  padding: 14px 18px;
  font-size: 14px;
  border: 1px solid var(--border-color);
  background-color: white;
  font-family: inherit;
  color: inherit;
  transition: var(--transition-fast);
}

.form-input:focus {
  outline: none;
  border-color: var(--text-primary);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

@media (max-width: 576px) {
  .form-row {
    grid-template-columns: 1fr;
  }
}

/* Quiz Options (Routine Finder) */
.quiz-opt-btn {
  width: 100%;
  padding: 18px 24px;
  font-size: 13px;
  font-weight: 500;
  text-align: left;
  border: 1px solid var(--border-color);
  background-color: white;
  color: var(--text-primary);
  transition: var(--transition-smooth);
}

.quiz-opt-btn:hover {
  border-color: var(--text-primary);
}

.quiz-opt-btn.active {
  background-color: var(--text-primary);
  color: white;
  border-color: var(--text-primary);
}

/* CHP Routine Step Buttons */
.chp-step-btn {
  border: none;
  cursor: pointer;
  outline: none;
}

.chp-step-btn:hover {
  background-color: var(--bg-secondary);
}

/* Pairing Cards & Journal hover effects */
.pairing-card {
  transition: var(--transition-smooth);
}

.pairing-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(0,0,0,0.04);
  border-color: var(--border-color) !important;
}

article img {
  transition: var(--transition-smooth);
}

article:hover img {
  transform: scale(1.03);
}

article a:hover {
  color: var(--accent-clay);
}

/* FAQ Accordion Tabs */
.faq-tab-btn {
  border: none;
  background: none;
  cursor: pointer;
  outline: none;
  color: var(--text-muted);
  transition: var(--transition-fast);
}

.faq-tab-btn:hover,
.faq-tab-btn.active {
  color: var(--text-primary);
}

.faq-accordion-trigger {
  border: none;
  background: none;
  cursor: pointer;
  outline: none;
  color: var(--text-primary);
  transition: var(--transition-fast);
}

.faq-accordion-trigger:hover {
  color: var(--accent-clay);
}
