:root {
    --terra: #D3543A;
    --amber: #E09F3E;
    --teal: #2D545E;
    --sand: #FDF9F3;
    --ink: #2a1f1a;
    --card: #fff7ea;
    --line: #ead9c2;
    --muted: #6b5a50;
    box-sizing: border-box;
    padding-top: env(safe-area-inset-top,0px);
    padding-bottom: env(safe-area-inset-bottom,0px);
}

@media (prefers-color-scheme:dark) {
    :root:not([data-theme="light"]) {
        --sand: #1f1814;
        --ink: #f6ebdc;
        --card: #2b211b;
        --line: #46372d;
        --muted: #c9b8a6;
    }

}

:root[data-theme="dark"] {
    --sand: #1f1814;
    --ink: #f6ebdc;
    --card: #2b211b;
    --line: #46372d;
    --muted: #c9b8a6;
}

html {
    scroll-padding-top: env(safe-area-inset-top,0px);
    scroll-behavior: smooth;
}

*,*::before,*::after {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: var(--sand);
    color: var(--ink);
    font: 400 16px/1.8 "IBM Plex Sans",system-ui,sans-serif;
}

h1,h2,h3 {
    margin: 0;
    line-height: 1.35;
}

a {
    color: inherit;
    text-decoration: none;
}

:focus-visible {
    outline: 3px solid var(--amber);
    outline-offset: 3px;
}

.wrap {
    max-width: 1180px;
    margin: auto;
    padding: 0 20px;
}

button {
    font: inherit;
    cursor: pointer;
}

.btn {
    display: inline-block;
    padding: 13px 26px;
    border-radius: 30px 8px 30px 8px;
    font-weight: 700;
    border: 2px solid var(--terra);
    background: var(--terra);
    color: #fff;
    transition: transform .2s;
}

.btn:hover {
    transform: translateY(-2px);
}

.btn.alt {
    background: transparent;
    color: var(--ink);
    border-color: var(--teal);
}

.btn-amber {
    background: var(--amber);
    border-color: var(--amber);
    color: #2a1f1a;
}

.btn-newsletter {
    padding: 10px 22px;
}

header {
    position: sticky;
    top: env(safe-area-inset-top,0px);
    z-index: 20;
    background: var(--sand);
    border-bottom: 1px solid var(--line);
}

.nav {
    display: flex;
    align-items: center;
    gap: 28px;
    height: 70px;
}

.logo b {
    font-size: 28px;
    font-weight: 800;
    color: var(--terra);
    display: block;
    line-height: 1.1;
}

.logo small {
    font-size: 12px;
    color: var(--muted);
}

.links {
    display: flex;
    gap: 22px;
    font-weight: 500;
    margin-inline-end: auto;
}

.links a:hover {
    color: var(--terra);
}

.tools {
    display: flex;
    gap: 8px;
}

.ic {
    position: relative;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1px solid var(--line);
    background: var(--card);
    color: var(--ink);
    display: grid;
    place-items: center;
}

.ic svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
}

.ic i {
    position: absolute;
    top: -4px;
    right: -4px;
    background: var(--terra);
    color: #fff;
    font: 700 11px/20px sans-serif;
    min-width: 20px;
    height: 20px;
    border-radius: 10px;
    text-align: center;
    font-style: normal;
}

.burger {
    display: none;
}

/* hero */
/* Homepage hero carousel: original card, typography and illustration styling retained. */
.hero-carousel {
    min-width: 0;
}

.hero-viewport {
    overflow: hidden;
    width: 100%;
}

.hero-track {
    display: flex;
    width: 100%;
    transition: transform .55s ease;
    will-change: transform;
}

.hero-slide {
    flex: 0 0 100%;
    min-width: 0;
    overflow-x: clip;
    overflow-y: visible;
}

.hero-slide > div {
    min-width: 0;
}

.hero-slide h2 {
    font-size: clamp(34px,5.4vw,62px);
    font-weight: 800;
    letter-spacing: -.01em;
    margin: 18px 0;
}

.hero-slide h2 em {
    font-style: normal;
    color: var(--terra);
    display: inline-block;
    transform: rotate(-1.5deg);
}

.hero-product-art {
    position: absolute;
    width: 76%;
    height: 89%;
    top: 3%;
    left: 12%;
}

.hero-controls {
    margin-top: 0;
}

/* Wider hero only on desktop; leave the phone inset unchanged. */
@media (min-width: 981px) {
    .hero-carousel.wrap {
        max-width: 1440px;
    }
}

@media (max-width: 620px) {
    .hero-carousel.wrap {
        padding-inline: 24px;
    }
}

.hero {
    display: grid;
    grid-template-columns: 1.15fr .85fr;
    gap: 40px;
    align-items: center;
    padding: 64px 0 48px;
}

.badge {
    display: inline-block;
    background: var(--amber);
    color: #2a1f1a;
    font-weight: 700;
    font-size: 14px;
    padding: 4px 16px;
    border-radius: 20px 4px 20px 4px;
    transform: rotate(-2deg);
}

.hero h1 {
    font-size: clamp(34px,5.4vw,62px);
    font-weight: 800;
    letter-spacing: -.01em;
    margin: 18px 0;
}

.hero h1 em {
    font-style: normal;
    color: var(--terra);
    display: inline-block;
    transform: rotate(-1.5deg);
}

.hero p {
    max-width: 52ch;
    color: var(--muted);
    font-size: 18px;
}

.cta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin: 26px 0 34px;
}

.trust {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 34px;
}

.trust div {
    border-inline-start: 3px solid var(--amber);
    padding-inline-start: 12px;
}

.trust b {
    font-size: 24px;
    display: block;
    line-height: 1.3;
}

.trust span {
    font-size: 14px;
    color: var(--muted);
}

.collage {
    position: relative;
    aspect-ratio: 1/1.1;
    max-width: 460px;
    margin-inline: auto;
    width: 100%;
}

.blob {
    position: absolute;
    inset: 4% 6% 12% 0;
    background: var(--terra);
    border-radius: 58% 42% 47% 53%/46% 56% 44% 54%;
}

.cup {
    position: absolute;
    inset: 0 0 6% 4%;
    width: 92%;
    height: auto;
}

.float {
    position: absolute;
    bottom: 0;
    left: -4%;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 22px 6px 22px 6px;
    padding: 14px 18px;
    display: flex;
    gap: 12px;
    align-items: center;
    box-shadow: 0 14px 30px rgba(90,40,20,.18);
    transform: rotate(2deg);
}

.float svg {
    width: 36px;
    height: 54px;
}

.float b {
    display: block;
    font-size: 15px;
    line-height: 1.4;
}

.float small {
    color: var(--muted);
}

/* sections */
section {
    padding: 56px 0;
}

.head {
    display: flex;
    justify-content: space-between;
    align-items: end;
    gap: 20px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.head h2 {
    font-size: clamp(26px,3.6vw,40px);
    font-weight: 800;
}

.head p {
    margin: 4px 0 0;
    color: var(--muted);
}

.cats {
    display: grid;
    grid-template-columns: repeat(4,1fr);
    gap: 22px;
}

.cat {
    display: block;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 22px;
    padding: 10px 10px 22px;
    transition: transform .25s,box-shadow .25s;
}

.cat:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 30px rgba(90,40,20,.14);
}

.cat .sq {
    aspect-ratio: 1/1;
    border-radius: 14px;
    display: grid;
    place-items: center;
    position: relative;
    overflow: hidden;
}

.cat .sq::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 25% 20%,rgba(255,255,255,.28),transparent 55%);
}

.cat .sq::after {
    content: "";
    position: absolute;
    width: 70%;
    height: 70%;
    border: 2px dashed rgba(255,255,255,.35);
    border-radius: 50%;
}

.cat svg {
    position: relative;
    z-index: 1;
    width: 42%;
    height: 42%;
    fill: none;
    stroke: #fff;
    stroke-width: 2.4;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.cat h3 {
    font-size: 19px;
    font-weight: 700;
    margin: 16px 10px 4px;
}

.cat p {
    margin: 0 10px;
    font-size: 14.5px;
    color: var(--muted);
    line-height: 1.7;
}

.cat .go {
    display: inline-block;
    margin: 12px 10px 0;
    font-weight: 700;
    font-size: 14px;
    color: var(--terra);
    border-bottom: 2px solid var(--amber);
}

.c1 {
    background: var(--terra);
}

.c2 {
    background: #8a5a2b;
}

.c3 {
    background: #6b4a2f;
}

.c4 {
    background: var(--teal);
}

/* products */
.prods {
    display: grid;
    grid-template-columns: repeat(3,1fr);
    gap: 24px;
    align-items: start;
}

.prod {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 28px 8px 28px 8px;
    overflow: hidden;
}

.prod:nth-child(2) {
    margin-top: 28px;
    border-radius: 8px 28px 8px 28px;
}

.thumb {
    height: 230px;
    display: grid;
    place-items: center;
    position: relative;
    overflow: hidden;
}

.thumb svg {
    width: 150px;
    height: 170px;
    transition: transform .35s;
}

.prod:hover .thumb svg {
    transform: scale(1.08) rotate(-3deg);
}

.t1 {
    background: #f1c9b8;
}

.t2 {
    background: #f6dca8;
}

.t3 {
    background: #bcd3d4;
}

.tag {
    position: absolute;
    top: 14px;
    right: 14px;
    background: var(--amber);
    color: #2a1f1a;
    font-size: 13px;
    font-weight: 700;
    padding: 2px 12px;
    border-radius: 14px;
}

.pb {
    padding: 20px;
}

.pb h3 {
    font-size: 19px;
    font-weight: 700;
}

.pb .src,.pb .feat {
    margin: 6px 0 0;
    font-size: 14.5px;
    color: var(--muted);
    line-height: 1.7;
}

.row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 16px;
    gap: 10px;
}

.price {
    font-size: 22px;
    font-weight: 800;
    color: var(--teal);
}

.rate {
    font-size: 14px;
    color: var(--muted);
}

.rate b {
    color: var(--amber);
}

.add {
    background: var(--teal);
    color: #fff;
    border: 0;
    border-radius: 22px 6px 22px 6px;
    padding: 10px 18px;
    font-weight: 700;
}

.add:hover {
    background: var(--terra);
}

/* builder */
.build {
    background: var(--teal);
    color: #fdf9f3;
    border-radius: 0;
}

.build .wrap {
    display: grid;
    grid-template-columns: .8fr 1.2fr;
    gap: 44px;
    align-items: center;
}

.build h2 {
    font-size: clamp(28px,4vw,44px);
    font-weight: 800;
}

.build p {
    opacity: .9;
}

.steps {
    display: grid;
    gap: 14px;
    counter-reset: s;
}

.step {
    display: flex;
    gap: 16px;
    background: rgba(255,255,255,.08);
    border: 1px dashed rgba(224,159,62,.7);
    border-radius: 20px 6px 20px 6px;
    padding: 18px 20px;
}

.step::before {
    counter-increment: s;
    content: counter(s);
    flex: none;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: var(--amber);
    color: #2a1f1a;
    font-weight: 800;
    display: grid;
    place-items: center;
}

.step h3 {
    font-size: 18px;
}

.step p {
    margin: 2px 0 0;
    font-size: 15px;
}

/* testimonials */
.testimonials-carousel {
    position: relative;
}

.testimonials-viewport {
    overflow: hidden;
    padding-bottom: 26px;
}

.tests {
    display: flex;
    gap: 22px;
    transition: transform .35s ease;
    will-change: transform;
}

.testimonial-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-top: 12px;
}

.testimonial-arrow {
    width: 42px;
    height: 42px;
    border: 1px solid var(--line);
    background: var(--card);
    color: var(--ink);
    border-radius: 50%;
    display: grid;
    place-items: center;
}

.testimonial-arrow:disabled {
    cursor: not-allowed;
    opacity: .45;
}

.testimonial-arrow svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.testimonial-dots {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
}

.testimonial-dot {
    width: 10px;
    height: 10px;
    padding: 0;
    border-radius: 50%;
    border: 1px solid var(--terra);
    background: transparent;
}

.testimonial-dot.active {
    background: var(--terra);
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    white-space: nowrap;
    border: 0;
}

.q {
    flex: 0 0 calc((100% - 44px)/3);
    min-width: 0;
    background: var(--card);
    border: 1px solid var(--line);
    padding: 26px;
    border-radius: 8px 30px 8px 30px;
    position: relative;
}

.q:nth-child(2) {
    transform: translateY(20px);
    background: #f6dcc9;
    color: #2a1f1a;
}

.q:nth-child(2) span {
    color: #5a463a;
}

.q::before {
    content: "“";
    position: absolute;
    top: 2px;
    left: 18px;
    font-size: 54px;
    line-height: 1;
    color: var(--terra);
    font-weight: 800;
}

.q p {
    margin: 18px 0 14px;
}

.q b {
    display: block;
}

.q span {
    font-size: 14px;
    color: var(--muted);
}

/* footer */
footer {
    background: #241a15;
    color: #f1e4d2;
    padding: 54px 0 28px;
    margin-top: 40px;
}

.fg {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1.2fr;
    gap: 36px;
}

footer h3 {
    font-size: 18px;
    margin-bottom: 10px;
    color: var(--amber);
}

footer ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

footer li {
    margin: 6px 0;
}

footer a:hover {
    color: var(--amber);
}

footer p {
    margin: 0 0 10px;
    font-size: 15px;
    opacity: .9;
}

.nl {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.nl input {
    flex: 1;
    min-width: 150px;
    padding: 11px 16px;
    border-radius: 22px;
    border: 1px solid #5a463a;
    background: #33261f;
    color: #fff;
    font: inherit;
}

.pay {
    display: flex;
    gap: 8px;
    margin-top: 14px;
    flex-wrap: wrap;
}

.pay span {
    border: 1px solid #5a463a;
    border-radius: 8px;
    padding: 2px 12px;
    font-size: 14px;
}

.copy {
    border-top: 1px solid #46372d;
    margin-top: 34px;
    padding-top: 18px;
    font-size: 14px;
    opacity: .75;
}

.toast {
    position: fixed;
    bottom: calc(20px + env(safe-area-inset-bottom,0px));
    left: 50%;
    transform: translate(-50%,30px);
    background: var(--teal);
    color: #fff;
    padding: 10px 22px;
    border-radius: 24px;
    opacity: 0;
    transition: .3s;
    pointer-events: none;
    z-index: 30;
}

.toast.on {
    opacity: 1;
    transform: translate(-50%,0);
}

.page {
    padding: 44px 20px 24px;
}

.crumb {
    font-size: 14px;
    color: var(--muted);
    margin-bottom: 22px;
}

.crumb a:hover {
    color: var(--terra);
}

.pd {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 44px;
    align-items: start;
}

.pimg {
    border-radius: 44px 8px 44px 8px;
    aspect-ratio: 1/1;
    display: grid;
    place-items: center;
}

.pimg svg {
    width: 56%;
    height: auto;
}

.pd h1,.ph h1 {
    font-size: clamp(28px,4vw,44px);
    font-weight: 800;
}

.pd .src {
    color: var(--muted);
    margin: 6px 0 10px;
}

.pd .price {
    font-size: 30px;
    display: block;
    margin: 12px 0;
}

.specs {
    list-style: none;
    padding: 0;
    margin: 18px 0;
    border-top: 1px solid var(--line);
}

.specs li {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 10px 0;
    border-bottom: 1px solid var(--line);
}

.specs span {
    color: var(--muted);
}

.qty {
    display: inline-flex;
    align-items: center;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: var(--card);
}

.qty button {
    width: 42px;
    height: 42px;
    border: 0;
    background: none;
    font-size: 20px;
    color: var(--ink);
}

.qty b {
    min-width: 30px;
    text-align: center;
}

.buy {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    align-items: center;
    margin-top: 18px;
}

.rel {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 18px;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 16px 4px 16px 4px;
    margin-top: 10px;
}

.rel:hover {
    border-color: var(--terra);
}

.fld {
    display: block;
    margin-bottom: 16px;
    font-weight: 500;
}

.fld input,.fld select,.fld textarea {
    width: 100%;
    margin-top: 6px;
    padding: 12px 16px;
    border: 1px solid var(--line);
    border-radius: 14px 4px 14px 4px;
    background: var(--card);
    color: var(--ink);
    font: inherit;
}

.cg {
    display: grid;
    grid-template-columns: 1.2fr .8fr;
    gap: 36px;
    align-items: start;
    margin-top: 30px;
}

.ph p {
    color: var(--muted);
    max-width: 56ch;
}

.box {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 28px 8px 28px 8px;
    padding: 28px;
}

.info {
    display: grid;
    gap: 14px;
}

.info div {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 18px 4px 18px 4px;
    padding: 16px 20px;
    border-inline-start: 4px solid var(--amber);
}

.info b {
    display: block;
}

.info span {
    color: var(--muted);
    font-size: 15px;
}

.info .tl {
    background: var(--teal);
    color: #fdf9f3;
    border-color: var(--teal);
}

.info .tl span {
    color: #e9dfd0;
}

.ok {
    background: var(--teal);
    color: #fff;
    border-radius: 14px;
    padding: 12px 18px;
}

@media (max-width:980px) {
    .pd,.cg {
        grid-template-columns: 1fr;
    }

    .rel {
        flex-wrap: wrap;
    }

}

@media (max-width:980px) {
    .links {
        display: none;
        position: absolute;
        top: 70px;
        right: 0;
        left: 0;
        background: var(--sand);
        flex-direction: column;
        padding: 16px 20px;
        border-bottom: 1px solid var(--line);
        gap: 12px;
    }

    .links.open {
        display: flex;
    }

    .burger {
        display: grid;
    }

    .nav {
        display: grid;
        grid-template-columns: 44px minmax(0,1fr) auto;
        gap: 12px;
    }

    .burger {
        grid-column: 1;
        grid-row: 1;
    }

    .logo {
        grid-column: 2;
        grid-row: 1;
        justify-self: center;
        text-align: center;
    }

    .tools {
        grid-column: 3;
        grid-row: 1;
    }

    .hero,.build .wrap {
        grid-template-columns: 1fr;
    }

    .cats,.prods {
        grid-template-columns: repeat(2,1fr);
    }

    .q {
        flex-basis: calc((100% - 22px)/2);
    }

    .fg {
        grid-template-columns: 1fr 1fr;
    }

}

@media (max-width:620px) {
    .nav {
        gap: 12px;
    }

    .prods,.fg {
        grid-template-columns: 1fr;
    }

    .q {
        flex-basis: 100%;
    }

    .cats {
        gap: 12px;
    }

    .cat h3 {
        font-size: 16px;
        margin-inline: 6px;
    }

    .cat p {
        font-size: 13px;
        margin-inline: 6px;
    }

    .cat .go {
        margin-inline: 6px;
    }

    .prod:nth-child(2),.q:nth-child(2) {
        margin-top: 0;
        transform: none;
    }

    .hero {
        padding-top: 36px;
    }

    .add {
        position: sticky;
        bottom: 12px;
    }

    .ic.srch {
        display: none;
    }

    .logo b {
        font-size: 23px;
    }

}

@media (prefers-reduced-motion:reduce) {
    * {
        transition: none !important;
        scroll-behavior: auto !important;
    }

}

/* Standalone pages, carousel sizing, and narrow-screen containment. */
.page,.pd > *, .cg > *, .hero > *, .build .wrap > * {
    min-width: 0;
}

.product-thumb-link {
    display: grid;
}

.related-title {
    margin-top: 32px;
}

.cat h3,.cat p,.q p,.rel {
    overflow-wrap: anywhere;
}

@media (max-width:380px) {
    .wrap {
        padding-inline: 16px;
    }

    .nav {
        gap: 8px;
    }

    .logo b {
        font-size: 21px;
    }

    .tools {
        gap: 6px;
    }

    .ic {
        width: 40px;
        height: 40px;
    }

    .burger {
        width: 40px;
        height: 40px;
    }

    .nav {
        grid-template-columns: 40px minmax(0,1fr) auto;
    }

}
