:root {
  --primary: #e04f38;
  --primary-hover: #c93b25;
  --primary-light: #fff2ef;
  --text-main: #1f2937;
  --text-muted: #6b7280;
  --bg-page: #ffffff;
  --bg-card: #ffffff;
  --border: #e5e7eb;
  --border-focus: #e04f38;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 14px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.1);
  --font: 'Plus Jakarta Sans', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font);
  background-color: var(--bg-page);
  color: var(--text-main);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* Announcement Banner */
.announcement-banner {
  width: 100%;
  position: relative;
  z-index: 50;
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.4;
  overflow: hidden;
  transition: max-height 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.25s ease;
}

.announcement-container {
  max-width: 1360px;
  margin: 0 auto;
  padding: 0.6rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  min-height: 2.25rem;
}

.announcement-content {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  text-align: center;
  padding: 0 1.75rem;
}

.announcement-text {
  letter-spacing: -0.01em;
}

.announcement-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  text-decoration: underline;
  text-underline-offset: 3px;
  font-weight: 700;
  cursor: pointer;
  color: inherit;
  transition: opacity 0.15s ease;
}

.announcement-cta:hover {
  opacity: 0.8;
}

.announcement-dismiss-btn {
  position: absolute;
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: inherit;
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
  opacity: 0.7;
  padding: 0.25rem 0.5rem;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.15s ease, background-color 0.15s ease;
}

.announcement-dismiss-btn:hover {
  opacity: 1;
  background: rgba(0, 0, 0, 0.08);
}

@media (max-width: 640px) {
  .announcement-container {
    padding: 0.5rem 0.75rem;
  }

  .announcement-content {
    font-size: 0.8125rem;
    padding: 0 1.5rem;
  }

  .announcement-dismiss-btn {
    right: 0.35rem;
    font-size: 1.1rem;
  }
}

/* Navbar */
.navbar {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.nav-container {
  max-width: 1360px;
  margin: 0 auto;
  padding: 0.85rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  text-decoration: none;
  color: inherit;
}

.brand-logo {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: var(--shadow-sm);
  background: #fff;
}

.brand-name {
  display: block;
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #111827;
}

.brand-tag {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.search-trigger-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #ffffff;
  color: #111827;
  border: 1px solid #e5e7eb;
  padding: 0;
  width: 44px;
  height: 44px;
  border-radius: 9999px;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: var(--shadow-sm);
}

.search-trigger-btn:hover {
  background: #f9fafb;
  border-color: #d1d5db;
  color: var(--primary);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.search-trigger-btn.active {
  background: var(--primary-light);
  border-color: var(--primary);
  color: var(--primary);
}

/* Expandable Header Search Bar */
.search-bar-container {
  display: none;
  align-items: center;
  gap: 0.5rem;
}

.search-bar-container.open {
  display: flex;
  align-items: center;
  animation: searchExpandLeft 0.22s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.search-bar-container.open~.search-trigger-btn {
  display: none;
}

@keyframes searchExpandLeft {
  from {
    opacity: 0;
    max-width: 0;
    transform: scaleX(0.9);
    transform-origin: right center;
  }

  to {
    opacity: 1;
    max-width: 360px;
    transform: scaleX(1);
    transform-origin: right center;
  }
}

.search-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  width: 300px;
}

.search-input-icon {
  position: absolute;
  left: 0.85rem;
  color: #9ca3af;
  pointer-events: none;
}

.search-input {
  width: 100%;
  height: 44px;
  padding: 0 2.25rem 0 2.4rem;
  font-size: 0.92rem;
  font-family: var(--font);
  border: 1.5px solid #d1d5db;
  border-radius: 9999px;
  background: #ffffff;
  color: var(--text-main);
  outline: none;
  transition: all 0.2s ease;
  box-shadow: var(--shadow-sm);
}

.search-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(224, 79, 56, 0.15);
}

.search-input::-webkit-search-cancel-button,
.search-input::-webkit-search-decoration {
  -webkit-appearance: none;
  appearance: none;
}

.search-clear-btn {
  position: absolute;
  right: 0.75rem;
  background: #e5e7eb;
  border: none;
  font-size: 1.15rem;
  color: #4b5563;
  cursor: pointer;
  padding: 0;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  width: 20px;
  height: 20px;
  transition: all 0.15s ease;
}

.search-clear-btn:hover {
  background: #d1d5db;
  color: #111827;
}

.search-close-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid #e5e7eb;
  background: #ffffff;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  flex-shrink: 0;
  box-shadow: var(--shadow-sm);
}

.search-close-btn:hover {
  color: var(--text-main);
  background: #f3f4f6;
  border-color: #d1d5db;
}

.cart-trigger-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #ffffff;
  color: #111827;
  border: 1px solid #e5e7eb;
  padding: 0;
  width: 44px;
  height: 44px;
  border-radius: 9999px;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: var(--shadow-sm);
}

.cart-trigger-btn:hover {
  background: #f9fafb;
  border-color: #d1d5db;
  color: var(--primary);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.cart-badge {
  position: absolute;
  top: -2px;
  right: -2px;
  background: #ef4444;
  color: #ffffff;
  font-size: 0.72rem;
  font-weight: 700;
  min-width: 20px;
  height: 20px;
  border-radius: 9999px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  border: 2px solid #ffffff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
  line-height: 1;
}

.cart-trigger-btn:hover .cart-badge {
  background: #dc2626;
}

/* Hero Section */
.hero-section {
  max-width: 1360px;
  margin: 1.5rem auto 0 auto;
  padding: 0 1.5rem;
}

.hero-banner-wrapper {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: transparent;
  width: 100%;
}

.hero-banner-img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: contain;
  border-radius: var(--radius-lg);
}

/* Collection Navigation (Sticky Sub-bar with Swipeable Pills) */
.collection-nav-section {
  position: sticky;
  top: 72px;
  z-index: 30;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding: 0.75rem 1.5rem;
  transition: all 0.2s ease;
}

.collection-nav-wrapper {
  position: relative;
  max-width: 1360px;
  margin: 0 auto;
}

/* Bidirectional edge fade indicators on horizontal scroll */
.collection-nav-wrapper::before,
.collection-nav-wrapper::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  width: 44px;
  pointer-events: none;
  z-index: 2;
  opacity: 0;
  transition: opacity 0.25s ease;
}

.collection-nav-wrapper::before {
  left: 0;
  background: linear-gradient(to right, rgba(255, 255, 255, 0.98), rgba(255, 255, 255, 0));
}

.collection-nav-wrapper::after {
  right: 0;
  background: linear-gradient(to left, rgba(255, 255, 255, 0.98), rgba(255, 255, 255, 0));
}

.collection-nav-wrapper.can-scroll-left::before {
  opacity: 1;
}

.collection-nav-wrapper.can-scroll-right::after {
  opacity: 1;
}

.collection-tabs {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  overflow-x: auto;
  padding: 0.25rem 0.2rem;
  scrollbar-width: none;
  -ms-overflow-style: none;
  -webkit-overflow-scrolling: touch;
  scroll-behavior: smooth;
}

.collection-tabs::-webkit-scrollbar {
  display: none;
}

.collection-tab {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 1.15rem;
  border-radius: 9999px;
  background: #ffffff;
  border: 1.5px solid #e5e7eb;
  color: #4b5563;
  font-family: var(--font);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  user-select: none;
}

.collection-tab:hover {
  border-color: #cbd5e1;
  color: #111827;
  background: #f8fafc;
}

.collection-tab.active {
  background: #111827;
  border-color: #111827;
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

.collection-tab .tab-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 700;
  background: #f3f4f6;
  color: #374151;
  transition: all 0.2s ease;
}

.collection-tab.active .tab-count {
  background: rgba(255, 255, 255, 0.22);
  color: #ffffff;
}

@media (max-width: 768px) {
  .collection-nav-section {
    top: 68px;
    padding: 0.5rem 1rem;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.03);
  }

  .collection-nav-wrapper::after {
    opacity: 1;
  }

  .collection-tab {
    padding: 0.45rem 0.95rem;
    font-size: 0.85rem;
  }
}

/* Main Catalog */
.store-container {
  max-width: 1360px;
  margin: 2rem auto 4rem auto;
  padding: 0 1.5rem;
}

/* Search Feedback Banner */
.search-feedback-banner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #fff7ed;
  border: 1px solid #ffedd5;
  border-left: 4px solid var(--primary);
  border-radius: var(--radius-sm);
  padding: 0.85rem 1.25rem;
  margin-bottom: 1.5rem;
  color: #9a3412;
  font-size: 0.95rem;
  box-shadow: var(--shadow-sm);
  animation: bannerSlideDown 0.2s ease-out;
  gap: 1rem;
  flex-wrap: wrap;
}

@keyframes bannerSlideDown {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.search-feedback-info {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.search-feedback-label {
  color: #7c2d12;
}

.search-query-display {
  color: #111827;
  font-weight: 700;
  background: #ffedd5;
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
}

.search-result-count {
  color: #9a3412;
  font-size: 0.88rem;
  font-weight: 600;
}

.search-reset-banner-btn {
  background: #ffffff;
  border: 1px solid #fdba74;
  color: #c2410c;
  font-family: var(--font);
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.35rem 0.9rem;
  border-radius: 9999px;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.search-reset-banner-btn:hover {
  background: #ffedd5;
  color: #9a3412;
  border-color: #fb923c;
}

/* Empty Search Results State */
.empty-search-state {
  text-align: center;
  padding: 4rem 1.5rem;
  background: #fafafa;
  border-radius: var(--radius-lg);
  border: 1.5px dashed var(--border);
  grid-column: 1 / -1;
  margin: 1.5rem 0;
}

.empty-search-icon {
  font-size: 2.8rem;
  margin-bottom: 0.75rem;
  line-height: 1;
}

.empty-search-title {
  font-size: 1.35rem;
  font-weight: 800;
  color: #111827;
  margin-bottom: 0.5rem;
  letter-spacing: -0.01em;
}

.empty-search-desc {
  color: var(--text-muted);
  font-size: 0.95rem;
  max-width: 440px;
  margin: 0 auto 1.5rem auto;
  line-height: 1.5;
}

.empty-search-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.7rem 1.4rem;
  background: var(--primary);
  color: #ffffff;
  border-radius: 9999px;
  font-family: var(--font);
  font-weight: 600;
  font-size: 0.92rem;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: var(--shadow-sm);
}

.empty-search-btn:hover {
  background: var(--primary-hover);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.catalog-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 1.8rem;
  border-bottom: 1px solid var(--border);
  padding-bottom: 1rem;
}

.catalog-title-group h2 {
  font-size: 1.6rem;
  font-weight: 800;
  color: #111827;
  letter-spacing: -0.02em;
}

.catalog-desc {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-top: 0.2rem;
}

.currency-tag {
  font-size: 0.9rem;
  background: #f3f4f6;
  padding: 0.4rem 0.85rem;
  border-radius: var(--radius-sm);
  color: #374151;
  font-weight: 600;
}

/* Product Grid: 4 cards per row by default on desktop */
.product-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1.5rem;
}

.product-card {
  position: relative;
  background: var(--bg-card);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: all 0.25s ease;
  display: flex;
  flex-direction: column;
  cursor: pointer;
  user-select: none;
}

@media (hover: hover) and (pointer: fine) {
  .product-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: #d1d5db;
  }

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

@media (hover: none) {
  .product-card:active {
    transform: scale(0.98);
    transition: transform 0.1s ease;
  }
}

.product-img-box {
  position: relative;
  background: #ffffff;
  padding: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 250px;
}

.product-img {
  max-width: 250px;
  max-height: 250px;
  object-fit: contain;
  filter: none;
  transition: transform 0.3s ease;
}

.badge-tag {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 10;
  background: #111827;
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.25rem 0.6rem;
  border-radius: 9999px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  pointer-events: none;
}

.product-body {
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.product-meta-header {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.35rem;
}

.product-collection {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  text-decoration: none;
  cursor: pointer;
  display: inline-block;
  transition: color 0.15s ease;
}

.product-collection:hover {
  color: var(--primary-hover);
  text-decoration: none;
}

.product-sku {
  font-size: 0.7rem;
  font-family: monospace;
  color: var(--text-muted);
  background: #f3f4f6;
  padding: 0.1rem 0.35rem;
  border-radius: 3px;
}

.price-stock-group {
  display: flex;
  flex-direction: column;
}

.stock-indicator {
  font-size: 0.72rem;
  font-weight: 600;
  color: #10b981;
}

.stock-indicator.low-stock {
  color: #f59e0b;
}

.product-card.sold-out {
  opacity: 0.75;
}

.product-card.sold-out .product-img {
  filter: grayscale(80%);
}

.sold-out-badge {
  background: #6b7280 !important;
  color: #ffffff !important;
}

.product-name {
  font-size: 1.1rem;
  font-weight: 700;
  color: #111827;
  line-height: 1.3;
  margin-bottom: 0.5rem;
  transition: color 0.2s ease;
}

.product-specs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 0.75rem;
}

.spec-chip {
  font-size: 0.75rem;
  background: #f3f4f6;
  color: #4b5563;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
}

.product-description {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.4;
  margin-bottom: 1.25rem;
  flex-grow: 1;
}

.product-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 0.85rem;
  border-top: 1px solid #f3f4f6;
  gap: 0.5rem;
}

.product-price {
  font-size: 1.3rem;
  font-weight: 800;
  color: #111827;
  line-height: 1.2;
}

.product-card-actions {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.add-cart-btn {
  background: #3296bb;
  color: #ffffff;
  border: none;
  padding: 0.5rem 0.65rem;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.1s ease, box-shadow 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
  white-space: nowrap;
  box-shadow: 0 1px 2px rgba(50, 150, 187, 0.2);
}

.add-cart-btn:hover:not(:disabled) {
  background: #277e9e;
  box-shadow: 0 2px 6px rgba(50, 150, 187, 0.3);
}

.add-cart-btn:active:not(:disabled) {
  transform: scale(0.97);
}

.add-cart-btn:disabled {
  background: #d1d5db;
  color: #9ca3af;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.buy-now-btn {
  background: var(--primary);
  color: #ffffff;
  border: none;
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.1s ease, box-shadow 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
  white-space: nowrap;
  box-shadow: 0 1px 2px rgba(224, 79, 56, 0.2);
}

.buy-now-btn:hover:not(:disabled) {
  background: var(--primary-hover);
  box-shadow: 0 2px 6px rgba(224, 79, 56, 0.3);
}

.buy-now-btn:active:not(:disabled) {
  transform: scale(0.97);
}

.buy-now-btn:disabled {
  background: #d1d5db;
  color: #9ca3af;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

#loadMoreBtn,
#resetCollectionBtn {
  background: var(--primary);
  color: #ffffff;
  border: none;
}

#loadMoreBtn:hover:not(:disabled),
#resetCollectionBtn:hover:not(:disabled) {
  background: var(--primary-hover);
  color: #ffffff;
}

/* Cart Drawer */
.drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  z-index: 50;
  transition: opacity 0.3s ease;
}

.drawer-backdrop.hidden {
  display: none;
  opacity: 0;
}

.cart-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  max-width: 440px;
  background: #ffffff;
  z-index: 60;
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

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

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

.drawer-title-group h3 {
  font-size: 1.25rem;
  font-weight: 800;
  color: #111827;
}

.drawer-count {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 500;
}

.close-btn {
  background: transparent;
  border: none;
  font-size: 1.8rem;
  line-height: 1;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0.2rem;
  transition: color 0.2s ease;
}

.close-btn:hover {
  color: #111827;
}

.cart-items-list {
  flex-grow: 1;
  overflow-y: auto;
  padding: 1.25rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.empty-cart-state {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--text-muted);
}

.empty-cart-state svg {
  margin-bottom: 1rem;
  stroke: #d1d5db;
}

.empty-cart-state p {
  font-size: 1.05rem;
  font-weight: 600;
  color: #374151;
  margin-bottom: 0.3rem;
}

.cart-item-row {
  display: flex;
  gap: 1rem;
  padding: 0.85rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: #ffffff;
  align-items: flex-start;
  transition: all 0.2s ease;
}

.cart-item-row.has-error {
  border-color: #ef4444;
  background: #fef2f2;
}

.cart-item-error {
  margin-top: 0.35rem;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.75rem;
  font-weight: 700;
  color: #dc2626;
  background: #fee2e2;
  padding: 0.2rem 0.55rem;
  border-radius: 4px;
}

.drawer-error-banner {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #b91c1c;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 600;
  line-height: 1.4;
  margin-bottom: 0.85rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.drawer-error-banner.hidden {
  display: none;
}

.cart-item-thumb {
  width: 60px;
  height: 60px;
  background: #f9fafb;
  border-radius: var(--radius-sm);
  object-fit: contain;
  padding: 0.3rem;
  border: 1px solid var(--border);
}

.cart-item-info {
  flex-grow: 1;
}

.cart-item-name {
  font-size: 0.95rem;
  font-weight: 700;
  color: #111827;
  line-height: 1.25;
}

.cart-item-price {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--primary);
  margin-top: 0.2rem;
}

.cart-item-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.4rem;
}

.qty-btn {
  width: 26px;
  height: 26px;
  border-radius: 4px;
  border: 1px solid var(--border);
  background: #f9fafb;
  color: #111827;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
}

.qty-btn:hover {
  background: #e5e7eb;
}

.qty-val {
  font-size: 0.9rem;
  font-weight: 700;
  min-width: 18px;
  text-align: center;
}

.remove-btn {
  background: transparent;
  border: none;
  color: #9ca3af;
  font-size: 0.8rem;
  cursor: pointer;
  margin-left: auto;
  text-decoration: underline;
}

.remove-btn:hover {
  color: #ef4444;
}

/* Drawer Footer */
.drawer-footer {
  padding: 1.25rem 1.5rem;
  background: #f9fafb;
  border-top: 1px solid var(--border);
}

/* Promo Code Section */
.promo-section {
  margin-bottom: 0.85rem;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid var(--border);
}

.promo-toggle-btn {
  background: none;
  border: none;
  padding: 0.2rem 0;
  font-size: 0.85rem;
  font-weight: 500;
  color: #4b5563;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  transition: color 0.15s ease;
}

.promo-toggle-btn:hover {
  color: var(--primary);
  text-decoration: underline;
}

.promo-toggle-icon {
  font-size: 0.9rem;
}

.promo-input-group {
  display: flex;
  gap: 0.4rem;
  align-items: center;
}

.promo-input-group input {
  flex: 1;
  padding: 0.45rem 0.65rem;
  font-size: 0.85rem;
  font-weight: 600;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  outline: none;
  background: #ffffff;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.promo-input-group input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(224, 79, 56, 0.15);
}

.btn-promo-apply {
  padding: 0.45rem 0.85rem;
  font-size: 0.82rem;
  font-weight: 700;
  color: #ffffff;
  background: #1f2937;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background-color 0.2s, transform 0.1s;
}

.btn-promo-apply:hover:not(:disabled) {
  background: #111827;
}

.btn-promo-apply:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.btn-promo-cancel {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  background: none;
  border: none;
  color: #9ca3af;
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
  border-radius: 4px;
  padding: 0;
  transition: color 0.15s, background-color 0.15s;
}

.btn-promo-cancel:hover {
  color: #4b5563;
  background: rgba(0, 0, 0, 0.05);
}

.applied-promo-badge {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.45rem 0.75rem;
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  border-radius: 8px;
}

.promo-toggle-btn.hidden,
.applied-promo-badge.hidden,
.promo-input-group.hidden,
.promo-section.hidden,
.promo-error.hidden,
.discount-row.hidden {
  display: none !important;
}

.promo-badge-info {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.85rem;
}

.promo-badge-code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-weight: 700;
  color: #065f46;
}

.promo-badge-discount {
  font-weight: 600;
  color: #059669;
  font-size: 0.8rem;
}

.promo-remove-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  background: none;
  border: none;
  color: #6b7280;
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
  padding: 0;
  border-radius: 4px;
  transition: color 0.15s, background-color 0.15s;
}

.promo-remove-btn:hover {
  color: #dc2626;
  background: rgba(220, 38, 38, 0.12);
}

.promo-error {
  font-size: 0.8rem;
  color: #dc2626;
  font-weight: 600;
  margin-top: 0.35rem;
}

.discount-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.4rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: #059669;
}

.discount-amount {
  font-weight: 700;
  color: #059669;
}

.subtotal-row,
.shipping-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.4rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-muted);
}

.subtotal-amount,
.shipping-amount {
  font-weight: 700;
  color: #111827;
}

.total-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 0.6rem 0 0.8rem 0;
  padding-top: 0.6rem;
  border-top: 1px dashed var(--border);
  font-size: 1.15rem;
  font-weight: 800;
  color: #111827;
}

.total-amount {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--primary);
}

.shipping-hint {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.checkout-btn {
  width: 100%;
  background: var(--primary);
  color: #ffffff;
  border: none;
  padding: 0.9rem 1.2rem;
  border-radius: var(--radius-sm);
  font-size: 1rem;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  box-shadow: 0 4px 12px rgba(224, 79, 56, 0.25);
}

.checkout-btn:hover:not(:disabled) {
  background: var(--primary-hover);
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(224, 79, 56, 0.35);
}

.checkout-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.payment-badges {
  text-align: center;
  margin-top: 1rem;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.accepted-icons {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 0.4rem;
}

.pay-chip {
  background: #ffffff;
  border: 1px solid var(--border);
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  font-weight: 700;
  color: #374151;
  font-size: 0.7rem;
}

/* Centered Toast Notification */
.toast {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(17, 24, 39, 0.95);
  backdrop-filter: blur(8px);
  color: #ffffff;
  padding: 0.9rem 1.6rem;
  border-radius: var(--radius-md);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.25);
  font-size: 0.95rem;
  font-weight: 600;
  text-align: center;
  z-index: 100;
  max-width: 90vw;
  pointer-events: none;
  transition: opacity 0.15s ease, transform 0.15s ease;
}

.toast.hidden {
  opacity: 0;
  transform: translate(-50%, -40%) scale(0.95);
  pointer-events: none;
}

/* Spinner */
.spinner {
  width: 32px;
  height: 32px;
  border: 3px solid #e5e7eb;
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto 0.8rem auto;
}

.btn-spinner {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.4);
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  display: inline-block;
}

.btn-spinner.hidden {
  display: none;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.loading-spinner-wrapper {
  grid-column: 1 / -1;
  text-align: center;
  padding: 3rem 0;
  color: var(--text-muted);
}

/* Status Pages (Success & Cancel) */
.status-page-wrapper {
  min-height: 80vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1.5rem;
}

.status-card {
  background: #ffffff;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
  max-width: 540px;
  width: 100%;
  padding: 2.5rem 2rem;
  text-align: center;
}

.status-icon-wrapper {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  margin: 0 auto 1.25rem auto;
  display: flex;
  align-items: center;
  justify-content: center;
}

.status-icon-wrapper.success {
  background: #ecfdf5;
  color: #10b981;
}

.status-icon-wrapper.cancel {
  background: #fef2f2;
  color: #ef4444;
}

.status-title {
  font-size: 1.6rem;
  font-weight: 800;
  color: #111827;
  margin-bottom: 0.5rem;
}

.status-message {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 1.5rem;
}

.order-details-box {
  background: #f9fafb;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  padding: 1rem 1.25rem;
  text-align: left;
  margin-bottom: 1.75rem;
  font-size: 0.9rem;
}

.order-row {
  display: flex;
  justify-content: space-between;
  padding: 0.4rem 0;
  border-bottom: 1px solid #e5e7eb;
}

.order-row:last-child {
  border-bottom: none;
}

.order-row-label {
  color: var(--text-muted);
}

.order-row-val {
  font-weight: 700;
  color: #111827;
}

.btn-primary {
  display: inline-block;
  background: var(--primary);
  color: #ffffff;
  text-decoration: none;
  font-weight: 700;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-sm);
  transition: background 0.2s ease;
}

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

/* Footer */
.store-footer {
  border-top: 1px solid var(--border);
  background: #ffffff;
  padding: 1.5rem 0;
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* Product Card Links */
.product-card-cover-link {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  z-index: 1;
  text-indent: -9999px;
  overflow: hidden;
  border-radius: var(--radius-md);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.product-img-box-link {
  position: relative;
  z-index: 2;
  display: block;
  text-decoration: none;
  cursor: pointer;
}

.product-img-box-link .product-img-box {
  cursor: pointer;
}

.product-title-link {
  position: relative;
  z-index: 2;
  display: block;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
}

@media (hover: hover) and (pointer: fine) {
  .product-card:hover .product-name,
  .product-title-link:hover .product-name {
    color: var(--primary);
  }
}

/* Breadcrumb Navigation */
.breadcrumb-nav {
  margin-bottom: 1.8rem;
  font-size: 0.9rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.breadcrumb-link {
  color: var(--primary);
  text-decoration: none;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  transition: color 0.15s ease;
}

.breadcrumb-link:hover {
  color: var(--primary-hover);
  text-decoration: underline;
}

.breadcrumb-sep {
  color: #d1d5db;
}

.breadcrumb-collection-link {
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
  cursor: pointer;
  transition: color 0.15s ease;
}

.breadcrumb-collection-link:hover {
  color: var(--primary-hover);
  text-decoration: none;
}

.breadcrumb-current {
  color: #374151;
  font-weight: 600;
}

/* Product Detail Layout */
.product-detail-layout {
  margin-bottom: 4rem;
}

.product-detail-grid {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: 3rem;
  align-items: start;
  background: #ffffff;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  padding: 2.5rem;
  box-shadow: var(--shadow-sm);
}

.product-gallery-card {
  position: relative;
  background: #ffffff;
  border-radius: var(--radius-md);
  padding: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 480px;
  border: 1px solid var(--border);
  overflow: hidden;
}

.badge-tag.large {
  font-size: 0.85rem;
  padding: 0.35rem 0.85rem;
  top: 16px;
  left: 16px;
  z-index: 10;
}

/* Main Gallery Image Box & Lightbox Zoom Trigger */
.gallery-main-img-box {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 420px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  cursor: pointer;
  touch-action: manipulation;
}

.detail-main-img {
  max-width: 100%;
  max-height: 450px;
  width: auto;
  height: auto;
  object-fit: contain;
  filter: none;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  user-select: none;
}

.gallery-main-img-box:hover .detail-main-img {
  transform: scale(1.03);
}

/* Floating Zoom Indicator Button */
.gallery-zoom-btn {
  position: absolute;
  bottom: 16px;
  right: 16px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: var(--shadow-sm);
  color: #475569;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  z-index: 6;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.product-gallery-card:hover .gallery-zoom-btn,
.gallery-zoom-btn:hover {
  background: #ffffff;
  color: var(--primary, #e04f38);
  border-color: rgba(224, 79, 56, 0.2);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.gallery-zoom-btn svg {
  display: block;
}

/* Fullscreen Lightbox Modal */
.lightbox-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  opacity: 1;
  visibility: visible;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.lightbox-modal.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.82);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  cursor: zoom-out;
}

.lightbox-dialog {
  position: relative;
  z-index: 2;
  max-width: 90vw;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  pointer-events: auto;
}

.lightbox-close-btn {
  position: absolute;
  top: -46px;
  right: -8px;
  width: 36px;
  height: 36px;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 50%;
  color: #ffffff;
  font-size: 22px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.15s ease;
}

.lightbox-close-btn:hover {
  background: rgba(255, 255, 255, 0.35);
  transform: scale(1.1);
}

.lightbox-img-container {
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: default;
}

.lightbox-img {
  max-width: 85vw;
  max-height: 76vh;
  object-fit: contain;
  border-radius: var(--radius-md);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
  animation: lightboxScaleUp 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  background: #ffffff;
  padding: 1.5rem;
}

.lightbox-caption {
  margin-top: 14px;
  color: #f1f5f9;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-align: center;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

@keyframes lightboxScaleUp {
  from {
    opacity: 0;
    transform: scale(0.92);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

.product-info-panel {
  display: flex;
  flex-direction: column;
}

.detail-collection-tag {
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.4rem;
  text-decoration: none;
  cursor: pointer;
  display: inline-block;
  transition: color 0.15s ease;
}

.detail-collection-tag:hover {
  color: var(--primary-hover);
  text-decoration: none;
}

.detail-product-title {
  font-size: 2.1rem;
  font-weight: 800;
  color: #111827;
  line-height: 1.2;
  margin-bottom: 1rem;
  letter-spacing: -0.02em;
}

.detail-price-row {
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
  margin-bottom: 1.5rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid #f3f4f6;
}

.detail-price {
  font-size: 2.2rem;
  font-weight: 800;
  color: #111827;
}

.detail-currency {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-muted);
}

.detail-stock-badge {
  margin-left: auto;
  font-size: 0.85rem;
  font-weight: 700;
  padding: 0.3rem 0.75rem;
  border-radius: 9999px;
}

.detail-stock-badge.in-stock {
  background: #ecfdf5;
  color: #059669;
}

.detail-stock-badge.low-stock {
  background: #fffbeb;
  color: #d97706;
}

.detail-stock-badge.sold-out {
  background: #f3f4f6;
  color: #6b7280;
}

.detail-specs-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
  margin-bottom: 1.75rem;
}

.spec-card {
  background: #f9fafb;
  border: 1px solid var(--border);
  padding: 0.6rem 0.85rem;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  display: flex;
  flex-direction: column;
}

.spec-card strong {
  font-size: 0.72rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.spec-card span {
  font-weight: 700;
  color: #111827;
  margin-top: 0.15rem;
}

.detail-actions-box {
  display: flex;
  align-items: stretch;
  gap: 0.75rem;
  margin-bottom: 2rem;
}

.quantity-stepper {
  display: flex;
  align-items: center;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  background: #f9fafb;
  overflow: hidden;
  justify-content: center;
  flex-shrink: 0;
}

.stepper-btn {
  border: none;
  background: transparent;
  padding: 0.75rem 1rem;
  font-size: 1.1rem;
  font-weight: 800;
  cursor: pointer;
  color: #111827;
  transition: background 0.15s ease;
}

.stepper-btn:hover:not(:disabled) {
  background: #e5e7eb;
}

.stepper-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.stepper-val {
  min-width: 36px;
  text-align: center;
  font-weight: 800;
  font-size: 1rem;
}

.detail-add-btn {
  flex: 1 1 0;
  background: #3296bb;
  color: #ffffff;
  border: none;
  padding: 0.85rem 1.25rem;
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: all 0.2s ease;
  white-space: nowrap;
  box-shadow: 0 3px 10px rgba(50, 150, 187, 0.22);
}

.detail-add-btn:hover:not(:disabled) {
  background: #277e9e;
  transform: translateY(-1px);
  box-shadow: 0 5px 14px rgba(50, 150, 187, 0.32);
}

.detail-add-btn:active:not(:disabled) {
  transform: translateY(0) scale(0.98);
}

.detail-add-btn:disabled {
  background: #d1d5db;
  color: #9ca3af;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.detail-buy-now-btn {
  flex: 1.2 1 0;
  background: var(--primary);
  color: #ffffff;
  border: none;
  padding: 0.85rem 1.4rem;
  border-radius: var(--radius-sm);
  font-size: 1rem;
  font-weight: 800;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: all 0.2s ease;
  box-shadow: 0 4px 12px rgba(224, 79, 56, 0.25);
  white-space: nowrap;
}

.detail-buy-now-btn:hover:not(:disabled) {
  background: var(--primary-hover);
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(224, 79, 56, 0.35);
}

.detail-buy-now-btn:active:not(:disabled) {
  transform: translateY(0) scale(0.98);
}

.detail-buy-now-btn:disabled {
  background: #d1d5db;
  color: #9ca3af;
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
}

.detail-description-section {
  margin-bottom: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid #f3f4f6;
}

.detail-description-section h3 {
  font-size: 1.1rem;
  font-weight: 800;
  color: #111827;
  margin-bottom: 0.75rem;
}

.detail-desc-content {
  font-size: 0.95rem;
  color: #4b5563;
  line-height: 1.6;
}

/* Enhanced Markdown Typography */
.product-description em,
.detail-desc-content em {
  font-style: italic;
}

.product-description strong,
.detail-desc-content strong {
  font-weight: 700;
  color: #1f2937;
}

.product-description p,
.detail-desc-content p {
  margin: 0.4rem 0;
}

.product-description p:first-child,
.detail-desc-content p:first-child {
  margin-top: 0;
}

.product-description ul,
.product-description ol,
.detail-desc-content ul,
.detail-desc-content ol {
  margin: 0.5rem 0 0.5rem 1.25rem;
  padding-left: 0.25rem;
}

.product-description li,
.detail-desc-content li {
  margin-bottom: 0.3rem;
}

.product-description blockquote,
.detail-desc-content blockquote {
  border-left: 3px solid var(--primary, #f97316);
  padding: 0.4rem 0.8rem;
  margin: 0.6rem 0;
  background: #f8fafc;
  color: #475569;
  font-style: italic;
  border-radius: 0 4px 4px 0;
}

.product-description code,
.detail-desc-content code {
  background: #f1f5f9;
  color: #0f172a;
  padding: 0.15rem 0.35rem;
  border-radius: 4px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.85em;
}

.product-description pre,
.detail-desc-content pre {
  background: #1e293b;
  color: #f8fafc;
  padding: 0.75rem 1rem;
  border-radius: 6px;
  overflow-x: auto;
  margin: 0.75rem 0;
}

.product-description pre code,
.detail-desc-content pre code {
  background: transparent;
  color: inherit;
  padding: 0;
}

.product-description hr,
.detail-desc-content hr {
  border: none;
  border-top: 1px solid var(--border, #e2e8f0);
  margin: 0.75rem 0;
}

.markdown-table {
  width: 100%;
  border-collapse: collapse;
  margin: 0.75rem 0;
  font-size: 0.85rem;
}

.markdown-table th,
.markdown-table td {
  border: 1px solid #e2e8f0;
  padding: 0.4rem 0.6rem;
  text-align: left;
}

.markdown-table th {
  background: #f8fafc;
  font-weight: 700;
  color: #1e293b;
}

.table-responsive {
  overflow-x: auto;
  width: 100%;
}

.detail-guarantee-box {
  background: #f9fafb;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.75rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.guarantee-item {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  font-size: 0.85rem;
}

.guarantee-icon {
  font-size: 1.2rem;
}

.guarantee-item strong {
  display: block;
  color: #111827;
  font-weight: 700;
}

.guarantee-item p {
  color: var(--text-muted);
  font-size: 0.8rem;
  margin-top: 0.1rem;
}

.product-not-found {
  text-align: center;
  padding: 4rem 1rem;
  background: #ffffff;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
}

.product-not-found h2 {
  font-size: 1.8rem;
  font-weight: 800;
  color: #111827;
  margin-bottom: 0.5rem;
}

.product-not-found p {
  color: var(--text-muted);
}

/* Related Products Section ("You Might Also Like...") */
.related-section {
  margin-top: 4.5rem;
  margin-bottom: 4rem;
  padding-top: 2.5rem;
  border-top: 1px solid var(--border);
}

.related-section.hidden {
  display: none;
}

.related-header {
  margin-bottom: 1.8rem;
}

.related-header h2 {
  font-size: 1.6rem;
  font-weight: 800;
  color: #111827;
  letter-spacing: -0.02em;
}

@media (max-width: 1150px) {
  .product-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.25rem;
  }
}

@media (max-width: 960px) {
  .product-detail-grid {
    grid-template-columns: 1fr;
    padding: 1.5rem;
    gap: 1.5rem;
  }

  .product-gallery-card {
    min-height: auto;
    padding: 1rem;
    width: 100%;
  }

  .gallery-main-img-box {
    min-height: auto;
    width: 100%;
  }

  .detail-main-img {
    max-width: 100%;
    max-height: 400px;
    width: auto;
    height: auto;
    object-fit: contain;
  }
}

@media (max-width: 768px) {
  .search-bar-container.open {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: #ffffff;
    padding: 0.6rem 1rem;
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  }

  .search-bar-container.open .search-input-wrapper {
    width: 100%;
    max-width: none;
  }

  .product-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
  }

  .detail-product-title {
    font-size: 1.6rem;
  }

  .detail-actions-box {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
  }

  .detail-actions-box .quantity-stepper {
    flex: 0 0 auto;
    width: 120px;
    height: 46px;
  }

  .detail-add-btn {
    flex: 1 1 0;
    width: auto;
    min-height: 46px;
  }

  .detail-buy-now-btn {
    flex: 0 0 100%;
    width: 100%;
    min-height: 48px;
  }
}

@media (max-width: 640px) {
  .hero-title {
    font-size: 1.6rem;
  }

  .catalog-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }

  .product-footer {
    flex-direction: column;
    align-items: stretch;
    gap: 0.6rem;
  }

  .product-footer .price-stock-group {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
  }

  .product-card-actions {
    display: flex;
    width: 100%;
    gap: 0.4rem;
  }

  .product-card-actions .add-cart-btn,
  .product-card-actions .buy-now-btn {
    flex: 1 1 0;
    padding: 0.6rem 0.4rem;
    min-height: 40px;
  }

  .cart-drawer {
    max-width: 100%;
  }
}

@media (max-width: 480px) {
  .product-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
}

/* --- Store Modal Dialogs (e.g. Unavailable Product) --- */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 1000;
  transition: opacity 0.25s ease;
}

.modal-backdrop.hidden {
  display: none !important;
  opacity: 0;
  pointer-events: none;
}

.store-modal {
  position: fixed;
  inset: 0;
  z-index: 1001;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.store-modal.hidden {
  display: none !important;
  opacity: 0;
  pointer-events: none;
}

.store-modal.hidden .store-modal-card {
  pointer-events: none !important;
}

.store-modal-card {
  background: var(--surface, #ffffff);
  border-radius: var(--radius-lg, 20px);
  padding: 1.75rem 2rem;
  max-width: 480px;
  width: 100%;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  border: 1px solid var(--border);
  pointer-events: auto;
  animation: modalPopIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.store-modal-icon {
  font-size: 1.5rem;
  line-height: 1;
}

@keyframes modalPopIn {
  from {
    opacity: 0;
    transform: scale(0.94) translateY(8px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

/* ==========================================================================
   Vacation Mode (Order Pause) Styles
   ========================================================================== */

.vacation-banner {
  width: 100%;
  max-width: 1000px;
  margin: 1.25rem auto 0.5rem auto;
  padding: 0 1rem;
  box-sizing: border-box;
  animation: vacationFadeIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.vacation-container {
  width: 100%;
}

.vacation-card {
  display: flex;
  align-items: center;
  background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
  border: 1.5px solid #fde68a;
  border-radius: var(--radius-lg, 20px);
  padding: 1.5rem 1.75rem;
  box-shadow: 0 4px 16px -2px rgba(217, 119, 6, 0.08);
}

.vacation-body {
  flex: 1;
  min-width: 0;
}

.vacation-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #fde68a;
  color: #92400e;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.25rem 0.65rem;
  border-radius: 9999px;
  margin-bottom: 0.45rem;
}

.vacation-badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #d97706;
}

.vacation-headline {
  margin: 0 0 0.35rem 0;
  font-size: 1.25rem;
  font-weight: 800;
  color: #78350f;
  line-height: 1.3;
}

.vacation-message {
  margin: 0;
  font-size: 0.92rem;
  color: #92400e;
  line-height: 1.5;
  white-space: pre-line;
}

@media (max-width: 640px) {
  .vacation-card {
    padding: 1.25rem;
  }
  .vacation-headline {
    font-size: 1.15rem;
  }
  .vacation-message {
    font-size: 0.88rem;
  }
}

@keyframes vacationFadeIn {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Button & Notice states during Vacation Mode */
.btn-vacation-paused {
  background: #fef3c7 !important;
  color: #92400e !important;
  border: 1px solid #fde68a !important;
  cursor: not-allowed !important;
  opacity: 0.95;
  font-weight: 700 !important;
}

.product-card-actions .btn-vacation-paused {
  width: 100%;
  justify-content: center;
}

.cart-vacation-notice {
  background: #fffbeb;
  border: 1.5px solid #fde68a;
  border-radius: var(--radius-sm, 12px);
  padding: 0.9rem 1rem;
  margin-top: 0.6rem;
}

.cart-vacation-header {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #92400e;
  font-size: 0.92rem;
  margin-bottom: 0.3rem;
}

.cart-vacation-text {
  margin: 0;
  font-size: 0.82rem;
  color: #b45309;
  line-height: 1.4;
}