/* ============================================
   Another Matcha
   Colors: #D6F2CE (green), #EFECE7 (off-white)
   ============================================ */

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, sans-serif;
    font-weight: 400;
    color: #212121;
    background: #fff;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

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

img {
    max-width: 100%;
    display: block;
}

/* ---- Header ---- */

.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: #fff;
    height: 72px;
}

.nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
    padding: 0 48px;
    max-width: 1440px;
    margin: 0 auto;
}

.nav__left,
.nav__right {
    display: flex;
    align-items: center;
    gap: 32px;
    flex: 1;
}

.nav__right {
    justify-content: flex-end;
}

.nav__link {
    font-size: 11px;
    font-weight: 400;
    letter-spacing: 0.1em;
    transition: opacity 0.2s;
}

.nav__link:hover {
    opacity: 0.4;
}

.nav__logo {
    flex: 0 0 auto;
}

.nav__logo-img {
    height: 20px;
    width: auto;
}

/* Hamburger */

.hamburger {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    position: fixed;
    top: 27px;
    right: 22px;
    z-index: 200;
    width: 18px;
    height: 12px;
    flex-direction: column;
    justify-content: space-between;
}

.hamburger span {
    display: block;
    width: 100%;
    height: 1.5px;
    background: #212121;
    transition: transform 0.3s, opacity 0.2s;
}

.hamburger.is-open span:first-child {
    transform: translateY(5.25px) rotate(45deg);
}

.hamburger.is-open span:last-child {
    transform: translateY(-5.25px) rotate(-45deg);
}

.mobile-menu {
    display: none;
    position: fixed;
    inset: 0;
    background: #fff;
    z-index: 150;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 36px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
}

.mobile-menu.is-open {
    opacity: 1;
    pointer-events: all;
}

.mobile-menu__link {
    font-size: 14px;
    font-weight: 400;
    letter-spacing: 0.1em;
}

/* ---- Hero ---- */

.hero {
    position: relative;
    margin-top: 72px;
    height: calc(100vh - 72px);
    overflow: hidden;
    background: #EFECE7;
}

.hero__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.hero__overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 80px 48px;
    background: linear-gradient(to top, rgba(0,0,0,0.35) 0%, rgba(0,0,0,0) 60%);
}

.hero__title {
    font-size: clamp(16px, 2.2vw, 25px);
    font-weight: 300;
    color: #fff;
    letter-spacing: 0.02em;
    line-height: 1.2;
    max-width: 600px;
    margin-bottom: 28px;
}

.hero__cta {
    display: inline-block;
    padding: 14px 36px;
    background: #fff;
    color: #212121;
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.14em;
    transition: background 0.2s, color 0.2s;
    align-self: flex-start;
}

.hero__cta:hover {
    background: #212121;
    color: #fff;
}

/* ---- Sections ---- */

.section {
    padding: 60px 48px;
    max-width: 1440px;
    margin: 0 auto;
    scroll-margin-top: 80px;
}

.section--tight {
    padding-top: 0;
}

.section__heading {
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.14em;
    margin-bottom: 32px;
    color: #212121;
}

.section__intro {
    font-size: 15px;
    font-weight: 300;
    color: #595959;
    line-height: 1.7;
    max-width: 600px;
    margin-bottom: 32px;
}

/* ---- Product grid ---- */

.grid {
    display: grid;
    gap: 32px;
}

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

.card {
    cursor: pointer;
}

.card:focus-visible {
    outline: 2px solid #212121;
    outline-offset: 4px;
    border-radius: 4px;
}

.card__img {
    aspect-ratio: 3 / 4;
    overflow: hidden;
    background: #EFECE7;
    margin-bottom: 16px;
}

.card__img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.card:hover .card__img img {
    transform: scale(1.04);
}

.card__info {
    padding: 0 4px;
}

.card__name {
    font-size: 14px;
    font-weight: 400;
    margin-bottom: 4px;
}

.card__meta {
    font-size: 13px;
    font-weight: 300;
    color: #595959;
}

.card__price {
    font-size: 14px;
    font-weight: 500;
    color: #212121;
    margin-top: 4px;
    min-height: 21px;
}

.card__price:empty::after {
    content: '';
    display: block;
    width: 60px;
    height: 14px;
    background: #eee;
    border-radius: 3px;
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% { opacity: 0.6; }
    50% { opacity: 1; }
    100% { opacity: 0.6; }
}

.price--old {
    text-decoration: line-through;
    color: #999;
    font-weight: 400;
    margin-right: 4px;
}

/* ---- Sticky scroll section (desktop only) ---- */

.sticky-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    position: relative;
}

.sticky-section__images {
    display: flex;
    flex-direction: column;
}

.sticky-section__slide {
    height: 100vh;
    overflow: hidden;
}

.sticky-section__slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.sticky-section__content {
    position: relative;
    height: 300vh;
}

.sticky-section__inner {
    position: sticky;
    top: 0;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 80px 64px;
}

.sticky-section__text {
    position: absolute;
    left: 64px;
    right: 64px;
    max-width: 440px;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.sticky-section__text.is-active {
    opacity: 1;
}

.sticky-section__title {
    font-size: 28px;
    font-weight: 300;
    line-height: 1.3;
    margin-bottom: 20px;
}

.sticky-section__body {
    font-size: 15px;
    font-weight: 300;
    line-height: 1.8;
    color: #444;
    margin-bottom: 16px;
}

/* ---- Mobile info (photo/text alternating) ---- */

.info-mobile {
    display: none;
    scroll-margin-top: 80px;
}

.info-mobile__block img {
    width: 100%;
    height: 50vh;
    object-fit: cover;
}

.info-mobile__text {
    padding: 32px 24px;
    min-height: 50vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.info-mobile__title {
    font-size: 22px;
    font-weight: 300;
    line-height: 1.3;
    margin-bottom: 16px;
}

.info-mobile__text p {
    font-size: 14px;
    font-weight: 300;
    line-height: 1.7;
    color: #444;
    margin-bottom: 12px;
}

/* ---- Footer ---- */

.footer {
    background: #D6F2CE;
    color: #212121;
    padding: 64px 48px 32px;
}

.footer__main {
    display: flex;
    justify-content: space-between;
    max-width: 1440px;
    margin: 0 auto;
}

.footer__left {
    flex: 1;
}

.footer__right {
    display: flex;
    gap: 80px;
}

.footer__col {
    display: flex;
    flex-direction: column;
}

.footer__heading {
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 0.12em;
    margin-bottom: 16px;
    color: #212121;
}

.footer__link {
    font-size: 15px;
    font-weight: 400;
    margin-bottom: 8px;
    transition: opacity 0.2s;
}

.footer__link:hover {
    opacity: 0.5;
}

.footer__bottom {
    max-width: 1440px;
    margin: 0 auto;
    padding-top: 48px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

.footer__copy {
    font-size: 11px;
    font-weight: 400;
    letter-spacing: 0.06em;
    color: #212121;
}

/* ---- Product Detail Page ---- */

.pdp {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 500;
    background: #fff;
    overflow-y: auto;
}

.pdp.is-open {
    display: block;
}

.pdp__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 48px;
    height: 72px;
}

.pdp__back {
    background: none;
    border: none;
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    font-weight: 400;
    letter-spacing: 0.04em;
    cursor: pointer;
    color: #212121;
    transition: opacity 0.2s;
}

.pdp__back:hover {
    opacity: 0.4;
}

.pdp__body {
    display: grid;
    grid-template-columns: 1fr 1fr;
    padding: 0 48px 80px;
    gap: 64px;
    align-items: start;
}

.pdp__carousel {
    position: relative;
    background: #EFECE7;
    border-radius: 8px;
    overflow: hidden;
    aspect-ratio: 3 / 4;
    touch-action: pan-y;
}

.pdp__carousel-track {
    display: flex;
    height: 100%;
    transition: transform 0.4s ease;
}

.pdp__carousel-slide {
    min-width: 100%;
    height: 100%;
}

.pdp__carousel-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.pdp__arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,0.8);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #212121;
    transition: background 0.2s;
    line-height: 1;
}

.pdp__arrow:hover {
    background: #fff;
}

.pdp__arrow--left {
    left: 12px;
}

.pdp__arrow--right {
    right: 12px;
}

.pdp__dots {
    position: absolute;
    bottom: 16px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
}

.pdp__dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255,255,255,0.5);
    cursor: pointer;
    transition: background 0.2s;
}

.pdp__dot.is-active {
    background: #fff;
}

.pdp__info {
    position: sticky;
    top: 72px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 24px 0;
    max-width: 520px;
}

.pdp__name {
    font-family: 'Georgia', 'Times New Roman', serif;
    font-size: clamp(32px, 3.5vw, 48px);
    font-weight: 400;
    line-height: 1.05;
    margin-bottom: 20px;
    color: #212121;
}

.pdp__price {
    font-size: 22px;
    font-weight: 500;
    color: #212121;
    margin-bottom: 12px;
}

.pdp__desc {
    font-size: 14px;
    font-weight: 300;
    line-height: 1.7;
    color: #333;
    margin-bottom: 32px;
    border-top: 1px solid #e0e0e0;
    padding-top: 20px;
}

.pdp__cta {
    display: block;
    padding: 16px 32px;
    background: #212121;
    color: #fff;
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.04em;
    text-align: center;
    border-radius: 40px;
    border: none;
    cursor: pointer;
    transition: background 0.2s, opacity 0.2s;
}

.pdp__cta:hover {
    background: #333;
}

.pdp__cta:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    background: #999;
}

/* ---- Stock badges ---- */

.card__stock {
    display: inline-block;
    font-size: 11px;
    font-weight: 400;
    letter-spacing: 0.02em;
    margin-top: 4px;
}

.card__stock--available {
    color: #2e7d32;
}

.card__stock--onorder {
    color: #9e9e9e;
}

.pdp__stock {
    display: inline-block;
    font-size: 13px;
    font-weight: 400;
    margin-bottom: 16px;
}

.pdp__stock--available {
    color: #2e7d32;
}

.pdp__stock--onorder {
    color: #9e9e9e;
}

/* ---- WhatsApp floating button ---- */

.wa-float {
    position: fixed;
    bottom: 28px;
    right: 28px;
    z-index: 400;
    width: 56px;
    height: 56px;
    background: #25D366;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    transition: transform 0.2s, box-shadow 0.2s;
}

.wa-float:hover {
    transform: scale(1.08);
    box-shadow: 0 6px 20px rgba(0,0,0,0.2);
}

.wa-float svg {
    display: block;
}

/* ---- Cart button ---- */

.cart-btn {
    position: relative;
    background: none;
    border: none;
    cursor: pointer;
    color: #212121;
    padding: 4px;
    transition: opacity 0.2s;
}

.cart-btn:hover {
    opacity: 0.4;
}

.cart-btn__badge {
    position: absolute;
    top: -4px;
    right: -6px;
    background: #212121;
    color: #fff;
    font-size: 10px;
    font-weight: 500;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: none;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.cart-btn__badge.is-bump {
    animation: badge-bump 0.3s ease;
}

@keyframes badge-bump {
    0% { transform: scale(1); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

.cart-btn--mobile {
    position: fixed;
    top: 18px;
    right: 52px;
    z-index: 200;
    display: none;
}

/* ---- Toast ---- */

.toast {
    position: fixed;
    bottom: 100px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: #212121;
    color: #fff;
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    font-weight: 400;
    padding: 12px 24px;
    border-radius: 40px;
    z-index: 800;
    opacity: 0;
    transition: opacity 0.3s ease, transform 0.3s ease;
    pointer-events: none;
}

.toast.is-visible {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* ---- Cart drawer ---- */

.cart-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.4);
    z-index: 600;
}

.cart-overlay.is-open {
    display: block;
}

.cart-drawer {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: 400px;
    max-width: 100vw;
    background: #fff;
    z-index: 601;
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform 0.3s ease;
}

.cart-drawer.is-open {
    transform: translateX(0);
}

.cart-drawer__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid #eee;
}

.cart-drawer__title {
    font-size: 16px;
    font-weight: 500;
    letter-spacing: 0.04em;
}

.cart-drawer__close {
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: #212121;
    line-height: 1;
}

.cart-drawer__body {
    flex: 1;
    overflow-y: auto;
    padding: 16px 24px;
}

.cart-drawer__empty {
    text-align: center;
    color: #999;
    font-size: 14px;
    padding: 40px 0;
}

.cart-drawer__footer {
    border-top: 1px solid #eee;
    padding: 20px 24px;
}

.cart-drawer__total {
    display: flex;
    justify-content: space-between;
    font-size: 16px;
    font-weight: 500;
    margin-bottom: 16px;
}

.cart-drawer__checkout {
    display: block;
    width: 100%;
    padding: 14px;
    background: #212121;
    color: #fff;
    border: none;
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.04em;
    border-radius: 40px;
    cursor: pointer;
    transition: background 0.2s;
}

.cart-drawer__checkout:hover {
    background: #333;
}

/* ---- Cart item ---- */

.cart-item {
    display: flex;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid #f0f0f0;
    align-items: center;
}

.cart-item__img {
    width: 64px;
    height: 80px;
    object-fit: cover;
    border-radius: 4px;
    background: #EFECE7;
}

.cart-item__info {
    flex: 1;
}

.cart-item__name {
    font-size: 14px;
    font-weight: 400;
    margin-bottom: 2px;
}

.cart-item__price {
    font-size: 13px;
    font-weight: 500;
    color: #212121;
    margin-bottom: 8px;
}

.cart-item__qty {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
}

.cart-item__qty-btn {
    background: none;
    border: 1px solid #ddd;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #212121;
    transition: border-color 0.2s;
}

.cart-item__qty-btn:hover {
    border-color: #212121;
}

.cart-item__remove {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: #999;
    padding: 8px;
    transition: color 0.2s;
}

.cart-item__remove:hover {
    color: #212121;
}

/* ---- Checkout modal ---- */

.checkout {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 700;
    background: rgba(0,0,0,0.5);
    align-items: center;
    justify-content: center;
}

.checkout.is-open {
    display: flex;
}

.checkout__dialog {
    background: #fff;
    width: 480px;
    max-width: 95vw;
    max-height: 90vh;
    overflow-y: auto;
    border-radius: 12px;
    padding: 32px;
    position: relative;
}

.checkout__close {
    position: sticky;
    top: 0;
    float: right;
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: #212121;
    line-height: 1;
    z-index: 1;
}

.checkout__title {
    font-size: 20px;
    font-weight: 500;
    margin-bottom: 20px;
}

.checkout__summary {
    margin-bottom: 8px;
}

.checkout__item {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
    padding: 6px 0;
    color: #444;
}

.checkout__total {
    font-size: 16px;
    padding: 12px 0;
    border-top: 1px solid #eee;
    margin-bottom: 20px;
}

.checkout__field {
    margin-bottom: 16px;
}

.checkout__field label {
    display: block;
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.04em;
    margin-bottom: 6px;
    color: #444;
}

.checkout__field input {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    transition: border-color 0.2s;
}

.checkout__field input:focus {
    outline: none;
    border-color: #212121;
}

.checkout__field--error input {
    border-color: #c62828;
}

.checkout__payment-info {
    font-size: 13px;
    color: #595959;
    line-height: 1.5;
    background: #f8f8f8;
    padding: 12px 14px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.checkout__error {
    color: #c62828;
    font-size: 13px;
    min-height: 20px;
    margin-bottom: 12px;
}

.checkout__submit {
    display: block;
    width: 100%;
    padding: 14px;
    background: #212121;
    color: #fff;
    border: none;
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.04em;
    border-radius: 40px;
    cursor: pointer;
    transition: background 0.2s;
}

.checkout__submit:hover {
    background: #333;
}

.checkout__submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.checkout__confirmation {
    text-align: center;
    padding: 20px 0;
}

.checkout__confirmation svg {
    margin: 0 auto 20px;
}

.checkout__msg {
    font-size: 14px;
    color: #444;
    line-height: 1.6;
    margin-bottom: 24px;
}

/* ---- Responsive ---- */

@media (max-width: 1024px) {
    .footer__right {
        gap: 60px;
    }
}

@media (max-width: 768px) {
    .nav__left,
    .nav__right {
        display: none;
    }

    .nav {
        justify-content: center;
        padding: 0 24px;
    }

    .hamburger {
        display: flex;
    }

    .mobile-menu {
        display: flex;
    }

    .header {
        height: 60px;
    }

    .hero {
        margin-top: 60px;
        height: calc(92vh - 60px);
    }

    .hero__overlay {
        padding: 32px 24px;
    }

    .section {
        padding: 48px 24px;
        scroll-margin-top: 68px;
    }

    .section--tight {
        padding-top: 24px;
    }

    .grid--2 {
        gap: 20px 16px;
    }

    /* Hide desktop sticky, show mobile info */
    .sticky-section {
        display: none;
    }

    .info-mobile {
        display: block;
        scroll-margin-top: 68px;
    }

    /* PDP mobile */
    .pdp__header {
        padding: 0 20px;
        height: 56px;
    }

    .pdp__header .nav__logo-img {
        height: 14px;
    }

    .pdp__back {
        font-size: 12px;
        white-space: nowrap;
    }

    .pdp__body {
        grid-template-columns: 1fr;
        padding: 0 20px 40px;
        gap: 24px;
    }

    .pdp__info {
        position: relative;
        top: 0;
        padding: 0;
    }

    .pdp__name {
        font-size: 28px;
    }

    .footer {
        padding: 48px 24px 32px;
    }

    .footer__main {
        flex-direction: column;
        gap: 32px;
    }

    .footer__right {
        gap: 48px;
    }

    .cart-btn--mobile {
        display: block;
    }

    .cart-drawer {
        width: 100vw;
    }

    .checkout__dialog {
        border-radius: 0;
        width: 100vw;
        max-width: 100vw;
        max-height: 100vh;
        min-height: 100vh;
        padding: 24px;
    }

    .wa-float {
        width: 48px;
        height: 48px;
        bottom: 20px;
        right: 20px;
    }

    .wa-float svg {
        width: 24px;
        height: 24px;
    }
}

@media (max-width: 480px) {
    .grid--2 {
        grid-template-columns: 1fr 1fr;
        gap: 16px 12px;
    }
}
