:root {
  --card-ease: cubic-bezier(0.4, 0, 0.2, 1);
  --card-dur: 0.45s;
}

.product-grid {
  display: flex;
  align-items: stretch;
  gap: 24px;
}

.product-card {
  flex: 1 1 0;
  min-width: 0;
  position: relative;
  transition:
    flex-grow var(--card-dur) var(--card-ease),
    flex-basis var(--card-dur) var(--card-ease),
    transform 0.3s var(--card-ease),
    box-shadow 0.3s var(--card-ease);
}

.product-card.is-open {
  flex-grow: 2.4;
  box-shadow: 0 0 0 1.5px #111111, 0 18px 40px rgba(0, 0, 0, 0.12);
}

.card-img-wrap {
  transition: height var(--card-dur) var(--card-ease);
}

.card-img-wrap img {
  transition: transform 0.5s var(--card-ease);
}

.product-card.is-open .card-img-wrap {
  height: 220px;
}

.card-subtitle {
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--text-muted);
  margin-bottom: 8px;
}

@media (hover: hover) and (pointer: fine) {
  .product-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.12);
  }
  .product-card.is-open:hover {
    box-shadow: 0 0 0 1.5px #111111, 0 20px 44px rgba(0, 0, 0, 0.14);
  }
  .product-card:hover .card-img-wrap img {
    transform: scale(1.06);
  }
}

.card-details {
  display: grid;
  grid-template-rows: 0fr;
  opacity: 0;
  visibility: hidden;
  transition:
    grid-template-rows var(--card-dur) var(--card-ease),
    opacity 0.3s ease,
    visibility 0s linear var(--card-dur);
}

.product-card.is-open .card-details {
  grid-template-rows: 1fr;
  opacity: 1;
  visibility: visible;
  transition-delay: 0s, 0.1s, 0s;
}

.card-details-inner {
  min-height: 0;
  overflow: hidden;
}

.detail-sep {
  border: none;
  border-top: 1px solid var(--border-light);
  margin: 16px 0;
}

.detail-section + .detail-section {
  margin-top: 16px;
}

.detail-heading {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: #4b5563;
  margin-bottom: 8px;
}

.detail-text {
  font-size: 0.85rem;
  line-height: 1.65;
  color: #374151;
}

.detail-cols {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

.detail-cols .detail-section + .detail-section {
  margin-top: 0;
}

.detail-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.detail-list li {
  position: relative;
  padding-left: 20px;
  font-size: 0.83rem;
  line-height: 1.5;
  color: #374151;
}

.detail-list li::before {
  content: '';
  position: absolute;
  left: 2px;
  top: 0.5em;
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.list-pros li::before { background: #111111; }
.list-cons li::before { border: 1.5px solid #9ca3af; }
.list-use li::before  { background: #d1d5db; }

.card-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 16px;
}

.card-details .detail-sep:first-child { margin-top: 4px; }

.btn-toggle-detail {
  width: 100%;
  background: var(--pill-bg);
  color: var(--text-dark);
  border: 1.5px solid transparent;
  padding: 10px 12px;
  border-radius: 999px;
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  transition: background 0.25s ease, border-color 0.25s ease;
}

.btn-toggle-detail:hover {
  background: #e5e7eb;
}

.btn-toggle-detail:focus-visible,
.product-card .btn-outline:focus-visible {
  outline: 2px solid #111111;
  outline-offset: 2px;
}

.btn-toggle-detail .label-close { display: none; }
.btn-toggle-detail[aria-expanded="true"] .label-open  { display: none; }
.btn-toggle-detail[aria-expanded="true"] .label-close { display: inline; }

@media (max-width: 960px) {
  .product-grid { flex-wrap: wrap; }

  .product-card {
    flex: 0 0 calc(50% - 12px);
  }

  .product-card.is-open {
    flex: 0 0 100%;
  }

  .detail-cols {
    grid-template-columns: 1fr 1fr;
    gap: 24px;
  }
}

@media (max-width: 640px) {
  .product-grid {
    flex-direction: column;
    flex-wrap: nowrap;
    gap: 18px;
  }

  .product-card,
  .product-card.is-open {
    flex: none;
    width: 100%;
  }

  .detail-cols {
    grid-template-columns: 1fr;
    gap: 16px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .product-card,
  .card-img-wrap,
  .card-img-wrap img,
  .card-details {
    transition-duration: 0.01s !important;
    transition-delay: 0s !important;
  }
}

:root {
  color-scheme: light;
  --bg-page: #f2f2f2;
  --bg-white: #ffffff;
  --text-dark: #111111;
  --text-muted: #6b7280;
  --border-light: #e5e7eb;
  --pill-bg: #f3f4f6;
  --theme-surface: #ffffff;
  --theme-soft: #f8fafc;
  --theme-input: #ffffff;
}
html[data-theme="dark"] {
  color-scheme: dark;
  --bg-page: #17191f;
  --bg-white: #222630;
  --text-dark: #f3f4f6;
  --text-muted: #a1a1aa;
  --border-light: #3b414d;
  --pill-bg: #303642;
  --theme-surface: #252a35;
  --theme-soft: #1e232c;
  --theme-input: #1c2029;
}
body, .navbar, .product-card, .gallery-card, .white-box, .social-card,
.modal-box, .cta-banner, .filter-btn, .pill-tag, .btn-toggle-detail,
.form-group input, .form-group select, .form-group textarea {
  transition: background-color .25s ease, color .25s ease, border-color .25s ease, box-shadow .25s ease;
}
body { background: var(--bg-page) !important; color: var(--text-dark) !important; }
.navbar, .modal-box, .product-card, .gallery-card, .white-box, .social-card {
  background: var(--bg-white) !important; color: var(--text-dark) !important;
  border-color: var(--border-light) !important;
}
.nav-link, .brand, h1, h2, h3, h4, p, label, .detail-text, .detail-heading,
.gallery-info, .flow-step, .contact-left, .shipping-top-grid { color: var(--text-dark); }
.card-subtitle, .card-desc, .page-subtitle, .text-muted { color: var(--text-muted) !important; }
.filter-btn, .pill-tag, .btn-toggle-detail { background: var(--pill-bg); color: var(--text-dark); border-color: var(--border-light); }
.form-group input, .form-group select, .form-group textarea, input, select, textarea {
  background: var(--theme-input); color: var(--text-dark); border-color: var(--border-light);
}
html[data-theme="dark"] .detail-heading, html[data-theme="dark"] .detail-text,
html[data-theme="dark"] .product-extra p, html[data-theme="dark"] .product-extra li,
html[data-theme="dark"] .flow-step p, html[data-theme="dark"] .gallery-info p { color: #c2c8d2 !important; }
html[data-theme="dark"] .detail-sep { border-color: var(--border-light); }
html[data-theme="dark"] .product-card.is-open { box-shadow: 0 0 0 1.5px #8b9bb4, 0 18px 40px rgba(0,0,0,.35); }
html[data-theme="dark"] .btn-toggle-detail:hover { background: #3b4351; }
.theme-toggle {
  width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--border-light);
  background: var(--pill-bg); color: var(--text-dark); cursor: pointer; font-size: 19px;
  display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto;
  transition: transform .2s ease, background .25s ease, color .25s ease;
}
.theme-toggle:hover { transform: rotate(12deg) scale(1.06); }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; } }

.cta-banner h3 {
    color: #ffffff;
}

[data-theme="dark"] .cta-banner h3 {
    color: #ffffff !important;
}

[data-theme="dark"] .cta-banner {
    color: #ffffff;
}

[data-theme="dark"] .cta-banner span {
    color: #000000 !important;
}

html[data-theme="dark"] .yellow-alert {
    background: #302a1b !important;
    border: 1.5px solid #80652b !important;
    color: #fef3c7 !important;
}

html[data-theme="dark"] .blue-alert {
    background: #1d2b40 !important;
    border: 1.5px solid #365b86 !important;
    color: #dbeafe !important;
}

html[data-theme="dark"] .info-alert h3,
html[data-theme="dark"] .info-alert p,
html[data-theme="dark"] .info-alert span,
html[data-theme="dark"] .info-alert strong {
    color: #f3f4f6 !important;
}

html[data-theme="dark"] .yellow-badge {
    background: #80652b !important;
    color: #ffffff !important;
}

html[data-theme="dark"] .blue-badge {
    background: #365b86 !important;
    color: #ffffff !important;
}

.product-card .btn-detail {
    color: #2563eb;
    background: transparent;
    border: 1px solid #2563eb;
    border-radius: 8px;
    padding: 10px 16px;
    font-weight: 700;
    transition: all 0.3s ease;
}

.product-card .btn-detail:hover {
    background: #2563eb;
    color: #ffffff;
}

html[data-theme="dark"] .product-card .btn-detail {
    color: #93c5fd !important;
    background: #253750 !important;
    border: 1px solid #3b82f6 !important;
}

html[data-theme="dark"] .product-card .btn-detail:hover {
    color: #ffffff !important;
    background: #2563eb !important;
    border-color: #60a5fa !important;
}

html[data-theme="dark"] .product-card.expanded .btn-detail {
    color: #ffffff !important;
    background: #2563eb !important;
}

.product-card .btn-detail:focus-visible {
    outline: 3px solid #60a5fa;
    outline-offset: 3px;
}
