/* ==========================================================================
   AURAKRAFT - COMPONENTS CSS
   ========================================================================== */

/* Top Announcement Bar */
.announcement-bar {
  background-color: var(--brand-accent);
  color: var(--text-inverse);
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-medium);
  letter-spacing: 0.03em;
  padding: 8px 16px;
  text-align: center;
  position: relative;
  z-index: calc(var(--z-header) + 1);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  transition: all var(--transition-fast);
}

.announcement-bar.hidden {
  display: none !important;
}

.announcement-highlight {
  background-color: var(--brand-highlight);
  color: #ffffff;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: var(--font-weight-bold);
  text-transform: uppercase;
}

/* Site Header */
.site-header {
  position: sticky;
  top: 0;
  width: 100%;
  background-color: var(--bg-glass);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-subtle);
  z-index: var(--z-header);
  transition: all var(--transition-normal);
}

.site-header.scrolled {
  box-shadow: var(--shadow-sm);
  background-color: rgba(255, 255, 255, 0.95);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-height);
  gap: var(--space-4);
}

.brand-logo-wrap {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  text-decoration: none;
}

.brand-logo-mark {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, var(--brand-accent) 0%, var(--brand-highlight) 100%);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: var(--font-weight-extrabold);
  font-size: var(--font-size-lg);
  letter-spacing: -0.05em;
  box-shadow: var(--shadow-xs);
}

.brand-logo-text {
  font-size: var(--font-size-xl);
  font-weight: var(--font-weight-extrabold);
  letter-spacing: -0.04em;
  color: var(--text-primary);
}

.brand-logo-text span {
  color: var(--brand-highlight);
}

/* Header Navigation Links */
.header-nav {
  display: flex;
  align-items: center;
  gap: var(--space-6);
}

.nav-link {
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-medium);
  color: var(--text-secondary);
  transition: color var(--transition-fast);
  position: relative;
  padding: 6px 0;
}

.nav-link:hover, .nav-link.active {
  color: var(--text-primary);
}

.nav-link.active::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background-color: var(--brand-accent);
  border-radius: var(--radius-full);
}

/* Header Search */
.header-search {
  position: relative;
  flex: 0 1 360px;
}

.search-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

.search-input {
  width: 100%;
  height: 40px;
  padding: 0 var(--space-4) 0 38px;
  border-radius: var(--radius-full);
  background-color: var(--bg-tertiary);
  border: 1px solid transparent;
  font-size: var(--font-size-sm);
  color: var(--text-primary);
  transition: all var(--transition-fast);
}

.search-input:focus {
  background-color: #ffffff;
  border-color: var(--border-medium);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.search-icon {
  position: absolute;
  left: 12px;
  width: 18px;
  height: 18px;
  color: var(--text-muted);
  pointer-events: none;
}

.search-results-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  background-color: var(--bg-primary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-xl);
  max-height: 400px;
  overflow-y: auto;
  z-index: var(--z-modal);
  display: none;
}

.search-results-dropdown.active {
  display: block;
}

/* Header Action Icons */
.header-actions {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.header-action-btn {
  position: relative;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-primary);
  transition: all var(--transition-fast);
}

.header-action-btn:hover {
  background-color: var(--bg-tertiary);
}

.badge-count {
  position: absolute;
  top: 4px;
  right: 4px;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  border-radius: var(--radius-full);
  background-color: var(--brand-accent);
  color: var(--text-inverse);
  font-size: 11px;
  font-weight: var(--font-weight-bold);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #ffffff;
}

.hamburger-btn {
  display: none;
  background: none;
  border: none;
  padding: 8px;
  color: var(--text-primary);
}

@media (max-width: 900px) {
  .header-nav { display: none; }
  .header-search { display: none; }
  .hamburger-btn { display: flex; }
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-semibold);
  padding: 10px 20px;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  transition: all var(--transition-fast);
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
}

.btn-primary {
  background-color: var(--brand-accent);
  color: var(--text-inverse);
  border-color: var(--brand-accent);
}

.btn-primary:hover {
  background-color: var(--brand-accent-hover);
  color: #ffffff;
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

.btn-highlight {
  background-color: var(--brand-highlight);
  color: #ffffff;
  border-color: var(--brand-highlight);
}

.btn-highlight:hover {
  background-color: var(--brand-highlight-hover);
  color: #ffffff;
}

.btn-secondary {
  background-color: var(--bg-tertiary);
  color: var(--text-primary);
  border-color: transparent;
}

.btn-secondary:hover {
  background-color: var(--border-subtle);
}

.btn-outline {
  background-color: transparent;
  color: var(--text-primary);
  border-color: var(--border-medium);
}

.btn-outline:hover {
  background-color: var(--bg-tertiary);
  border-color: var(--text-primary);
}

.btn-danger {
  background-color: var(--badge-discount-bg);
  color: var(--badge-discount-text);
  border-color: #fecaca;
}

.btn-danger:hover {
  background-color: #fee2e2;
}

.btn-sm {
  padding: 6px 12px;
  font-size: var(--font-size-xs);
  border-radius: var(--radius-sm);
}

.btn-lg {
  padding: 14px 28px;
  font-size: var(--font-size-base);
  border-radius: var(--radius-lg);
}

.btn-block {
  width: 100%;
}

/* Badges & Tags */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-semibold);
  letter-spacing: 0.02em;
}

.badge-discount {
  background-color: var(--badge-discount-bg);
  color: var(--badge-discount-text);
}

.badge-bestseller {
  background-color: var(--badge-bestseller-bg);
  color: var(--badge-bestseller-text);
}

.badge-new {
  background-color: var(--badge-new-bg);
  color: var(--badge-new-text);
}

.badge-model {
  background-color: var(--bg-tertiary);
  color: var(--text-secondary);
  border: 1px solid var(--border-subtle);
}

/* Product Card */
.product-card {
  background-color: var(--bg-card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-subtle);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: all var(--transition-normal);
  position: relative;
}

.product-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-medium);
  box-shadow: var(--shadow-card-hover);
}

.product-card-media {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  background-color: var(--bg-secondary);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.product-card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-smooth);
}

.product-card:hover .product-card-img {
  transform: scale(1.05);
}

.product-card-badges {
  position: absolute;
  top: 10px;
  left: 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  z-index: 2;
}

.btn-wishlist-toggle {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  background-color: rgba(255, 255, 255, 0.9);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-xs);
  transition: all var(--transition-fast);
  z-index: 2;
  border: 1px solid rgba(0, 0, 0, 0.05);
}

.btn-wishlist-toggle:hover, .btn-wishlist-toggle.active {
  background-color: #ffffff;
  color: var(--color-danger);
  transform: scale(1.1);
}

.product-card-body {
  padding: var(--space-4);
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
}

.product-category-label {
  font-size: var(--font-size-xs);
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: var(--font-weight-medium);
  margin-bottom: 4px;
}

.product-title {
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-semibold);
  color: var(--text-primary);
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: var(--space-2);
  min-height: 38px;
}

.product-model-compat {
  display: inline-block;
  font-size: 11px;
  color: var(--text-muted);
  background-color: var(--bg-tertiary);
  padding: 2px 8px;
  border-radius: var(--radius-xs);
  margin-bottom: var(--space-3);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.product-rating {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: var(--font-size-xs);
  margin-bottom: var(--space-3);
}

.stars-gold {
  color: #f59e0b;
  letter-spacing: 1px;
}

.rating-count {
  color: var(--text-muted);
}

.product-price-row {
  display: flex;
  align-items: baseline;
  gap: var(--space-2);
  margin-top: auto;
  margin-bottom: var(--space-3);
}

.price-current {
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-bold);
  color: var(--text-primary);
}

.price-compare {
  font-size: var(--font-size-xs);
  color: var(--text-muted);
  text-decoration: line-through;
}

.price-discount-percent {
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-bold);
  color: var(--color-danger);
}

.btn-quick-add {
  width: 100%;
  padding: 8px 12px;
  border-radius: var(--radius-md);
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-semibold);
  background-color: var(--bg-tertiary);
  color: var(--text-primary);
  border: 1px solid var(--border-subtle);
  transition: all var(--transition-fast);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.btn-quick-add:hover {
  background-color: var(--brand-accent);
  color: #ffffff;
  border-color: var(--brand-accent);
}

/* Forms & Inputs */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: var(--space-4);
}

.form-label {
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-semibold);
  color: var(--text-primary);
}

.form-input, .form-select, .form-textarea {
  width: 100%;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-medium);
  background-color: #ffffff;
  color: var(--text-primary);
  font-size: var(--font-size-sm);
  transition: all var(--transition-fast);
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: var(--brand-accent);
  box-shadow: 0 0 0 3px rgba(15, 23, 42, 0.08);
}

.form-error {
  font-size: var(--font-size-xs);
  color: var(--color-danger);
  margin-top: 2px;
}

.form-help {
  font-size: var(--font-size-xs);
  color: var(--text-muted);
}

/* Quantity Control */
.qty-control {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-md);
  overflow: hidden;
  background-color: #ffffff;
}

.qty-btn {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--font-size-base);
  color: var(--text-primary);
  background-color: var(--bg-tertiary);
  transition: background-color var(--transition-fast);
}

.qty-btn:hover {
  background-color: var(--border-subtle);
}

.qty-input {
  width: 44px;
  text-align: center;
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-semibold);
  border: none;
}

/* Modals & Backdrop */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background-color: var(--bg-overlay);
  backdrop-filter: blur(4px);
  z-index: var(--z-modal);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-4);
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-normal);
}

.modal-backdrop.active {
  opacity: 1;
  visibility: visible;
}

.modal {
  background-color: #ffffff;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xl);
  width: 100%;
  max-width: 560px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform: translateY(20px);
  transition: transform var(--transition-smooth);
}

.modal-backdrop.active .modal {
  transform: translateY(0);
}

.modal-header {
  padding: var(--space-4) var(--space-6);
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-title {
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-bold);
}

.modal-close-btn {
  color: var(--text-muted);
  width: 32px;
  height: 32px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-close-btn:hover {
  background-color: var(--bg-tertiary);
  color: var(--text-primary);
}

.modal-body {
  padding: var(--space-6);
  overflow-y: auto;
}

.modal-footer {
  padding: var(--space-4) var(--space-6);
  border-top: 1px solid var(--border-subtle);
  display: flex;
  justify-content: flex-end;
  gap: var(--space-3);
  background-color: var(--bg-secondary);
}

/* Off-canvas Drawers (Cart Drawer & Mobile Nav) */
.drawer-backdrop {
  position: fixed;
  inset: 0;
  background-color: var(--bg-overlay);
  backdrop-filter: blur(4px);
  z-index: var(--z-drawer);
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-normal);
}

.drawer-backdrop.active {
  opacity: 1;
  visibility: visible;
}

.drawer {
  position: fixed;
  top: 0;
  bottom: 0;
  width: 100%;
  max-width: 420px;
  background-color: #ffffff;
  box-shadow: var(--shadow-xl);
  z-index: calc(var(--z-drawer) + 1);
  display: flex;
  flex-direction: column;
  transition: transform var(--transition-smooth);
}

.drawer-right {
  right: 0;
  transform: translateX(100%);
}

.drawer-left {
  left: 0;
  transform: translateX(-100%);
}

.drawer-backdrop.active .drawer-right {
  transform: translateX(0);
}

.drawer-backdrop.active .drawer-left {
  transform: translateX(0);
}

.drawer-header {
  padding: var(--space-4) var(--space-6);
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.drawer-body {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: var(--space-6);
}

.drawer-footer {
  padding: var(--space-6);
  border-top: 1px solid var(--border-subtle);
  background-color: var(--bg-secondary);
}

/* Toast Notifications */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: var(--z-toast);
  pointer-events: none;
}

.toast {
  pointer-events: auto;
  min-width: 300px;
  max-width: 420px;
  padding: 12px 18px;
  background-color: var(--brand-accent);
  color: #ffffff;
  border-radius: var(--radius-md);
  font-size: var(--font-size-sm);
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 12px;
  animation: slide-up 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  border-left: 4px solid var(--brand-highlight);
}

.toast-success { border-left-color: var(--color-success); }
.toast-error { border-left-color: var(--color-danger); }
.toast-info { border-left-color: var(--color-info); }

@keyframes slide-up {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Site Footer */
.site-footer {
  background-color: var(--brand-accent);
  color: #94a3b8;
  padding-top: var(--space-16);
  padding-bottom: var(--space-8);
  margin-top: var(--space-16);
  border-top: 1px solid #1e293b;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.5fr;
  gap: var(--space-8);
  margin-bottom: var(--space-12);
}

@media (max-width: 900px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-8);
  }
}

@media (max-width: 600px) {
  .footer-grid {
    grid-template-columns: 1fr;
  }
}

.footer-brand h3 {
  color: #ffffff;
  font-size: var(--font-size-xl);
  margin-bottom: var(--space-3);
}

.footer-col-title {
  color: #ffffff;
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-bold);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: var(--space-4);
}

.footer-links-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.footer-link {
  color: #94a3b8;
  font-size: var(--font-size-sm);
  transition: color var(--transition-fast);
}

.footer-link:hover {
  color: #ffffff;
}

.footer-newsletter-wrap {
  display: flex;
  gap: 6px;
  margin-top: var(--space-3);
}

.footer-input {
  background-color: #1e293b;
  border: 1px solid #334155;
  color: #ffffff;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  font-size: var(--font-size-sm);
  width: 100%;
}

.footer-input:focus {
  border-color: var(--brand-highlight);
}

.footer-bottom {
  border-top: 1px solid #1e293b;
  padding-top: var(--space-6);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-4);
  font-size: var(--font-size-xs);
  color: #64748b;
}

.payment-badges-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.pay-badge {
  background-color: #1e293b;
  padding: 4px 8px;
  border-radius: var(--radius-xs);
  font-size: 11px;
  font-weight: var(--font-weight-semibold);
  color: #cbd5e1;
  border: 1px solid #334155;
}
