/* ==========================================================================
   1. Filter
   ========================================================================== */
.products-filter-btn {
  display:none; align-items:center; gap:.5rem;
  padding:.6rem 1.1rem; margin-bottom:1rem;
  background:rgba(0,0,0,.06); border:1px solid rgba(0,0,0,.1);
  border-radius:12px; font-size:.875rem; font-weight:600;
  color:rgba(0,0,0,.72); cursor:pointer;
  transition:background 160ms ease,transform 180ms ease;
}
.products-filter-btn:hover  { background:rgba(0,0,0,.1); transform:scale(1.02); }
.products-filter-btn:active { transform:scale(.96); }
[data-theme="dark"] .products-filter-btn {
  background:rgba(255,255,255,.08); border-color:rgba(255,255,255,.15); color:rgba(255,255,255,.7);
}
.products-filter-icon { width:16px; height:16px; flex-shrink:0; opacity:.72; }
[data-theme="dark"] .products-filter-icon { filter:brightness(0) invert(1); opacity:.7; }

.products-filter { display:flex; flex-wrap:wrap; gap:.5rem; margin-bottom:1.75rem; }

.filter-pill {
  display:inline-flex; align-items:center;
  padding:.45rem 1rem; border-radius:100px;
  font-size:.8125rem; font-weight:500; cursor:pointer;
  border:1px solid rgba(0,0,0,.14); background:transparent; color:rgba(0,0,0,.6);
  white-space:nowrap;
  transition:background 160ms ease,color 160ms ease,border-color 160ms ease,
             transform 180ms cubic-bezier(0.34,1.56,0.64,1);
}
.filter-pill:hover  { background:rgba(0,0,0,.06); color:rgba(0,0,0,.88); border-color:rgba(0,0,0,.24); transform:scale(1.04); }
.filter-pill:active { transform:scale(.95); }
.filter-pill.is-active { background:rgba(0,0,0,.88); color:#fff; border-color:transparent; }
.filter-pill:focus-visible { outline:2px solid rgba(0,100,120,.6); outline-offset:2px; }
[data-theme="dark"] .filter-pill { border-color:rgba(255,255,255,.14); color:rgba(255,255,255,.55); }
[data-theme="dark"] .filter-pill:hover { background:rgba(255,255,255,.09); color:rgba(255,255,255,.9); }
[data-theme="dark"] .filter-pill.is-active { background:rgba(255,255,255,.92); color:rgba(0,0,0,.88); }

/* ==========================================================================
   2. Grids
   ========================================================================== */
.products-grid  { display:grid; grid-template-columns:repeat(6,1fr); gap:1rem; }
.related-grid   { grid-template-columns:repeat(4,1fr); }
.no-products    { grid-column:1/-1; text-align:center; color:rgba(0,0,0,.45); padding:3rem 0; }

/* ==========================================================================
   3. Product Cards
   ========================================================================== */
.product-card {
  display:flex; flex-direction:column;
  border-radius:16px; overflow:hidden; cursor:pointer;
  background:rgba(0,0,0,.025); border:1px solid rgba(0,0,0,.06);
  transition:box-shadow 200ms ease,transform 220ms cubic-bezier(0.34,1.56,0.64,1);
}
.product-card:hover { box-shadow:0 8px 28px rgba(0,0,0,.1); transform:translateY(-3px) scale(1.01); }
.product-card:active { transform:scale(.97); }
.product-card:focus-visible { outline:2px solid rgba(0,100,120,.6); outline-offset:2px; }
[data-theme="dark"] .product-card { background:rgba(255,255,255,.04); border-color:rgba(255,255,255,.08); }
[data-theme="dark"] .product-card:hover { box-shadow:0 8px 28px rgba(0,0,0,.4); }

.product-card-img-wrap { aspect-ratio:1; overflow:hidden; background:rgba(0,0,0,.03); }
.product-card-img {
  width:100%; height:100%; object-fit:cover; object-position:center;
  transition:transform 300ms ease;
}
.product-card:hover .product-card-img { transform:scale(1.06); }

.product-card-body { padding:.75rem; display:flex; flex-direction:column; gap:.35rem; flex:1; }
.product-card-name { font-size:.8125rem; font-weight:600; color:rgba(0,0,0,.82); line-height:1.3; margin:0; }
[data-theme="dark"] .product-card-name { color:rgba(255,255,255,.88); }
.product-card-footer {
  display:flex; align-items:center; justify-content:space-between;
  gap:.25rem; flex-wrap:wrap; margin-top:auto;
}
.product-card-size { font-size:.75rem; color:rgba(0,0,0,.42); }
[data-theme="dark"] .product-card-size { color:rgba(255,255,255,.38); }
.product-card-prices { display:flex; align-items:center; gap:.35rem; }
.price-regular { font-size:.7rem; color:rgba(0,0,0,.35); text-decoration:line-through; }
.price-special { font-size:.8125rem; font-weight:700; color:rgba(0,0,0,.88); }
[data-theme="dark"] .price-special { color:rgba(255,255,255,.88); }

/* ==========================================================================
   4. Product Detail
   ========================================================================== */
.product-detail-container {
  display:grid; grid-template-columns:1fr 1fr;
  gap:2rem; align-items:stretch; margin-bottom:2.5rem;
}
.detail-image-col {
  border-radius:24px; overflow:hidden;
  background:rgba(0,0,0,.03); border:1px solid rgba(0,0,0,.06); min-height:400px;
}
[data-theme="dark"] .detail-image-col { background:rgba(255,255,255,.04); border-color:rgba(255,255,255,.09); }

.detail-img { width:100%; height:100%; object-fit:cover; object-position:center; display:block; }
.detail-info-col { display:flex; flex-direction:column; }
.detail-box {
  flex:1; display:flex; flex-direction:column; gap:1rem;
  padding:1.75rem; border-radius:24px;
  background:rgba(0,0,0,.025); border:1px solid rgba(0,0,0,.08); overflow-y:auto;
}
[data-theme="dark"] .detail-box { background:rgba(255,255,255,.04); border-color:rgba(255,255,255,.09); }

.detail-name { font-family:"Satoshi",sans-serif; font-size:1.5rem; font-weight:700; color:rgba(0,0,0,.88); line-height:1.2; margin:0; }
[data-theme="dark"] .detail-name { color:rgba(255,255,255,.92); }

.detail-row   { display:flex; align-items:flex-start; gap:.75rem; }
.detail-label {
  font-size:.75rem; font-weight:600; color:rgba(0,0,0,.4);
  text-transform:uppercase; letter-spacing:.06em; flex-shrink:0; padding-top:.15rem; min-width:68px;
}
[data-theme="dark"] .detail-label { color:rgba(255,255,255,.38); }
.detail-value { font-size:.9375rem; color:rgba(0,0,0,.78); }
[data-theme="dark"] .detail-value { color:rgba(255,255,255,.78); }

.detail-cats { display:flex; flex-wrap:wrap; gap:.35rem; }
.category-tag {
  display:inline-block; padding:.25rem .75rem; border-radius:100px;
  font-size:.75rem; font-weight:500;
  border:1px solid rgba(0,0,0,.15); color:rgba(0,0,0,.62); text-decoration:none;
  transition:background 150ms ease,color 150ms ease;
}
.category-tag:hover { background:rgba(0,0,0,.06); color:rgba(0,0,0,.88); }
[data-theme="dark"] .category-tag { border-color:rgba(255,255,255,.15); color:rgba(255,255,255,.6); }
[data-theme="dark"] .category-tag:hover { background:rgba(255,255,255,.08); color:rgba(255,255,255,.88); }

.detail-description { font-size:.9rem; line-height:1.65; color:rgba(0,0,0,.62); margin:0; flex:1; }
[data-theme="dark"] .detail-description { color:rgba(255,255,255,.6); }

.detail-pricing {
  display:flex; flex-direction:column; gap:.5rem;
  padding:1rem 0; border-top:1px solid rgba(0,0,0,.08); border-bottom:1px solid rgba(0,0,0,.08);
}
[data-theme="dark"] .detail-pricing { border-color:rgba(255,255,255,.1); }

.price-line { display:flex; justify-content:space-between; align-items:center; }
.price-line-label { font-size:.8125rem; color:rgba(0,0,0,.48); }
[data-theme="dark"] .price-line-label { color:rgba(255,255,255,.42); }
.price-line-value { font-size:.9375rem; font-weight:700; color:rgba(0,0,0,.88); }
[data-theme="dark"] .price-line-value { color:rgba(255,255,255,.88); }
.price-line-regular { font-weight:400; color:rgba(0,0,0,.35); text-decoration:line-through; }
[data-theme="dark"] .price-line-regular { color:rgba(255,255,255,.3); }

.detail-section { margin-bottom:2.5rem; }
.detail-section-title {
  font-family:"Satoshi",sans-serif; font-size:1.125rem; font-weight:700;
  color:rgba(0,0,0,.82); margin:0 0 1rem;
}
[data-theme="dark"] .detail-section-title { color:rgba(255,255,255,.85); }

.ingredients-list {
  list-style:none; padding:0; margin:0;
  display:grid; grid-template-columns:repeat(auto-fill,minmax(200px,1fr)); gap:.5rem;
}
.ingredients-list li {
  padding:.4rem .75rem; border-radius:8px; font-size:.8125rem;
  color:rgba(0,0,0,.65); background:rgba(0,0,0,.035); border:1px solid rgba(0,0,0,.06);
}
[data-theme="dark"] .ingredients-list li {
  background:rgba(255,255,255,.04); border-color:rgba(255,255,255,.08); color:rgba(255,255,255,.6);
}

/* ==========================================================================
   5. Buttons
   ========================================================================== */
.more-info-btn {
  text-decoration:none; display:flex; align-items:center; justify-content:center;
  width:100%; padding:.85rem 1.5rem; border-radius:14px;
  background:rgba(0,0,0,.88); color:rgba(255,255,255,.95);
  font-size:.9375rem; font-weight:600; border:none; cursor:pointer; letter-spacing:.01em;
  transition:background 160ms ease,transform 200ms cubic-bezier(0.34,1.56,0.64,1);
}
.more-info-btn:hover  { background:rgba(0,0,0,1); transform:scale(1.02); }
.more-info-btn:active { transform:scale(.97); }
.more-info-btn:focus-visible { outline:2px solid rgba(0,100,120,.6); outline-offset:2px; }
[data-theme="dark"] .more-info-btn { background:rgba(255,255,255,.92); color:rgba(0,0,0,.88); }
[data-theme="dark"] .more-info-btn:hover { background:#fff; }

.cta-btn {
  display:inline-flex; align-items:center; justify-content:center;
  padding:.75rem 1.75rem; background:rgba(0,0,0,.88); color:rgba(255,255,255,.95);
  border-radius:14px; font-size:1rem; font-weight:600; text-decoration:none; letter-spacing:.01em;
  transition:background 160ms ease,transform 200ms cubic-bezier(0.34,1.56,0.64,1);
}
.cta-btn:hover  { background:rgba(0,0,0,1); transform:scale(1.03); }
.cta-btn:active { transform:scale(.97); }
[data-theme="dark"] .cta-btn { background:rgba(255,255,255,.92); color:rgba(0,0,0,.88); }
[data-theme="dark"] .cta-btn:hover { background:#fff; }

/* ==========================================================================
   6. Responsive
   ========================================================================== */
@media (max-width:1200px) { .products-grid { grid-template-columns:repeat(4,1fr); } }

@media (max-width:960px) {
  .products-grid            { grid-template-columns:repeat(3,1fr); }
  .related-grid             { grid-template-columns:repeat(3,1fr); }
  .product-detail-container { grid-template-columns:1fr 1fr; gap:1.5rem; }
}

@media (max-width:768px) {
  .products-filter-btn { display:inline-flex; }
  .products-filter { display:none; }
  .products-filter.is-open { display:flex; }
  .products-grid { grid-template-columns:repeat(2,1fr); gap:.75rem; }

  .related-grid {
    display:flex; flex-wrap:nowrap; overflow-x:auto;
    scroll-snap-type:x mandatory; -webkit-overflow-scrolling:touch;
    scrollbar-width:none; gap:.75rem; padding-bottom:.25rem;
  }
  .related-grid::-webkit-scrollbar { display:none; }
  .related-grid .product-card { flex:0 0 calc(50% - .375rem); scroll-snap-align:start; }

  .product-detail-container { grid-template-columns:1fr; gap:1.25rem; }
  .detail-image-col { min-height:300px; }
}

@media (max-width:480px) {
  .products-grid { grid-template-columns:1fr; }
  .related-grid .product-card { flex:0 0 65%; }
}

@media (prefers-reduced-motion:reduce) {
  *,*::before,*::after {
    animation-duration:.01ms !important;
    animation-iteration-count:1 !important;
    transition-duration:.01ms !important;
    scroll-behavior:auto !important;
  }
}
