/* =========================================================
   INTRYS - Component styles
   Product cards, shop grid, product detail, cart, checkout, account
   ========================================================= */

/* ============ Product card ============ */
.prod-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 20px;
}
@container (max-width: 700px) {
  .prod-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
}
.prod-card {
  background: var(--card);
  border: 1px solid var(--line-soft);
  border-radius: var(--r-lg);
  overflow: hidden;
  display: flex; flex-direction: column;
  transition: transform var(--t), box-shadow var(--t), border-color var(--t-fast);
  position: relative;
}
.prod-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: var(--line); }
.prod-card .thumb {
  position: relative;
  aspect-ratio: 4 / 3;
  background: var(--bg-alt);
  overflow: hidden;
}
.prod-card .thumb img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .5s ease;
}
.prod-card:hover .thumb img { transform: scale(1.04); }
.prod-card .wish {
  position: absolute; top: 10px; right: 10px;
  width: 36px; height: 36px; border-radius: 50%;
  background: rgba(255,255,255,.9); color: var(--ink);
  display: inline-flex; align-items: center; justify-content: center;
  backdrop-filter: blur(6px);
  transition: color var(--t-fast), background var(--t-fast);
}
.prod-card .wish:hover, .prod-card .wish.active { color: var(--red); }
.prod-card .badge-corner {
  position: absolute; top: 10px; left: 10px;
  background: var(--navy); color: #fff;
  font-size: 11px; font-weight: 700; letter-spacing: .04em;
  padding: 5px 10px; border-radius: var(--r-pill);
}
.prod-card .body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.prod-card .brand { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; font-weight: 600; }
.prod-card .name {
  font-size: 14.5px; font-weight: 600; color: var(--ink);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.8em;
}
.prod-card .name:hover { color: var(--blue); }
.prod-card .stars { font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.prod-card .stars i { color: var(--yellow); }
.prod-card .price-row { display: flex; align-items: baseline; gap: 8px; margin-top: auto; padding-top: 4px; flex-wrap: wrap; }
.prod-card .price { font-size: 17px; font-weight: 800; color: var(--ink); }
.prod-card .mrp   { font-size: 13px; color: var(--muted); text-decoration: line-through; }
.prod-card .off   { font-size: 12px; color: var(--green); font-weight: 700; }
.prod-card .add {
  margin-top: 10px; width: 100%; padding: 10px;
  border-radius: var(--r-pill); background: var(--navy); color: #fff;
  font-size: 13.5px; font-weight: 600;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  transition: background var(--t-fast);
}
.prod-card .add:hover { background: var(--blue); }

/* ============ Shop layout ============ */
.shop-layout {
  display: grid; grid-template-columns: 280px 1fr; gap: 28px;
  align-items: start;
}
@media (max-width: 920px) { .shop-layout { grid-template-columns: 1fr; } }

.filters {
  background: var(--card);
  border: 1px solid var(--line-soft);
  border-radius: var(--r-lg);
  padding: 20px;
  position: sticky; top: 96px;
}
.filters h4 {
  font-size: 12px; letter-spacing: .12em; text-transform: uppercase;
  color: var(--muted); margin: 0 0 10px;
}
.filter-block { padding: 14px 0; border-top: 1px solid var(--line-soft); }
.filter-block:first-of-type { border-top: none; padding-top: 0; }
.filter-block ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 6px; }
.filter-block label { display: flex; align-items: center; gap: 8px; cursor: pointer; font-size: 14px; color: var(--ink-2); }
.filter-block label:hover { color: var(--ink); }
.filter-block input[type=range] { width: 100%; accent-color: var(--blue); }
.filter-block .price-vals { display: flex; justify-content: space-between; font-size: 13px; color: var(--muted); margin-top: 6px; }

.shop-toolbar {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  margin-bottom: 18px; flex-wrap: wrap;
}
.shop-toolbar .count { color: var(--muted); font-size: 14px; }
.shop-toolbar select {
  padding: 9px 14px; border-radius: var(--r-pill);
  border: 1px solid var(--line); background: var(--bg);
  font-size: 14px; cursor: pointer;
}

.pagination {
  display: flex; justify-content: center; gap: 6px; margin-top: 36px; flex-wrap: wrap;
}
.pagination button {
  width: 38px; height: 38px; border-radius: 50%;
  background: var(--bg); border: 1px solid var(--line);
  font-weight: 600; font-size: 14px; color: var(--ink-2);
}
.pagination button:hover { background: var(--bg-alt); }
.pagination button.active { background: var(--navy); color: #fff; border-color: var(--navy); }
.pagination button:disabled { opacity: .4; cursor: not-allowed; }

/* ============ Product detail ============ */
.pd-grid {
  display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(24px, 4vw, 48px);
  align-items: start;
}
@media (max-width: 900px) { .pd-grid { grid-template-columns: 1fr; } }

.pd-gallery {
  display: grid; grid-template-columns: 80px 1fr; gap: 14px;
}
@media (max-width: 540px) { .pd-gallery { grid-template-columns: 1fr; } }
.pd-gallery .thumbs { display: flex; flex-direction: column; gap: 10px; }
@media (max-width: 540px) { .pd-gallery .thumbs { flex-direction: row; overflow-x: auto; } }
.pd-gallery .thumbs button {
  width: 80px; height: 80px; flex-shrink: 0;
  border-radius: 10px; overflow: hidden;
  border: 2px solid var(--line); padding: 0; background: var(--bg-alt);
  transition: border-color var(--t-fast);
}
.pd-gallery .thumbs button.active { border-color: var(--blue); }
.pd-gallery .thumbs img { width: 100%; height: 100%; object-fit: cover; }
.pd-gallery .main {
  background: var(--bg-alt); border-radius: var(--r-lg);
  aspect-ratio: 4 / 3; overflow: hidden; position: relative;
}
.pd-gallery .main img { width: 100%; height: 100%; object-fit: cover; }

.pd-info .brand { font-size: 13px; color: var(--blue); font-weight: 600; text-transform: uppercase; letter-spacing: .06em; margin-bottom: 6px; }
.pd-info h1 { font-size: clamp(1.4rem, 2.2vw, 1.9rem); margin: 0 0 12px; }
.pd-info .stars { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13px; margin-bottom: 18px; }
.pd-info .stars i { color: var(--yellow); }
.price-block { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 4px; }
.price-block .price { font-size: 28px; font-weight: 800; color: var(--ink); letter-spacing: -.01em; }
.price-block .mrp   { font-size: 16px; color: var(--muted); text-decoration: line-through; }
.price-block .off   { font-size: 14px; color: var(--green); font-weight: 700; }
.tax-line { font-size: 12px; color: var(--muted); margin-bottom: 16px; }

.qty-stepper {
  display: inline-flex; align-items: center;
  background: var(--bg-alt); border-radius: var(--r-pill); padding: 4px;
}
.qty-stepper button {
  width: 34px; height: 34px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: transparent; color: var(--ink);
}
.qty-stepper button:hover { background: var(--bg); }
.qty-stepper input {
  width: 44px; text-align: center; background: transparent; border: none;
  font-weight: 700; font-size: 15px;
}
.qty-stepper input::-webkit-inner-spin-button { display: none; }

.pd-actions { display: flex; gap: 10px; margin-top: 18px; flex-wrap: wrap; }
.pd-meta { display: flex; flex-direction: column; gap: 8px; margin-top: 22px; padding-top: 22px; border-top: 1px solid var(--line-soft); font-size: 14px; color: var(--ink-2); }
.pd-meta i { color: var(--blue); width: 18px; }

.emi-box {
  margin-top: 20px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  overflow: hidden;
}
.emi-box summary {
  padding: 14px 18px; cursor: pointer; font-weight: 600;
  display: flex; align-items: center; gap: 10px; list-style: none;
  background: var(--bg-alt);
}
.emi-box summary::-webkit-details-marker { display: none; }
.emi-box summary i { color: var(--blue); margin-left: auto; transition: transform var(--t); }
.emi-box[open] summary i { transform: rotate(180deg); }
.emi-body { padding: 18px; display: grid; grid-template-columns: 1fr 1fr; gap: 14px; align-items: end; }
@media (max-width: 540px) { .emi-body { grid-template-columns: 1fr; } }
.emi-result { background: var(--bg-alt); border-radius: var(--r); padding: 14px; }
.emi-result .v { font-size: 22px; font-weight: 800; color: var(--blue); }
.emi-result small { color: var(--muted); }

/* Tabs */
.tabs { margin-top: 60px; }
.tab-list {
  display: flex; gap: 4px; border-bottom: 1px solid var(--line);
  overflow-x: auto;
}
.tab-list button {
  padding: 14px 22px; font-size: 15px; font-weight: 600; color: var(--muted);
  border-bottom: 2px solid transparent; white-space: nowrap;
  transition: color var(--t-fast), border-color var(--t-fast);
}
.tab-list button:hover { color: var(--ink); }
.tab-list button.active { color: var(--blue); border-bottom-color: var(--blue); }
.tab-panel { display: none; padding: 28px 0; }
.tab-panel.active { display: block; }
.spec-table { width: 100%; border-collapse: collapse; }
.spec-table tr { border-bottom: 1px solid var(--line-soft); }
.spec-table td { padding: 12px 16px; font-size: 14px; }
.spec-table td:first-child { color: var(--muted); width: 32%; font-weight: 500; }
.spec-table td:last-child  { color: var(--ink); }

/* ============ Cart ============ */
.cart-layout {
  display: grid; grid-template-columns: 1.6fr 1fr; gap: 28px;
  align-items: start;
}
@media (max-width: 920px) { .cart-layout { grid-template-columns: 1fr; } }
.cart-list {
  background: var(--card); border: 1px solid var(--line-soft);
  border-radius: var(--r-lg); overflow: hidden;
}
.cart-row {
  display: grid; grid-template-columns: 90px 1fr auto auto auto;
  gap: 16px; align-items: center;
  padding: 16px;
  border-bottom: 1px solid var(--line-soft);
}
.cart-row:last-child { border-bottom: none; }
.cart-row img { width: 90px; height: 90px; object-fit: cover; border-radius: 10px; background: var(--bg-alt); }
.cart-row .name { font-weight: 600; color: var(--ink); font-size: 14.5px; line-height: 1.3; }
.cart-row .brand { font-size: 12px; color: var(--muted); margin-top: 2px; }
.cart-row .unit { font-size: 14px; color: var(--muted); }
.cart-row .total { font-weight: 700; font-size: 15px; color: var(--ink); min-width: 90px; text-align: right; }
.cart-row .remove {
  width: 32px; height: 32px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--muted);
}
.cart-row .remove:hover { color: var(--red); background: color-mix(in srgb, var(--red) 8%, transparent); }
@media (max-width: 640px) {
  .cart-row { grid-template-columns: 70px 1fr auto; grid-template-areas: "img info remove" "img qty total"; }
  .cart-row img { grid-area: img; width: 70px; height: 70px; }
  .cart-row .info { grid-area: info; }
  .cart-row .qty-stepper { grid-area: qty; }
  .cart-row .unit { display: none; }
  .cart-row .total { grid-area: total; }
  .cart-row .remove { grid-area: remove; }
}

.coupon-box {
  display: flex; gap: 8px; margin-top: 16px;
  padding: 16px;
  background: var(--card); border: 1px solid var(--line-soft);
  border-radius: var(--r-lg);
}
.coupon-box input { flex: 1; padding: 12px 16px; border: 1px solid var(--line); border-radius: var(--r-pill); }

.summary {
  background: var(--card); border: 1px solid var(--line-soft);
  border-radius: var(--r-lg); padding: 22px;
  position: sticky; top: 96px;
}
.summary h3 { margin-top: 0; font-size: 18px; }
.summary .line { display: flex; justify-content: space-between; padding: 8px 0; font-size: 14.5px; color: var(--ink-2); }
.summary .line.grand { font-size: 18px; font-weight: 800; color: var(--ink); border-top: 1px solid var(--line); margin-top: 6px; padding-top: 14px; }
.summary .line .free { color: var(--green); font-weight: 600; }

/* ============ Checkout ============ */
.checkout-layout {
  display: grid; grid-template-columns: 1.6fr 1fr; gap: 28px; align-items: start;
}
@media (max-width: 920px) { .checkout-layout { grid-template-columns: 1fr; } }
.pay-options { display: flex; flex-direction: column; gap: 10px; margin-top: 8px; }
.pay-opt {
  display: flex; gap: 12px; align-items: center;
  padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--r);
  cursor: pointer; transition: border-color var(--t-fast), background var(--t-fast);
}
.pay-opt:hover { border-color: var(--blue); }
.pay-opt input[type=radio] { accent-color: var(--blue); }
.pay-opt:has(input:checked) { border-color: var(--blue); background: color-mix(in srgb, var(--blue) 6%, transparent); }
.pay-opt i { color: var(--blue); font-size: 18px; width: 22px; }
.pay-opt b { font-size: 14.5px; }
.pay-opt small { color: var(--muted); display: block; }

.checkout-card {
  background: var(--card); border: 1px solid var(--line-soft);
  border-radius: var(--r-lg); padding: 24px;
  margin-bottom: 18px;
}
.checkout-card h3 { margin-top: 0; font-size: 17px; }
.summary-mini-row { display: flex; gap: 10px; padding: 8px 0; align-items: center; font-size: 14px; }
.summary-mini-row img { width: 44px; height: 44px; border-radius: 8px; object-fit: cover; }
.summary-mini-row .nm { flex: 1; line-height: 1.3; }
.summary-mini-row .qty { color: var(--muted); font-size: 12px; }
.summary-mini-row .pr { font-weight: 700; }

/* ============ Order success ============ */
.success-card {
  text-align: center; max-width: 620px; margin: 60px auto;
  padding: 48px 28px;
  background: var(--card); border: 1px solid var(--line-soft);
  border-radius: var(--r-xl); box-shadow: var(--shadow);
}
.success-card .check {
  width: 80px; height: 80px; border-radius: 50%;
  background: color-mix(in srgb, var(--green) 14%, transparent);
  color: var(--green); font-size: 36px;
  display: inline-flex; align-items: center; justify-content: center;
  margin-bottom: 18px;
}
.success-card .order-id {
  display: inline-block; background: var(--bg-alt); padding: 6px 14px;
  border-radius: var(--r-pill); font-family: ui-monospace, "SF Mono", monospace;
  margin-top: 8px; font-size: 14px;
}

/* ============ Account ============ */
.account-layout { display: grid; grid-template-columns: 260px 1fr; gap: 28px; align-items: start; }
@media (max-width: 820px) { .account-layout { grid-template-columns: 1fr; } }
.acc-side {
  background: var(--card); border: 1px solid var(--line-soft);
  border-radius: var(--r-lg); padding: 18px; position: sticky; top: 96px;
}
.acc-user { display: flex; gap: 12px; align-items: center; padding: 6px 8px 16px; border-bottom: 1px solid var(--line-soft); margin-bottom: 12px; }
.acc-user .av { width: 44px; height: 44px; border-radius: 50%; background: var(--blue); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; }
.acc-user b { display: block; font-size: 14.5px; }
.acc-user small { color: var(--muted); font-size: 12.5px; }
.acc-side nav a {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 12px; border-radius: 8px;
  color: var(--ink-2); font-size: 14.5px; font-weight: 500;
}
.acc-side nav a:hover { background: var(--bg-alt); color: var(--ink); }
.acc-side nav a.active { background: var(--navy); color: #fff; }
.acc-side nav a.active i { color: var(--yellow); }
.acc-side nav a i { width: 18px; color: var(--muted-2); }

.orders-table { width: 100%; border-collapse: collapse; background: var(--card); border: 1px solid var(--line-soft); border-radius: var(--r-lg); overflow: hidden; }
.orders-table th, .orders-table td { padding: 14px 16px; text-align: left; font-size: 14px; }
.orders-table thead { background: var(--bg-alt); }
.orders-table th { font-size: 12px; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.orders-table tr { border-top: 1px solid var(--line-soft); }
.status-pill { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: var(--r-pill); font-size: 12px; font-weight: 600; }
.status-pill.delivered { background: color-mix(in srgb, var(--green) 14%, transparent); color: var(--green); }
.status-pill.shipped   { background: color-mix(in srgb, var(--blue) 14%, transparent);  color: var(--blue); }
.status-pill.processing{ background: color-mix(in srgb, var(--yellow) 30%, transparent);color: #876d00; }

/* ============ Auth (login/register) ============ */
.auth-wrap {
  min-height: calc(100vh - 200px);
  display: grid; place-items: center;
  padding: 40px 20px;
  background: linear-gradient(135deg, #eaf1ff 0%, #f4f6fa 100%);
}
[data-theme="dark"] .auth-wrap { background: linear-gradient(135deg, #0f1a33, #0b1326); }
.auth-card {
  background: var(--card); border: 1px solid var(--line-soft);
  border-radius: var(--r-xl); box-shadow: var(--shadow-lg);
  padding: 36px 32px; width: 100%; max-width: 440px;
}
.auth-card h1 { font-size: 24px; margin-bottom: 8px; }
.auth-card .sub { color: var(--muted); font-size: 14px; margin-bottom: 22px; }
.auth-card .google {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  padding: 11px; width: 100%;
  border: 1px solid var(--line); border-radius: var(--r-pill); font-weight: 600; font-size: 14px;
  margin-top: 12px;
}
.auth-card .google:hover { background: var(--bg-alt); }
.auth-card .divider { display: flex; align-items: center; gap: 12px; margin: 18px 0; color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .08em; }
.auth-card .divider::before, .auth-card .divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.auth-card .alt { text-align: center; font-size: 14px; color: var(--muted); margin-top: 18px; }
.auth-card .alt a { color: var(--blue); font-weight: 600; }

/* ============ Page hero (category banners) ============ */
.cat-hero {
  background: linear-gradient(135deg, var(--navy), var(--blue));
  color: #fff; padding: clamp(40px, 6vw, 72px) 0;
  position: relative; overflow: hidden;
  border-radius: var(--r-xl); margin-top: 18px;
}
.cat-hero h1 { color: #fff; margin: 0 0 10px; }
.cat-hero p  { color: rgba(255,255,255,.85); margin: 0; max-width: 600px; }
.cat-hero .container { position: relative; z-index: 2; }
.cat-hero::after {
  content: ""; position: absolute; right: -120px; top: -100px;
  width: 380px; height: 380px; border-radius: 50%;
  background: radial-gradient(circle at center, rgba(247,216,64,.25), transparent 70%);
}

/* ============ About / Contact ============ */
.about-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(20px, 4vw, 56px); align-items: center; }
@media (max-width: 800px) { .about-grid { grid-template-columns: 1fr; } }
.about-grid img { border-radius: var(--r-xl); box-shadow: var(--shadow); aspect-ratio: 4/3; object-fit: cover; }

.team-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 18px; }
.team-card {
  background: var(--card); border: 1px solid var(--line-soft);
  border-radius: var(--r-lg); padding: 22px; text-align: center;
}
.team-card .av {
  width: 96px; height: 96px; border-radius: 50%;
  background: linear-gradient(135deg, var(--blue), var(--navy));
  color: #fff; font-weight: 800; font-size: 32px;
  display: inline-flex; align-items: center; justify-content: center;
  margin-bottom: 12px;
}
.team-card h4 { margin: 0; font-size: 16px; }
.team-card small { color: var(--muted); }

.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; align-items: start; }
@media (max-width: 820px) { .contact-grid { grid-template-columns: 1fr; } }
.contact-card {
  background: var(--card); border: 1px solid var(--line-soft);
  border-radius: var(--r-lg); padding: 24px;
}
.contact-info-row { display: flex; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--line-soft); }
.contact-info-row:last-child { border-bottom: none; }
.contact-info-row .ic { width: 42px; height: 42px; border-radius: 12px; background: color-mix(in srgb, var(--blue) 12%, transparent); color: var(--blue); display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.contact-info-row b { display: block; font-size: 14.5px; }
.contact-info-row small { color: var(--muted); }

.map-frame {
  width: 100%; aspect-ratio: 16/10;
  border-radius: var(--r-lg); border: 1px solid var(--line);
  overflow: hidden; margin-top: 18px;
}
.map-frame iframe { width: 100%; height: 100%; border: none; }

/* ============ Policies article ============ */
.policy-article {
  max-width: 820px; margin: 0 auto;
  background: var(--card); border: 1px solid var(--line-soft);
  border-radius: var(--r-lg); padding: clamp(28px, 4vw, 48px);
}
.policy-article h2 { margin-top: 28px; font-size: 1.3rem; }
.policy-article ul { color: var(--ink-2); }
.policy-article li { margin-bottom: 6px; }
