/* public/assets/css/style.css
   Modern e-commerce layout: hero left / promos right, product cards, grids, promo band, categories, footer.
   Single-file responsive stylesheet (updated).
*/

:root{
  --bg: #ffffff;
  --muted: #667085;
  --accent: #f36b68;
  --accent-dark: #e05550;
  --card: #ffffff;
  --border: #eef3f8;
  --text: #0b1225;
  --radius: 12px;
  --wrap: 1180px;
  --shadow: 0 6px 20px rgba(11,20,50,0.06);
  --gap-lg: 24px;
  --gap-md: 16px;
  --gap-sm: 12px;
  font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial;
  color-scheme: light;
}

/* reset / base */
* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; background: var(--bg); color: var(--text); -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 28px; }

/* header */
.site-header { background: #fff; border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 90; }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 10px 0; }
.logo { height: 36px; display: block; }
.main-nav ul { list-style: none; display: flex; gap: 18px; margin: 0; padding: 0; align-items: center; }
.main-nav a { color: var(--text); padding: 8px 10px; border-radius: 8px; display: inline-block; font-weight: 600; font-size: 14px; }
.main-nav a:hover, .main-nav a:focus { background: #f6f8fb; outline: none; }
.has-dropdown { position: relative; }
.has-dropdown .dropdown { position: absolute; left: 0; top: calc(100% + 8px); background: #fff; border: 1px solid var(--border); padding: 8px; border-radius: 8px; display: none; min-width: 220px; box-shadow: var(--shadow); z-index: 50; }
.has-dropdown:hover .dropdown, .has-dropdown:focus-within .dropdown { display: block; }
.dropdown li { padding: 6px 0; }
.header-actions { display: flex; align-items: center; gap: 10px; }
.search-form input[type="search"] { padding: 8px 12px; border-radius: 22px; border: 1px solid var(--border); min-width: 220px; }

/* HERO */
/* Use fluid typography for hero title and keep layout flexible */
.hero { padding-top: 26px; padding-bottom: 26px; }
.hero-inner { display: grid; grid-template-columns: 1fr 420px; gap: var(--gap-lg); align-items: stretch; }
@media (max-width: 1200px) { .hero-inner { grid-template-columns: 1fr 380px; } }
@media (max-width: 1000px) { .hero-inner { grid-template-columns: 1fr 340px; } }
@media (max-width: 820px) { .hero-inner { grid-template-columns: 1fr; } }

.hero-left {
  padding: 36px;
  border-radius: 16px;
  background: linear-gradient(180deg,#f6fcf9,#eef6f2);
  min-height: 360px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 12px;
}
.hero-left .eyebrow { color: var(--accent-dark); font-weight: 700; margin-bottom: 4px; font-size: 14px; letter-spacing: .2px; }
.hero-left h1 { font-size: clamp(24px, 4.2vw, 42px); margin: 6px 0 12px; line-height: 1.04; }
.hero-left .lead { color: var(--muted); line-height: 1.5; margin-bottom: 18px; font-size: clamp(14px, 1.3vw, 16px); }
.hero-left .btn { display: inline-block; padding: 12px 20px; border-radius: 999px; font-weight: 700; }

.btn-primary { background: #4a63ec; color: #fff; border: 0; }
.btn-outline { background: #fff; border: 2px solid #fff; color: #111; padding: 12px 18px; border-radius: 999px; }

/* hero-right */
.hero-right { display: flex; flex-direction: column; gap: 12px; align-items: stretch; }
.promo.large { background: #fff; border-radius: 12px; padding: 8px; display: flex; align-items: center; justify-content: center; min-height: 260px; border: 1px solid var(--border); }
.promo.large img { max-width: 100%; max-height: 240px; object-fit: contain; }
.promo-stack { display: grid; grid-template-columns: 1fr; gap: 12px; }
.promo.small { display: flex; gap: 12px; align-items: center; background: #fff; border-radius: 12px; padding: 10px; border: 1px solid var(--border); position: relative; }
.promo.small img { width: 80px; height: 80px; object-fit: cover; border-radius: 8px; }
.promo .meta { font-size: 13px; }

/* DEALS GRID */
.deals { padding-top: 8px; padding-bottom: 6px; }
.deals h2 { font-size: clamp(18px, 2.8vw, 28px); text-align: center; margin-bottom: 18px; }
.grid-deals { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.deal-card { background: var(--card); border-radius: 12px; padding: 12px; border: 1px solid var(--border); box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 10px; }
.deal-card .deal-thumb img { width: 100%; height: 140px; object-fit: contain; border-radius: 8px; }
.deal-card h3 { font-size: 14px; margin: 6px 0 0; }
.deal-card .price { font-weight: 700; color: var(--accent-dark); }

/* PROMO BAND */
.promo-band { background: linear-gradient(90deg,#fff3f2,#fff7f7); padding: 36px 0; border-radius: 16px; margin: 24px 0; }
.promo-content { text-align: center; }
.promo-content h3 { font-size: clamp(20px, 3.2vw, 36px); margin: 0; }
.promo-content p { color: var(--muted); margin: 6px 0 12px; }

/* CATEGORIES */
.trending-cats { padding-top: 6px; padding-bottom: 6px; }
.trending-cats h2 { text-align: center; margin-bottom: 16px; font-size: clamp(16px,2.2vw,20px); }
.cats-row { display: flex; gap: 18px; justify-content: center; flex-wrap: wrap; }
.cat-card { width: 160px; text-align: center; padding: 18px; border-radius: 12px; border: 1px solid var(--border); background: #fff; text-decoration: none; color: inherit; display: block; }
.cat-card img { width: 88px; height: 88px; object-fit: cover; border-radius: 8px; margin: 0 auto 8px; }
.cat-name { font-weight: 600; font-size: 14px; }

/* PRODUCTS GRID */
.products-grid h2 { margin-bottom: 12px; font-size: clamp(18px, 2.4vw, 22px); text-align: left; }
.grid-items { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.product-card { background: #fff; border-radius: 12px; border: 1px solid var(--border); overflow: hidden; padding: 10px; box-shadow: var(--shadow); color: inherit; display: block; transition: transform .12s ease, box-shadow .12s ease; text-decoration: none; min-height: 320px; }
.product-card:hover, .product-card:focus-within { transform: translateY(-6px); box-shadow: 0 18px 40px rgba(11,20,50,0.08); }
.thumb { height: 200px; display: flex; align-items: center; justify-content: center; background: linear-gradient(180deg,#fff,#fbfdff); border-radius: 8px; overflow: hidden; }
.thumb img { max-width: 100%; max-height: 100%; object-fit: contain; }
.product-card .title { font-weight: 600; margin: 10px 0 6px; font-size: 15px; }
.product-card .price { color: var(--accent-dark); font-weight: 700; font-size: 15px; margin-bottom: 8px; }

/* floating cart button and badge (ensure large enough touch target) */
.floating-cart, .floating-cart button { display: inline-flex; align-items: center; justify-content: center; width: 48px; height: 48px; border-radius: 50%; }
.cart-badge { position: absolute; right: 8px; top: 8px; min-width: 22px; padding: 2px 6px; border-radius: 999px; background: #00eaff; color: #00121a; font-weight: 700; font-size: 12px; display: none; align-items: center; justify-content: center; z-index: 45; box-shadow: 0 6px 18px rgba(0,234,255,0.08); }

/* small utility classes */
.wrap.page-section { padding-top: 20px; padding-bottom: 40px; }
.grid { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }

.section-title { font-size: 18px; font-weight: 700; margin-bottom: 12px; color: var(--text); }
.small-muted { color: var(--muted); font-size: 13px; }

/* footer */
.site-footer { background: #0b0b0d; color: #fff; padding: 36px 0; margin-top: 36px; }
.footer-inner { display: flex; gap: 30px; align-items: flex-start; }
.site-footer .col { flex: 1; min-width: 180px; }
.site-footer h4 { margin-bottom: 8px; color: #fff; }
.site-footer a { color: #fff; text-decoration: none; opacity: 0.95; }
.site-footer .newsletter input { padding: 12px; border-radius: 999px; border: 0; margin-right: 8px; width: clamp(160px, 28vw, 360px); }

/* focus and accessibility styles */
a:focus, button:focus, input:focus, select:focus, textarea:focus { outline: 3px solid rgba(74,99,236,0.12); outline-offset: 3px; }
button { cursor: pointer; }

/* responsive breakpoints */
@media (max-width: 1100px) {
  .hero-inner { grid-template-columns: 1fr 320px; gap: 18px; }
  .grid-deals { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
  .grid-items { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
  .grid { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
  .footer-inner { flex-direction: column; gap: 18px; }
}

@media (max-width: 820px) {
  .wrap { padding: 18px; }
  .hero-inner { grid-template-columns: 1fr; gap: 14px; }
  .hero-right { order: 2; }
  .grid-deals { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
  .grid-items { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
  .grid { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
  .main-nav { display: none; }
  .search-form input[type="search"] { min-width: 120px; }
  .hero-left { padding: 24px; min-height: auto; }
  .product-card { min-height: auto; padding-bottom: 18px; }
}

@media (max-width: 480px) {
  .grid-deals { grid-template-columns: 1fr; gap: 12px; }
  .grid-items { grid-template-columns: 1fr; gap: 12px; }
  .grid { grid-template-columns: 1fr; gap: 12px; }
  .hero-left h1 { font-size: 28px; }
  .header-inner { padding: 8px 10px; }
  .logo { height: 30px; }
  .wrap { padding: 12px; }
  .thumb { height: 180px; }
  .promo.large { min-height: 180px; padding: 10px; }
  .promo.small img { width: 64px; height: 64px; }
  .cat-card { width: 140px; padding: 12px; }
}

/* reduce motion */
@media (prefers-reduced-motion: reduce) {
  .product-card, .deal-card { transition: none; transform: none; }
}

/* small fixes: ensure cards and images never overflow, and keep consistent border radii */
.product-card img, .deal-card img, .cat-card img, .promo.large img { border-radius: 8px; max-width: 100%; height: auto; object-fit: contain; }

/* helpful utilities */
.text-center { text-align: center; }
.hidden { display: none !important; }
.visible { display: block !important; }
