* { box-sizing: border-box; margin: 0; padding: 0; min-width: 0; }
html, body { overflow-x: hidden; max-width: 100vw; }

:root {
    --navy: #131921;       /* top bar */
    --navy2: #232f3e;      /* sub bar */
    --navy3: #37475a;      /* hover */
    --orange: #febd69;     /* search btn */
    --yellow: #ffd814;     /* add to cart */
    --yellow-d: #f7ca00;
    --buy: #ffa41c;        /* buy now */
    --buy-d: #fa8900;
    --link: #007185;       /* teal link */
    --link-h: #c7511f;
    --price-red: #cc0c39;  /* deal red */
    --price: #0f1111;
    --star: #de7921;
    --green: #007600;
    --ink: #0f1111;
    --gray-700: #565959;
    --gray-500: #6f7373;
    --line: #d5d9d9;
    --line-2: #e7e7e7;
    --bg: #eaeded;
    --white: #fff;
    --radius: 8px;
    --shadow: 0 2px 5px rgba(15,17,17,.15);

    /* legacy aliases (used by checkout.css / checkout.html) */
    --red: #e77600;
    --red-dark: #c45500;
    --black: #131921;
    --gray-900: #0f1111;
    --gray-300: #d5d9d9;
    --gray-100: #f0f2f2;
    --gray-50: #f7f8f8;
}

/* generic button system (checkout CTA + modals) */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 0 24px;
    height: 48px;
    border-radius: 8px;
    font-weight: 500;
    font-size: 15px;
    color: var(--ink);
    border: 1px solid transparent;
    transition: background .12s, filter .12s;
    white-space: nowrap;
    cursor: pointer;
}
.btn--primary { background: var(--yellow); border-color: #fcd200; color: var(--ink); }
.btn--primary:hover { background: var(--yellow-d); }
.btn--block { width: 100%; }
.btn--big { height: 56px; font-size: 16px; border-radius: 8px; }

body {
    font-family: "Amazon Ember", Arial, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: var(--ink);
    background: var(--white);
    line-height: 1.45;
    -webkit-font-smoothing: antialiased;
    font-size: 14px;
}

a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; background: none; border: none; color: inherit; }
img { display: block; max-width: 100%; }

.container { max-width: 1400px; margin: 0 auto; padding: 0 22px; }

/* ============ HEADER ============ */
.az-header { position: sticky; top: 0; z-index: 100; }

.az-top {
    background: var(--navy);
    color: var(--white);
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 0 14px;
    height: 60px;
}

/* logo */
.az-logo {
    display: flex;
    align-items: flex-end;
    padding: 8px 9px 12px;
    border: 1px solid transparent;
    border-radius: 2px;
    position: relative;
    flex-shrink: 0;
}
.az-logo:hover { border-color: var(--white); }
.az-logo__word {
    font-size: 26px;
    font-weight: 700;
    letter-spacing: -1px;
    line-height: .7;
    color: var(--white);
}
.az-logo__smile {
    position: absolute;
    width: 56px;
    height: 14px;
    left: 16px;
    bottom: 6px;
}
.az-logo__tld {
    font-size: 13px;
    font-weight: 700;
    color: var(--orange);
    margin-left: 1px;
    line-height: 1;
    padding-bottom: 2px;
}

/* deliver to */
.az-deliver {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 8px 9px;
    border: 1px solid transparent;
    border-radius: 2px;
    color: #ccc;
    flex-shrink: 0;
}
.az-deliver:hover { border-color: var(--white); }
.az-deliver svg { margin-bottom: -6px; }
.az-deliver small { display: block; font-size: 12px; color: #ccc; }
.az-deliver b { display: block; font-size: 14px; color: var(--white); }

/* search */
.az-search {
    flex: 1;
    display: flex;
    height: 40px;
    border-radius: 4px;
    overflow: hidden;
    min-width: 0;
}
.az-search:focus-within { box-shadow: 0 0 0 3px var(--orange); }
.az-search__cat {
    background: #e6e6e6;
    color: #555;
    border: none;
    padding: 0 8px;
    font-size: 12px;
    max-width: 150px;
    cursor: pointer;
    border-right: 1px solid #cdcdcd;
}
.az-search__input {
    flex: 1;
    border: none;
    padding: 0 12px;
    font-size: 15px;
    color: #111;
    outline: none;
    min-width: 0;
}
.az-search__btn {
    background: var(--orange);
    width: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.az-search__btn:hover { background: #f3a847; }

/* right links */
.az-link {
    display: block;
    padding: 6px 9px;
    border: 1px solid transparent;
    border-radius: 2px;
    color: var(--white);
    flex-shrink: 0;
    line-height: 1.25;
}
.az-link:hover { border-color: var(--white); }
.az-link small { display: block; font-size: 12px; color: #ddd; }
.az-link b { display: block; font-size: 14px; font-weight: 700; }
.az-lang { display: flex; align-items: center; gap: 4px; font-weight: 700; }
.az-flag { font-size: 16px; }

.az-cart {
    display: flex;
    align-items: flex-end;
    gap: 2px;
    padding: 6px 9px;
    border: 1px solid transparent;
    border-radius: 2px;
    color: var(--white);
    position: relative;
    flex-shrink: 0;
}
.az-cart:hover { border-color: var(--white); }
.az-cart b { font-size: 14px; font-weight: 700; padding-bottom: 3px; }
.az-cart__count {
    position: absolute;
    top: -2px;
    left: 22px;
    color: var(--buy);
    font-size: 16px;
    font-weight: 700;
    min-width: 18px;
    text-align: center;
}

/* sub nav */
.az-sub {
    background: var(--navy2);
    color: var(--white);
    display: flex;
    align-items: center;
    gap: 4px;
    height: 39px;
    padding: 0 8px;
    font-size: 14px;
    overflow-x: auto;
    scrollbar-width: none;
}
.az-sub::-webkit-scrollbar { display: none; }
.az-sub__menu {
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 700;
    color: var(--white);
    padding: 8px 9px;
    border: 1px solid transparent;
    border-radius: 2px;
    white-space: nowrap;
}
.az-sub a {
    padding: 8px 9px;
    border: 1px solid transparent;
    border-radius: 2px;
    white-space: nowrap;
    color: var(--white);
}
.az-sub__menu:hover, .az-sub a:hover { border-color: var(--white); }
.az-sub__promo { margin-left: auto; padding: 0 9px; color: var(--orange); font-weight: 700; white-space: nowrap; }

/* ============ BREADCRUMBS ============ */
.breadcrumbs { background: var(--white); padding: 10px 0; font-size: 12px; color: var(--gray-500); }
.breadcrumbs a { color: var(--link); }
.breadcrumbs a:hover { color: var(--link-h); text-decoration: underline; }
.breadcrumbs span { margin: 0 6px; color: var(--gray-500); }
.breadcrumbs__current { color: var(--gray-500) !important; }

main.container { background: var(--white); }

/* ============ PRODUCT ============ */
.product {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 1.4fr) 300px;
    gap: 28px;
    padding: 12px 0 28px;
    border-bottom: 1px solid var(--line-2);
}

/* gallery */
.product__gallery { display: flex; gap: 12px; }
.gallery__thumbs {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 48px;
    flex-shrink: 0;
}
.thumb {
    width: 48px;
    height: 48px;
    border: 1px solid var(--line);
    border-radius: 8px;
    overflow: hidden;
    padding: 4px;
    background: var(--white);
    transition: border-color .12s, box-shadow .12s;
}
.thumb img { width: 100%; height: 100%; object-fit: contain; }
.thumb:hover { border-color: var(--star); }
.thumb.active { border-color: var(--link); border-width: 2px; box-shadow: 0 0 0 2px rgba(0,113,133,.25); }

.gallery__main {
    flex: 1;
    position: relative;
    background: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 1 / 1;
}
.gallery__main img { width: 100%; height: 100%; object-fit: contain; }

/* center info */
.product__info { min-width: 0; }
.az-store-link { color: var(--link); font-size: 13px; }
.az-store-link:hover { color: var(--link-h); text-decoration: underline; }

.product__title {
    font-size: 22px;
    font-weight: 500;
    line-height: 1.3;
    margin: 4px 0 8px;
    color: var(--ink);
}

.rating { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.rating__num { font-size: 14px; color: var(--link); }
.stars { display: flex; }
.stars svg { fill: var(--star); }
.rating__count { color: var(--link); font-size: 14px; }
.rating__count:hover { color: var(--link-h); text-decoration: underline; }

.az-bestseller { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.az-bestseller__badge {
    background: var(--buy);
    color: var(--ink);
    font-size: 11px;
    font-weight: 700;
    padding: 3px 8px 3px 10px;
    border-radius: 0 4px 4px 0;
    position: relative;
}
.az-bestseller__badge::before {
    content: "";
    position: absolute;
    left: -7px; top: 0; bottom: 0;
    border-style: solid;
    border-width: 11px 7px 11px 0;
    border-color: transparent var(--buy) transparent transparent;
}
.az-link-teal { color: var(--link); font-size: 12px; }
.az-link-teal:hover { color: var(--link-h); text-decoration: underline; }

.az-hr { border: none; border-top: 1px solid var(--line-2); margin: 12px 0; }

.az-deal-row { display: flex; align-items: center; gap: 10px; margin-bottom: 4px; }
.az-deal-tag {
    background: var(--price-red);
    color: var(--white);
    font-size: 12px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 3px;
}
.az-deal-pct { color: var(--price-red); font-size: 22px; font-weight: 400; }

.price-block { margin-bottom: 2px; }
.price-current { color: var(--price); display: inline-flex; align-items: flex-start; }
.price-cur__sym { font-size: 14px; margin-top: 4px; }
.price-cur__int { font-size: 30px; font-weight: 400; line-height: 1; }
.price-cur__frac { font-size: 14px; margin-top: 4px; }

.price-old-row { font-size: 13px; color: var(--gray-700); margin-bottom: 2px; }
.price-old { text-decoration: line-through; }
.az-lowprice { font-size: 12px; color: var(--gray-500); }

/* options */
.options { margin: 4px 0; }
.options__label { font-size: 14px; font-weight: 700; margin-bottom: 10px; }
.options__selected { font-weight: 400; color: var(--gray-700); }
.options__group { display: flex; flex-wrap: wrap; gap: 8px; }
.opt {
    position: relative;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 8px 14px;
    cursor: pointer;
    min-width: 96px;
    transition: border-color .12s, box-shadow .12s;
    background: var(--white);
}
.opt:hover { border-color: var(--star); }
.opt.active { border-color: var(--link); box-shadow: 0 0 0 1px var(--link); }
.opt input { position: absolute; opacity: 0; }
.opt__title { display: block; font-size: 13px; font-weight: 700; color: var(--link); margin-bottom: 2px; }
.opt.active .opt__title { color: var(--ink); }
.opt__price { display: block; font-size: 12px; color: var(--gray-700); }

.az-section-title { font-size: 18px; font-weight: 700; margin-bottom: 8px; }
.az-bullets { list-style: disc; padding-left: 20px; }
.az-bullets li { font-size: 14px; margin-bottom: 6px; color: var(--ink); }

/* ============ BUY BOX ============ */
.product__buybox { min-width: 0; }
.buybox {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 16px 18px;
    position: sticky;
    top: 110px;
}
.buybox__price { color: var(--price); display: flex; align-items: flex-start; margin-bottom: 10px; }
.buybox__price .price-cur__int { font-size: 28px; }

.buybox__delivery { font-size: 14px; margin-bottom: 4px; }
.buybox__delivery b { color: var(--ink); }
.buybox__fast { font-size: 13px; color: var(--gray-700); margin-bottom: 6px; }
.buybox__fast b { color: var(--green); }
.buybox__loc { font-size: 13px; color: var(--link); display: flex; align-items: center; gap: 4px; margin-bottom: 12px; }

.buybox__stock { color: var(--green); font-size: 18px; font-weight: 500; margin-bottom: 14px; }

.buybox__qty { display: block; font-size: 13px; margin-bottom: 12px; }
.buybox__qty select {
    display: block;
    margin-top: 4px;
    width: 90px;
    height: 33px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: linear-gradient(#fff, #eef0f2);
    padding: 0 8px;
    font-size: 13px;
    cursor: pointer;
    box-shadow: 0 1px 2px rgba(15,17,17,.08);
}

/* amazon buttons */
.az-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 40px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    color: var(--ink);
    border: 1px solid;
    transition: filter .12s, background .12s;
    margin-bottom: 10px;
}
.az-btn--cart { background: var(--yellow); border-color: #fcd200; }
.az-btn--cart:hover { background: var(--yellow-d); }
.az-btn--buy { background: var(--buy); border-color: #ff8f00; }
.az-btn--buy:hover { background: var(--buy-d); }
.btn--block { width: 100%; }

.buybox__secure { font-size: 12px; color: var(--link); display: flex; align-items: center; gap: 5px; margin-bottom: 14px; }

.buybox__meta { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; font-size: 13px; margin-bottom: 14px; }
.buybox__meta dt { color: var(--gray-700); }
.buybox__meta dd { color: var(--link); }

.buybox__gift { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--ink); padding-top: 12px; border-top: 1px solid var(--line-2); }

/* ============ TABS ============ */
.tabs { margin: 28px 0; }
.tabs__nav {
    display: flex;
    border-bottom: 1px solid var(--line);
    overflow-x: auto;
    scrollbar-width: none;
}
.tabs__nav::-webkit-scrollbar { display: none; }
.tab {
    padding: 12px 22px;
    font-weight: 700;
    font-size: 15px;
    color: var(--link);
    border-bottom: 3px solid transparent;
    transition: all .12s;
    white-space: nowrap;
}
.tab:hover { color: var(--link-h); }
.tab.active { color: var(--ink); border-bottom-color: var(--buy); }
.tabs__body { padding: 24px 0; }
.tab-pane { display: none; }
.tab-pane.active { display: block; animation: fade .25s ease; }
@keyframes fade { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

.tab-pane h2 { font-size: 21px; font-weight: 700; margin-bottom: 14px; }
.lead { font-size: 15px; color: var(--ink); margin-bottom: 22px; max-width: 820px; }

.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 22px; }
.feature { padding: 18px; background: #f7f8f8; border: 1px solid var(--line-2); border-radius: var(--radius); transition: box-shadow .12s; }
.feature:hover { box-shadow: var(--shadow); }
.feature__icon { font-size: 26px; margin-bottom: 8px; }
.feature h3 { font-size: 15px; margin-bottom: 6px; }
.feature p { color: var(--gray-700); font-size: 13.5px; }

.warning { padding: 13px 16px; background: #fef8e7; border-left: 4px solid var(--buy); border-radius: 4px; font-size: 14px; }

.specs { width: 100%; border-collapse: collapse; max-width: 760px; }
.specs tr { border-bottom: 1px solid var(--line-2); }
.specs td { padding: 10px 16px; font-size: 14px; }
.specs td:first-child { color: var(--gray-700); width: 40%; font-weight: 700; }
.specs tr:nth-child(odd) { background: #f7f8f8; }

.weight-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; margin-top: 18px; max-width: 760px; }
.weight { padding: 14px; background: #f0f2f2; border: 1px solid var(--line-2); border-radius: 8px; text-align: center; font-weight: 700; font-size: 15px; transition: all .12s; }
.weight:hover { border-color: var(--buy); }
.weight--max { background: var(--buy); color: var(--ink); border-color: var(--buy-d); }

.delivery-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; max-width: 900px; }
.delivery-card { padding: 18px; background: #f7f8f8; border: 1px solid var(--line-2); border-radius: var(--radius); }
.delivery-card h3 { font-size: 16px; margin-bottom: 8px; }
.delivery-card p { color: var(--gray-700); font-size: 14px; }

/* ============ FOOTER ============ */
.footer { margin-top: 32px; }
.footer__top {
    display: block;
    background: var(--navy3);
    color: var(--white);
    text-align: center;
    padding: 15px;
    font-size: 13px;
}
.footer__top:hover { background: #485769; }
.footer__inner {
    background: var(--navy2);
    color: var(--white);
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 40px;
    padding-top: 36px;
    padding-bottom: 36px;
    max-width: none;
}
.footer__inner > div { max-width: 1400px; }
.footer h4 { color: var(--white); font-size: 15px; margin-bottom: 12px; }
.footer a { display: block; margin-bottom: 8px; color: #ddd; font-size: 13px; }
.footer a:hover { text-decoration: underline; }
.footer p { font-size: 13px; color: #999; }
.footer__bottom {
    background: var(--navy);
    color: #999;
    text-align: center;
    padding: 26px 16px;
    font-size: 12px;
}
.az-logo--footer { display: inline-flex; padding: 0; margin-bottom: 10px; }
.az-logo--footer:hover { border-color: transparent; }
.footer__bottom .az-logo__word { font-size: 22px; }

/* center footer columns content */
.footer__inner { padding-left: 0; padding-right: 0; }
.footer__inner { justify-content: center; }

/* ============ TOAST ============ */
.toast {
    position: fixed;
    bottom: 32px;
    left: 50%;
    transform: translateX(-50%) translateY(80px);
    background: var(--ink);
    color: var(--white);
    padding: 13px 22px;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0,0,0,.25);
    opacity: 0;
    transition: all .25s;
    z-index: 400;
    font-weight: 500;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ============ CART DRAWER ============ */
.icon-btn {
    width: 38px; height: 38px; border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 18px; color: var(--ink);
}
.icon-btn:hover { background: #f0f2f2; }

.cart-drawer { position: fixed; inset: 0; z-index: 300; pointer-events: none; }
.cart-drawer.open { pointer-events: auto; }
.cart-drawer__overlay { position: absolute; inset: 0; background: rgba(15,17,17,.5); opacity: 0; transition: opacity .2s; }
.cart-drawer.open .cart-drawer__overlay { opacity: 1; }
.cart-drawer__panel {
    position: absolute; right: 0; top: 0; bottom: 0;
    width: 400px; max-width: 100vw;
    background: var(--white);
    transform: translateX(100%);
    transition: transform .25s;
    display: flex; flex-direction: column;
}
.cart-drawer.open .cart-drawer__panel { transform: translateX(0); }
.cart-drawer__header { display: flex; align-items: center; justify-content: space-between; padding: 18px 20px; border-bottom: 1px solid var(--line); }
.cart-drawer__header h3 { font-size: 18px; }
.cart-drawer__body { flex: 1; overflow-y: auto; padding: 14px 20px; }
.cart-empty { color: var(--gray-500); text-align: center; padding: 40px 0; }
.cart-item { display: flex; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--line-2); }
.cart-item__img { width: 64px; height: 64px; border: 1px solid var(--line-2); border-radius: 8px; flex-shrink: 0; overflow: hidden; }
.cart-item__img img { width: 100%; height: 100%; object-fit: contain; padding: 4px; }
.cart-item__info { flex: 1; }
.cart-item__title { font-size: 13.5px; font-weight: 500; margin-bottom: 4px; }
.cart-item__meta { font-size: 12.5px; color: var(--gray-500); }
.cart-item__price { font-weight: 700; font-size: 14.5px; margin-top: 4px; color: var(--price); }
.cart-item__remove { color: var(--link); font-size: 18px; align-self: flex-start; }
.cart-item__remove:hover { color: var(--link-h); }
.cart-drawer__footer { padding: 18px 20px; border-top: 1px solid var(--line); }
.cart-total { display: flex; justify-content: space-between; margin-bottom: 14px; font-size: 17px; }
.cart-total b { font-weight: 800; color: var(--price); }

/* ============ MOBILE BAR ============ */
.mobile-bar {
    display: none;
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 150;
    background: var(--white);
    padding: 10px 16px calc(10px + env(safe-area-inset-bottom)) 16px;
    box-shadow: 0 -4px 20px rgba(0,0,0,.1);
    border-top: 1px solid var(--line);
    align-items: center;
    gap: 12px;
}
.mobile-bar__price { display: flex; flex-direction: column; flex-shrink: 0; }
.mobile-bar__current { font-weight: 800; font-size: 18px; color: var(--price); }
.mobile-bar__old { font-size: 12px; color: var(--gray-500); text-decoration: line-through; }
.mobile-bar__btn { flex: 1; margin-bottom: 0; }

body.no-scroll { overflow: hidden; }

/* ============ RESPONSIVE ============ */
@media (max-width: 1100px) {
    .product { grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); }
    .product__buybox { grid-column: 1 / -1; max-width: 360px; }
    .buybox { position: static; }
}

@media (max-width: 820px) {
    .az-deliver, .az-orders, .az-lang { display: none; }
    .az-search { order: 3; flex-basis: 100%; }
    .az-top { flex-wrap: wrap; height: auto; padding: 8px 12px; gap: 8px; }
    .product { grid-template-columns: 1fr; gap: 18px; }
    .product__buybox { max-width: none; }
    .features { grid-template-columns: repeat(2, 1fr); }
    .footer__inner { grid-template-columns: repeat(2, 1fr); gap: 24px; padding-left: 22px; padding-right: 22px; }
    .weight-grid { grid-template-columns: repeat(4, 1fr); }
}

@media (max-width: 720px) {
    .product__title { font-size: 19px; }
    .product__gallery { flex-direction: column-reverse; }
    .gallery__thumbs {
        flex-direction: row;
        width: 100%;
        overflow-x: auto;
        scrollbar-width: none;
    }
    .gallery__thumbs::-webkit-scrollbar { display: none; }
    .thumb { flex: 0 0 56px; width: 56px; height: 56px; }
    main.container { padding-bottom: 90px; }
    .tab { padding: 12px 16px; font-size: 14px; }
    .delivery-grid { grid-template-columns: 1fr; }
    .mobile-bar { display: flex; }
}

@media (max-width: 480px) {
    .az-account small, .az-account b { font-size: 12px; }
    .features { grid-template-columns: 1fr; }
    .weight-grid { grid-template-columns: repeat(3, 1fr); }
    .footer__inner { grid-template-columns: 1fr; }
    .cart-drawer__panel { width: 100%; }
    .options__group { flex-direction: column; }
    .opt { width: 100%; }
}
