:root {
  --coral: #ff4f40;
  --coral-dark: #e8432f;
  --navy: #091723;
  --body: #56606b;
  --mist: #eef0ec;
  --line: #e1e5e1;
  --green: #167747;
  --red: #b52b24;
  --display: "Anek Bangla", "Hind Siliguri", system-ui, sans-serif;
  --sans: "Hind Siliguri", "Noto Sans Bengali", system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; color: var(--navy); background: #fff; font: 16px/1.55 var(--sans); }
button, a { -webkit-tap-highlight-color: transparent; }
button { font: inherit; }
a { color: inherit; }
img { display: block; max-width: 100%; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--coral); outline-offset: 3px; }

.catalog-wrap { width: min(100%, 1180px); margin: 0 auto; padding-inline: 16px; }
.catalog-header { position: sticky; top: 0; z-index: 10; background: rgba(255, 255, 255, .95); border-bottom: 1px solid var(--line); backdrop-filter: blur(12px); }
.header-inner { min-height: 64px; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.catalog-brand { min-width: 0; display: flex; align-items: center; gap: 9px; text-decoration: none; }
.catalog-brand img { width: 40px; height: 40px; flex: none; }
.catalog-brand span { min-width: 0; display: flex; flex-direction: column; line-height: 1.05; }
.catalog-brand strong { overflow: hidden; font: 800 1.18rem var(--display); color: var(--coral); white-space: nowrap; text-overflow: ellipsis; }
.catalog-brand small { margin-top: 3px; color: var(--body); font-size: .69rem; }
.catalog-actions { display: flex; align-items: center; gap: 6px; flex: none; }
.language { display: flex; padding: 3px; border-radius: 999px; background: var(--mist); }
.language button { min-height: 34px; padding: 3px 9px; border: 0; border-radius: 999px; color: var(--body); background: transparent; font-size: .75rem; font-weight: 600; cursor: pointer; }
.language button[aria-pressed="true"] { color: var(--navy); background: #fff; box-shadow: 0 1px 3px rgba(9, 23, 35, .12); }
.home-link { display: none; padding: 8px 13px; border-radius: 999px; background: var(--navy); color: #fff; font-weight: 600; font-size: .85rem; text-decoration: none; }

.catalog-hero { padding: 32px 0 34px; color: #fff; background: var(--coral); }
.eyebrow { margin: 0 0 8px; font-size: .78rem; font-weight: 600; letter-spacing: .04em; opacity: .82; }
.catalog-hero h1 { max-width: 750px; margin: 0; font: 800 clamp(2.1rem, 11vw, 4.4rem)/1.02 var(--display); letter-spacing: -.025em; }
.catalog-hero p:not(.eyebrow) { max-width: 620px; margin: 14px 0 0; color: rgba(255, 255, 255, .92); }
.call-button { display: inline-flex; min-height: 46px; align-items: center; margin-top: 22px; padding: 0 20px; border-radius: 999px; background: var(--navy); color: #fff; font-weight: 600; text-decoration: none; }

.catalog-section { min-height: 55vh; padding: 34px 0 56px; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.section-heading h2 { margin: 0; font: 800 1.8rem/1.15 var(--display); }
.section-heading p { min-height: 1.3em; margin: 4px 0 0; color: var(--body); font-size: .86rem; }
.refresh-button { min-height: 40px; padding: 0 13px; border: 1px solid var(--line); border-radius: 999px; background: #fff; color: var(--navy); cursor: pointer; font-size: .82rem; font-weight: 600; }

.product-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.product-card { min-width: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 18px; background: #fff; box-shadow: 0 5px 18px rgba(9, 23, 35, .05); }
.product-media { display: grid; place-items: center; aspect-ratio: 1; padding: 9px; background: var(--mist); overflow: hidden; }
.product-media img { width: 100%; height: 100%; object-fit: contain; }
.product-body { padding: 12px; }
.product-name { min-height: 2.55em; margin: 0; overflow: hidden; font: 700 1rem/1.28 var(--display); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.product-meta { display: flex; flex-direction: column; align-items: flex-start; gap: 7px; margin-top: 10px; }
.product-price { font: 800 1.18rem/1 var(--display); color: var(--coral-dark); }
.stock { display: inline-flex; align-items: center; gap: 5px; padding: 3px 8px; border-radius: 999px; color: var(--green); background: #e5f6ed; font-size: .7rem; font-weight: 600; }
.stock::before { width: 6px; height: 6px; border-radius: 50%; background: currentColor; content: ""; }
.stock.out { color: var(--red); background: #ffe8e5; }

.product-skeleton { min-height: 250px; border-radius: 18px; background: linear-gradient(100deg, #edf0ed 20%, #f8f9f8 40%, #edf0ed 60%); background-size: 200% 100%; animation: shimmer 1.2s infinite linear; }
@keyframes shimmer { to { background-position-x: -200%; } }
.catalog-state { padding: 54px 20px; border-radius: 24px; background: var(--mist); text-align: center; }
.state-icon { font-size: 2rem; }
.catalog-state h2 { margin: 9px 0 4px; font: 700 1.4rem var(--display); }
.catalog-state p { max-width: 420px; margin: 0 auto; color: var(--body); }
.retry-button { min-height: 44px; margin-top: 18px; padding: 0 18px; border: 0; border-radius: 999px; background: var(--navy); color: #fff; cursor: pointer; font-weight: 600; }
.catalog-footer { padding: 28px 0; color: #fff; background: var(--navy); }
.footer-inner { display: flex; flex-direction: column; gap: 16px; }
.footer-inner p { margin: 0; color: rgba(255, 255, 255, .72); font-size: .86rem; }
.footer-inner strong { color: #fff; font: 700 1.05rem var(--display); }

@media (max-width: 350px) {
  .product-grid { grid-template-columns: 1fr; }
  .product-name { min-height: 0; }
}

@media (min-width: 600px) {
  .catalog-wrap { padding-inline: 24px; }
  .home-link { display: inline-flex; }
  .catalog-hero { padding: 50px 0; }
  .product-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
  .product-body { padding: 16px; }
  .product-meta { flex-direction: row; align-items: center; justify-content: space-between; }
  .footer-inner { flex-direction: row; justify-content: space-between; align-items: end; }
}

@media (min-width: 960px) {
  .product-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (prefers-reduced-motion: reduce) {
  .product-skeleton { animation: none; }
}
