/* ultimabucata.ro – stiluri magazin */
:root {
  --text: #1f242d;
  --muted: #6b7280;
  --line: #e5e7eb;
  --bg: #f6f7f9;
  --card: #fff;
  --accent: #f25c05;
  --accent-dark: #c94a00;
  --dark: #1f242d;
  --green: #16a34a;
  --red: #dc2626;
  --radius: 10px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: Poppins, system-ui, -apple-system, Segoe UI, Roboto, sans-serif; color: var(--text); background: var(--bg); line-height: 1.55; font-size: 15px; }
a { color: inherit; }
img { max-width: 100%; height: auto; display: block; }
h1, h2, h3 { line-height: 1.25; }
.wrap { max-width: 1240px; margin: 0 auto; padding: 0 16px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
[hidden] { display: none !important; }

/* Bara de sus */
.topbar { background: var(--dark); color: #fff; text-align: center; font-size: 13px; padding: 8px 16px; }
.topbar a { text-decoration: none; }
.topbar a:hover { text-decoration: underline; }

/* Header */
.header { background: #fff; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
.header__row { display: flex; align-items: center; gap: 20px; padding-top: 12px; padding-bottom: 12px; }
.logo img { height: 48px; width: auto; }
.search { flex: 1; display: flex; max-width: 560px; border: 2px solid var(--accent); border-radius: 999px; overflow: hidden; background: #fff; }
.search input { flex: 1; border: 0; padding: 10px 16px; font: inherit; outline: none; min-width: 0; }
.search button { border: 0; background: var(--accent); color: #fff; padding: 0 18px; cursor: pointer; font-size: 16px; }
.search--inline { margin: 16px auto; }
.header__contact a { text-decoration: none; font-weight: 500; white-space: nowrap; }
.cart-link { position: relative; text-decoration: none; font-size: 24px; padding: 4px 8px; }
.cart-count { position: absolute; top: -4px; right: -6px; background: var(--accent); color: #fff; font-size: 11px; font-weight: 600; border-radius: 999px; min-width: 20px; height: 20px; display: grid; place-items: center; padding: 0 5px; }
.burger { display: none; border: 0; background: none; font-size: 24px; cursor: pointer; padding: 4px; }

/* Meniu */
.nav { border-top: 1px solid var(--line); }
.nav__list { display: flex; list-style: none; margin: 0 auto; gap: 4px; flex-wrap: wrap; }
.nav__item { position: relative; }
.nav__item > a { display: block; padding: 12px 14px; text-decoration: none; font-weight: 500; font-size: 14px; }
.nav__item > a:hover { color: var(--accent); }
.nav__item--hot > a { color: var(--accent); }
.nav__sub { display: none; position: absolute; left: 0; top: 100%; background: #fff; border: 1px solid var(--line); border-radius: 0 0 var(--radius) var(--radius); list-style: none; margin: 0; padding: 6px 0; min-width: 220px; box-shadow: 0 10px 20px rgba(0,0,0,.08); }
.nav__sub a { display: block; padding: 8px 16px; text-decoration: none; font-size: 14px; }
.nav__sub a:hover { background: var(--bg); color: var(--accent); }
.nav__item:hover .nav__sub, .nav__item:focus-within .nav__sub { display: block; }

.main { padding-top: 20px; padding-bottom: 48px; min-height: 50vh; }

/* Butoane */
.btn { display: inline-block; background: var(--accent); color: #fff; border: 0; border-radius: 999px; padding: 10px 22px; font: inherit; font-weight: 600; text-decoration: none; cursor: pointer; text-align: center; transition: background .15s; }
.btn:hover { background: var(--accent-dark); }
.btn--block { display: block; width: 100%; }
.btn--big { padding: 14px 28px; font-size: 16px; }
.btn--disabled { background: #d1d5db; color: #4b5563; cursor: default; }
.btn--disabled:hover { background: #d1d5db; }
.btn--ghost { background: transparent; color: var(--text); border: 1px solid var(--line); }
.btn[disabled] { opacity: .6; cursor: wait; }

/* Prima pagina */
.hero { display: grid; grid-template-columns: 1.4fr 1fr; gap: 24px; background: linear-gradient(120deg, #1f242d, #3a2a1f); color: #fff; border-radius: 16px; padding: 36px; margin-bottom: 24px; }
.hero h1 { font-size: 34px; margin: 0 0 12px; }
.hero p { opacity: .9; margin: 0 0 20px; }
.hero__perks { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; align-content: center; }
.hero__perks li { background: rgba(255,255,255,.08); border-radius: var(--radius); padding: 10px 14px; }
.cats { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 28px; }
.cats__item { background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 8px 16px; text-decoration: none; font-weight: 500; font-size: 14px; }
.cats__item:hover { border-color: var(--accent); color: var(--accent); }
.section-title { font-size: 22px; margin: 32px 0 16px; display: flex; align-items: baseline; gap: 12px; }
.section-title .more { font-size: 14px; font-weight: 500; color: var(--accent); text-decoration: none; margin-left: auto; }
.video__frame { position: relative; padding-top: 56.25%; border-radius: var(--radius); overflow: hidden; background: #000; max-width: 800px; }
.video__frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* Grila de produse */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 16px; }
.card { background: var(--card); border-radius: var(--radius); border: 1px solid var(--line); overflow: hidden; display: flex; flex-direction: column; transition: box-shadow .15s, transform .15s; }
.card:hover { box-shadow: 0 8px 24px rgba(0,0,0,.08); transform: translateY(-2px); }
.card__img { position: relative; display: block; aspect-ratio: 1; background: #fff; }
.card__img img { width: 100%; height: 100%; object-fit: contain; padding: 10px; }
.card--out .card__img img { opacity: .5; }
.card__body { padding: 12px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.card__name { text-decoration: none; font-size: 14px; font-weight: 500; flex: 1; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.card__name:hover { color: var(--accent); }
.card .btn { padding: 8px 12px; font-size: 14px; }
.badge { position: absolute; top: 10px; left: 10px; background: var(--red); color: #fff; font-size: 12px; font-weight: 600; padding: 3px 8px; border-radius: 6px; z-index: 1; }
.badge--last { left: auto; right: 10px; background: var(--accent); }
.price { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.price__now { font-weight: 700; font-size: 17px; color: var(--accent); }
.price__old { color: var(--muted); text-decoration: line-through; font-size: 13px; }
.price--big .price__now { font-size: 28px; }
.price--big .price__old { font-size: 16px; }
.save { background: #fee2e2; color: var(--red); font-size: 13px; font-weight: 600; padding: 2px 8px; border-radius: 6px; }
.empty { background: #fff; border-radius: var(--radius); padding: 32px; text-align: center; color: var(--muted); }

/* Liste */
.crumbs { font-size: 13px; color: var(--muted); margin-bottom: 12px; }
.crumbs a { text-decoration: none; }
.crumbs a:hover { color: var(--accent); }
.page-title { font-size: 28px; margin: 0 0 12px; }
.intro { color: var(--muted); margin-top: 0; }
.count { color: var(--muted); font-size: 13px; }
.subcats { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.subcats a { background: #fff; border: 1px solid var(--line); padding: 6px 14px; border-radius: 999px; text-decoration: none; font-size: 14px; }
.subcats a:hover { border-color: var(--accent); color: var(--accent); }

/* Pagina de produs */
.product { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; background: #fff; border-radius: 16px; padding: 24px; }
.gallery__main { position: relative; aspect-ratio: 1; border: 1px solid var(--line); border-radius: var(--radius); display: grid; place-items: center; overflow: hidden; }
.gallery__main img { width: 100%; height: 100%; object-fit: contain; }
.gallery__thumbs { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.gallery__thumbs button { border: 2px solid var(--line); border-radius: 8px; padding: 2px; background: #fff; cursor: pointer; width: 72px; height: 72px; }
.gallery__thumbs button.is-active { border-color: var(--accent); }
.gallery__thumbs img { width: 100%; height: 100%; object-fit: contain; }
.product__info h1 { font-size: 26px; margin: 0 0 6px; }
.sku { color: var(--muted); font-size: 13px; margin: 0 0 12px; }
.stock { font-weight: 600; margin: 12px 0; }
.stock--ok { color: var(--green); }
.stock--low { color: var(--accent); }
.stock--out { color: var(--red); }
.buy label { display: block; font-weight: 500; margin-bottom: 12px; }
.buy select { display: block; width: 100%; margin-top: 6px; padding: 10px; border: 1px solid var(--line); border-radius: 8px; font: inherit; }
.buy__row { display: flex; gap: 10px; }
.qty { width: 80px; padding: 10px; border: 1px solid var(--line); border-radius: 999px; font: inherit; text-align: center; }
.buy__row .btn { flex: 1; }
.perks { list-style: none; padding: 16px; margin: 20px 0 0; background: var(--bg); border-radius: var(--radius); display: grid; gap: 6px; font-size: 14px; }
.desc { background: #fff; border-radius: 16px; padding: 24px; margin-top: 20px; }
.desc h2 { margin-top: 0; }
.rich h3 { font-size: 18px; }
.rich ul { padding-left: 20px; }
.rich a { color: var(--accent); }

/* Pagini informatii */
.info-page { background: #fff; border-radius: 16px; padding: 28px; max-width: 900px; }
.info-page h2 { font-size: 20px; margin-top: 28px; }

/* Cos */
.cart { display: grid; grid-template-columns: 1fr 320px; gap: 24px; align-items: start; }
.cart__lines { background: #fff; border-radius: 16px; padding: 8px 20px; }
.line { display: grid; grid-template-columns: 72px 1fr auto auto auto; gap: 14px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--line); }
.line:last-child { border-bottom: 0; }
.line img { width: 72px; height: 72px; object-fit: contain; border: 1px solid var(--line); border-radius: 8px; }
.line__name { text-decoration: none; font-weight: 500; }
.line__var { font-size: 13px; color: var(--muted); }
.line__warn { font-size: 13px; color: var(--red); }
.line__qty { display: flex; align-items: center; border: 1px solid var(--line); border-radius: 999px; }
.line__qty button { border: 0; background: none; width: 32px; height: 32px; cursor: pointer; font-size: 16px; }
.line__qty span { min-width: 24px; text-align: center; }
.line__total { font-weight: 600; min-width: 90px; text-align: right; }
.line__rm { border: 0; background: none; color: var(--muted); cursor: pointer; font-size: 18px; }
.box-side { background: #fff; border-radius: 16px; padding: 20px; }
.summary { width: 100%; border-collapse: collapse; margin-bottom: 16px; font-size: 14px; }
.summary td { padding: 6px 0; vertical-align: top; }
.summary td:last-child { text-align: right; white-space: nowrap; padding-left: 10px; }
.summary__total td { font-weight: 700; font-size: 18px; border-top: 1px solid var(--line); padding-top: 10px; }

/* Comanda */
.checkout { display: grid; grid-template-columns: 1fr 360px; gap: 24px; align-items: start; }
.checkout__main, .checkout__side { background: #fff; border-radius: 16px; padding: 24px; }
.checkout__side { position: sticky; top: 140px; }
.checkout h2 { font-size: 18px; margin: 24px 0 12px; }
.checkout h2:first-child { margin-top: 0; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.field { display: block; margin-bottom: 14px; }
.field span { display: block; font-size: 14px; font-weight: 500; margin-bottom: 4px; }
.field input, .field select, .field textarea { width: 100%; padding: 10px 12px; border: 1px solid #d1d5db; border-radius: 8px; font: inherit; background: #fff; }
.field input:focus, .field select:focus, .field textarea:focus { outline: 2px solid var(--accent); border-color: transparent; }
.field--error input, .field--error select, .field--error textarea { border-color: var(--red); }
.field small, .err { color: var(--red); font-size: 13px; }
.radios { display: flex; gap: 20px; margin-bottom: 16px; flex-wrap: wrap; }
.options { display: grid; gap: 8px; }
.option { display: flex; align-items: center; gap: 10px; border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; cursor: pointer; }
.option:has(input:checked) { border-color: var(--accent); background: #fff7f2; }
.option span { flex: 1; }
.check { display: flex; gap: 8px; align-items: flex-start; font-size: 14px; margin: 12px 0; }
.check input { margin-top: 4px; }
.alert { background: #fee2e2; color: #991b1b; padding: 12px 16px; border-radius: 10px; margin-bottom: 16px; }
.alert--ok { background: #dcfce7; color: #166534; }
.thanks { background: #fff; border-radius: 16px; padding: 32px; max-width: 760px; margin: 0 auto; }
.thanks .summary { max-width: 520px; }

/* Contact */
.contact { display: grid; grid-template-columns: 1fr 320px; gap: 24px; align-items: start; }
.contact > div, .contact__info { background: #fff; border-radius: 16px; padding: 24px; }
.hp { position: absolute; left: -9999px; }

/* Subsol */
.footer { background: var(--dark); color: #d1d5db; padding: 40px 0 20px; font-size: 14px; }
.footer__cols { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.footer h4 { color: #fff; margin: 0 0 12px; font-size: 15px; }
.footer ul { list-style: none; padding: 0; margin: 0 0 16px; }
.footer li { margin-bottom: 6px; }
.footer a { text-decoration: none; }
.footer a:hover { color: #fff; text-decoration: underline; }
.social a { margin-right: 12px; }
.footer__legal { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; margin-top: 24px; padding-top: 20px; border-top: 1px solid #374151; }
.legal-badge { border: 1px solid #4b5563; border-radius: 8px; padding: 8px 12px; font-size: 13px; }
.pay-badges { margin-left: auto; font-size: 13px; }
.footer__copy { margin-top: 16px; font-size: 12px; color: #9ca3af; }

/* Notificare */
.toast { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); background: var(--dark); color: #fff; padding: 12px 20px; border-radius: 999px; z-index: 50; box-shadow: 0 8px 24px rgba(0,0,0,.2); font-size: 14px; max-width: calc(100% - 32px); }
.toast a { color: var(--accent); font-weight: 600; margin-left: 8px; }

/* Telefon */
@media (max-width: 900px) {
  .header__contact { display: none; }
  .burger { display: block; }
  .header__row { flex-wrap: wrap; gap: 10px; }
  .logo { margin-right: auto; }
  .logo img { height: 38px; }
  .search { order: 5; flex-basis: 100%; max-width: none; }
  .nav { display: none; }
  .nav.is-open { display: block; }
  .nav__list { flex-direction: column; padding: 8px 16px; }
  .nav__sub { display: block; position: static; box-shadow: none; border: 0; padding: 0 0 0 16px; }
  .hero { grid-template-columns: 1fr; padding: 24px; }
  .hero h1 { font-size: 26px; }
  .product, .cart, .checkout, .contact { grid-template-columns: 1fr; }
  .product { padding: 16px; gap: 20px; }
  .checkout__side { position: static; }
  .footer__cols { grid-template-columns: 1fr 1fr; }
  .pay-badges { margin-left: 0; }
}
@media (max-width: 560px) {
  .grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .card__body { padding: 10px; }
  .card__name { font-size: 13px; }
  .price__now { font-size: 15px; }
  .grid2 { grid-template-columns: 1fr; }
  .line { grid-template-columns: 56px 1fr auto; }
  .line img { width: 56px; height: 56px; }
  .line__total { grid-column: 2; text-align: left; }
  .line__qty { grid-column: 3; grid-row: 1; }
  .line__rm { grid-column: 3; }
  .footer__cols { grid-template-columns: 1fr; }
  .page-title { font-size: 22px; }
  .hero { padding: 20px; margin-bottom: 16px; }
  .hero h1 { font-size: 22px; }
  .hero p { font-size: 14px; margin-bottom: 14px; }
  .hero__perks { grid-template-columns: 1fr 1fr; gap: 6px; font-size: 12px; }
  .hero__perks li { padding: 8px; }
  .cats { flex-wrap: nowrap; overflow-x: auto; margin-bottom: 16px; padding-bottom: 4px; }
  .cats__item { white-space: nowrap; }
}

/* Cont client */
.account-link { text-decoration: none; font-weight: 500; white-space: nowrap; padding: 4px 6px; }
.account-link:hover { color: var(--accent); }
.install-btn { border: 1px solid var(--accent); color: var(--accent); background: #fff; border-radius: 999px; padding: 6px 12px; font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; white-space: nowrap; }
.install-btn:hover { background: #fff7f2; }
.account-note { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px; font-size: 14px; }
.account-note a { color: var(--accent); font-weight: 600; }
.auth, .account { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; align-items: start; }
.auth__box { background: #fff; border-radius: 16px; padding: 24px; }
.auth__box h2, .account h2 { margin-top: 0; font-size: 20px; }
.account .summary.orders td { padding: 8px 0; border-bottom: 1px solid var(--line); }
.account .summary.orders a { color: var(--accent); font-weight: 600; text-decoration: none; }
.head-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.install-help { background: var(--dark); color: #fff; border-radius: 12px; padding: 14px 16px; position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 60; max-width: 420px; margin: 0 auto; font-size: 14px; box-shadow: 0 8px 24px rgba(0,0,0,.25); }
.install-help button { float: right; background: none; border: 0; color: #fff; font-size: 18px; cursor: pointer; }
@media (max-width: 900px) {
  .auth, .account { grid-template-columns: 1fr; }
  .account-link span { display: none; }
  .install-btn { font-size: 12px; padding: 5px 9px; }
}
