/* =========================================================
   KHANAK FOUNDATION - MAIN STYLESHEET
========================================================= */

@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&family=Playfair+Display:wght@600;700&display=swap');

:root {
    --primary-color: #4f6f52;
    --primary-dark: #355438;
    --primary-light: #dfe9df;
    --secondary-color: #c79b5d;
    --dark-color: #243025;
    --text-color: #59645a;
    --light-bg: #f7faf6;
    --white: #ffffff;
    --border-color: #e5ece4;
    --danger-color: #c94c4c;

    --shadow: 0 10px 30px rgba(45, 72, 47, 0.10);
    --cart-shadow: -8px 0 30px rgba(0, 0, 0, 0.15);

    --transition: 0.3s ease;
}


/* ================= RESET ================= */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: "Poppins", sans-serif;
    color: var(--text-color);
    background: var(--white);
    line-height: 1.7;
}

body.cart-open {
    overflow: hidden;
}

img {
    max-width: 100%;
    display: block;
}

a {
    text-decoration: none;
    color: inherit;
}

button {
    font-family: inherit;
}


/* ================= COMMON ================= */

.container {
    width: min(1140px, 90%);
    margin: auto;
}

.section {
    padding: 90px 0;
}

.section-heading {
    max-width: 760px;
    margin: 0 auto 55px;
    text-align: center;
}

.section-tag,
.eyebrow {
    display: inline-block;
    color: var(--primary-color);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 2px;
    margin-bottom: 12px;
}

h1,
h2,
h3,
h4 {
    color: var(--dark-color);
    line-height: 1.25;
}

h1,
h2 {
    font-family: "Playfair Display", serif;
}

h2 {
    font-size: clamp(2rem, 4vw, 3rem);
    margin-bottom: 18px;
}

p {
    font-size: 0.97rem;
}


/* ================= BUTTONS ================= */

.btn,
.product-btn,
.add-cart-btn,
.checkout-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    font-weight: 600;
    transition: var(--transition);
    cursor: pointer;
    border: none;
}

.btn {
    padding: 13px 24px;
}

.btn-primary {
    background: var(--primary-color);
    color: var(--white);
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
}

.btn-secondary {
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
    background: transparent;
}

.btn-secondary:hover {
    background: var(--primary-light);
}


/* ================= HEADER ================= */

.header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.96);
    border-bottom: 1px solid var(--border-color);
    backdrop-filter: blur(10px);
}

.navbar {
    min-height: 78px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.brand-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.brand-logo img {
    width: 48px;
    height: 48px;
    object-fit: contain;
}

.brand-name {
    color: var(--primary-color);
    font-size: 1.1rem;
    font-weight: 500;
    line-height: 1.2;
}

.brand-name strong {
    display: block;
    color: var(--dark-color);
    font-size: 0.9rem;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 17px;
}

.nav-links a {
    color: var(--dark-color);
    font-size: 0.88rem;
    font-weight: 500;
}

.nav-links a:hover {
    color: var(--primary-color);
}

.login-btn {
    padding: 8px 15px;
    border: 1px solid var(--primary-color);
    border-radius: 7px;
}

.signup-btn {
    padding: 9px 16px;
    border-radius: 7px;
    background: var(--primary-color);
    color: var(--white) !important;
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--dark-color);
    font-size: 1.7rem;
    cursor: pointer;
}


/* ================= HEADER CART BUTTON ================= */

.cart-button {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;

    min-width: 82px;
    height: 42px;

    padding: 0 14px;

    border: 1px solid var(--primary-color);
    border-radius: 9px;

    background: var(--primary-light);
    color: var(--primary-dark);

    font-size: 0.85rem;
    font-weight: 600;

    cursor: pointer;
    transition: var(--transition);

    flex-shrink: 0;
}

.cart-button:hover {
    background: var(--primary-color);
    color: var(--white);
    transform: translateY(-2px);
}

.cart-icon {
    font-size: 1rem;
}

.cart-text {
    font-size: 0.85rem;
}

.cart-count {
    min-width: 21px;
    height: 21px;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 0 5px;

    border-radius: 50%;

    background: var(--primary-color);
    color: var(--white);

    font-size: 0.68rem;
    font-weight: 700;
}

.cart-button:hover .cart-count {
    background: var(--white);
    color: var(--primary-color);
}


/* ================= HERO ================= */

.hero {
    min-height: 650px;
    display: flex;
    align-items: center;

    background:
        linear-gradient(
            135deg,
            rgba(247, 250, 246, 0.96),
            rgba(223, 233, 223, 0.75)
        );

    overflow: hidden;
}

.hero-content {
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: 70px;
    align-items: center;
}

.hero-text h1 {
    font-size: clamp(3rem, 6vw, 5rem);
    margin-bottom: 22px;
}

.hero-text h1 span {
    color: var(--primary-color);
}

.hero-description {
    max-width: 620px;
    font-size: 1.05rem;
    margin-bottom: 28px;
}

.hero-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
}

.hero-visual {
    position: relative;
    min-height: 390px;

    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-circle {
    position: absolute;
    border-radius: 50%;
}

.circle-one {
    width: 340px;
    height: 340px;
    background: var(--primary-light);
}

.circle-two {
    width: 250px;
    height: 250px;
    border: 2px dashed rgba(79, 111, 82, 0.25);
}

.nature-card {
    position: relative;
    z-index: 2;

    width: 280px;
    min-height: 290px;

    padding: 35px 25px;

    border-radius: 25px;
    background: var(--white);

    box-shadow: var(--shadow);

    text-align: center;

    display: flex;
    flex-direction: column;
    justify-content: center;
}

.hero-logo {
    width: 110px;
    height: 110px;

    object-fit: contain;

    margin: 0 auto 18px;
}

.nature-card p {
    color: var(--primary-color);
    font-size: 1.3rem;
    font-weight: 700;
}

.nature-card span {
    margin-top: 8px;
    font-size: 0.85rem;
}


/* ================= ABOUT ================= */

.about {
    background: var(--white);
}

.about-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.about-card {
    padding: 30px;

    border: 1px solid var(--border-color);
    border-radius: 16px;

    background: var(--white);

    transition: var(--transition);
}

.about-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow);
}

.feature-icon {
    font-size: 2rem;
    margin-bottom: 15px;
}

.about-card h3 {
    margin-bottom: 10px;
}


/* ================= PRODUCTS ================= */

.products-section {
    background: var(--light-bg);
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 22px;
}

.product-card {
    display: flex;
    flex-direction: column;

    background: var(--white);

    border-radius: 16px;
    overflow: hidden;

    border: 1px solid var(--border-color);

    transition: var(--transition);
}

.product-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow);
}

.product-image {
    height: 210px;
    overflow: hidden;
    background: var(--primary-light);
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;

    transition: transform 0.5s ease;
}

.product-card:hover .product-image img {
    transform: scale(1.05);
}

.product-content {
    padding: 20px;

    display: flex;
    flex-direction: column;
    flex: 1;
}

.product-category {
    color: var(--primary-color);

    font-size: 0.68rem;
    letter-spacing: 1.5px;
    font-weight: 700;

    margin-bottom: 8px;
}

.product-content h3 {
    font-size: 1.12rem;
    margin-bottom: 10px;
}

.product-content > p {
    font-size: 0.84rem;
    margin-bottom: 15px;
}


/* ================= PRODUCT QUANTITY ================= */

.quantity-section {
    margin-top: auto;
    padding-top: 10px;
    margin-bottom: 15px;
}

.quantity-label {
    display: block;

    font-size: 0.78rem;
    font-weight: 600;

    color: var(--dark-color);

    margin-bottom: 8px;
}

.quantity-selector {
    display: inline-flex;
    align-items: center;

    border: 1px solid var(--border-color);
    border-radius: 8px;

    overflow: hidden;

    background: var(--white);
}

.quantity-btn {
    width: 38px;
    height: 36px;

    border: none;

    background: var(--primary-light);
    color: var(--primary-dark);

    font-size: 1.25rem;
    font-weight: 600;

    cursor: pointer;

    transition: var(--transition);
}

.quantity-btn:hover {
    background: var(--primary-color);
    color: var(--white);
}

.quantity-value {
    min-width: 45px;
    height: 36px;

    display: flex;
    align-items: center;
    justify-content: center;

    background: var(--white);

    color: var(--dark-color);
    font-weight: 600;
}


/* ================= PRODUCT PRICE ================= */

.product-price-box {
    padding: 12px 0;
    border-top: 1px solid var(--border-color);
}

.price-label {
    display: block;

    color: var(--text-color);

    font-size: 0.7rem;

    margin-bottom: 2px;
}

.price {
    color: var(--primary-color);
    font-size: 1.3rem;
}

.unit {
    font-size: 0.75rem;
}


/* ================= PRODUCT ACTION BUTTONS ================= */

.product-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 9px;

    margin-top: 5px;
}

.add-cart-btn,
.product-btn {
    width: 100%;
    min-height: 42px;

    padding: 9px 10px;

    font-size: 0.78rem;
}

.add-cart-btn {
    background: var(--primary-light);
    color: var(--primary-dark);

    border: 1px solid var(--primary-color);
}

.add-cart-btn:hover {
    background: var(--primary-color);
    color: var(--white);
}

.product-btn {
    background: var(--primary-color);
    color: var(--white);
}

.product-btn:hover {
    background: var(--primary-dark);
}


/* =========================================================
   CART OVERLAY
========================================================= */

.cart-overlay {
    position: fixed;

    top: 0;
    left: 0;

    width: 100%;
    height: 100%;

    background: rgba(0, 0, 0, 0.45);

    z-index: 2000;

    opacity: 0;
    visibility: hidden;

    transition: var(--transition);
}

.cart-overlay.active {
    opacity: 1;
    visibility: visible;
}


/* =========================================================
   CART SIDEBAR
========================================================= */

.cart-sidebar {
    position: fixed;

    top: 0;
    right: 0;

    width: min(420px, 100%);
    height: 100vh;

    background: var(--white);

    z-index: 2001;

    display: flex;
    flex-direction: column;

    box-shadow: var(--cart-shadow);

    transform: translateX(100%);

    transition: transform 0.35s ease;
}

.cart-sidebar.active {
    transform: translateX(0);
}


/* ================= CART HEADER ================= */

.cart-header {
    display: flex;
    align-items: center;
    justify-content: space-between;

    padding: 22px 20px;

    border-bottom: 1px solid var(--border-color);
}

.cart-header h2 {
    font-family: "Poppins", sans-serif;
    font-size: 1.3rem;
    margin: 0;
}

.close-cart {
    width: 38px;
    height: 38px;

    display: flex;
    align-items: center;
    justify-content: center;

    border: none;
    border-radius: 50%;

    background: var(--light-bg);

    color: var(--dark-color);

    font-size: 1.8rem;
    line-height: 1;

    cursor: pointer;

    transition: var(--transition);
}

.close-cart:hover {
    background: var(--danger-color);
    color: var(--white);
}


/* ================= CART ITEMS ================= */

.cart-items {
    flex: 1;

    overflow-y: auto;

    padding: 20px;
}


/* ================= EMPTY CART ================= */

.empty-cart {
    min-height: 250px;

    display: flex;
    flex-direction: column;

    align-items: center;
    justify-content: center;

    text-align: center;
}

.empty-cart > span {
    font-size: 3.5rem;
    margin-bottom: 12px;
}

.empty-cart h3 {
    margin-bottom: 7px;
}

.empty-cart p {
    font-size: 0.85rem;
}


/* ================= CART ITEM ================= */

.cart-item {
    display: grid;

    grid-template-columns: 75px 1fr;
    gap: 14px;

    padding: 14px 0;

    border-bottom: 1px solid var(--border-color);
}

.cart-item-image {
    width: 75px;
    height: 75px;

    border-radius: 10px;

    overflow: hidden;

    background: var(--primary-light);
}

.cart-item-image img {
    width: 100%;
    height: 100%;

    object-fit: cover;
}

.cart-item-details {
    min-width: 0;
}

.cart-item-top {
    display: flex;
    justify-content: space-between;
    gap: 10px;
}

.cart-item-name {
    color: var(--dark-color);

    font-size: 0.9rem;
    font-weight: 600;

    line-height: 1.35;
}

.remove-item {
    flex-shrink: 0;

    border: none;
    background: none;

    color: var(--danger-color);

    font-size: 0.75rem;
    font-weight: 600;

    cursor: pointer;
}

.cart-item-price {
    display: block;

    color: var(--primary-color);

    font-size: 0.85rem;
    font-weight: 700;

    margin: 5px 0 9px;
}


/* ================= CART QUANTITY ================= */

.cart-item-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.cart-quantity {
    display: inline-flex;
    align-items: center;

    border: 1px solid var(--border-color);
    border-radius: 7px;

    overflow: hidden;
}

.cart-qty-btn {
    width: 28px;
    height: 28px;

    border: none;

    background: var(--primary-light);
    color: var(--primary-dark);

    font-size: 1rem;

    cursor: pointer;
}

.cart-qty-value {
    min-width: 30px;

    text-align: center;

    color: var(--dark-color);

    font-size: 0.82rem;
    font-weight: 600;
}

.cart-item-total {
    color: var(--dark-color);

    font-size: 0.88rem;
    font-weight: 700;
}


/* ================= CART FOOTER ================= */

.cart-footer {
    padding: 20px;

    border-top: 1px solid var(--border-color);

    background: var(--white);
}

.cart-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;

    margin-bottom: 15px;
}

.cart-summary span {
    color: var(--text-color);
    font-size: 0.9rem;
}

.cart-summary strong {
    color: var(--primary-color);
    font-size: 1.3rem;
}

.checkout-btn {
    width: 100%;
    min-height: 50px;

    background: var(--primary-color);
    color: var(--white);

    font-size: 0.9rem;
}

.checkout-btn:hover {
    background: var(--primary-dark);
}

.checkout-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}


/* ================= WHY US ================= */

.why-section {
    background: var(--white);
}

.why-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 70px;

    align-items: center;
}

.why-content h2 {
    margin-bottom: 20px;
}

.why-list {
    display: grid;
    gap: 18px;
}

.why-item {
    display: flex;
    gap: 15px;

    padding: 18px;

    border-radius: 12px;

    background: var(--light-bg);
}

.why-item > span {
    width: 32px;
    height: 32px;

    flex-shrink: 0;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 50%;

    background: var(--primary-color);
    color: var(--white);
}

.why-item h4 {
    margin-bottom: 4px;
}


/* ================= GALLERY ================= */

.gallery-section {
    background: var(--light-bg);
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
}

.gallery-item {
    position: relative;

    height: 240px;

    overflow: hidden;

    border-radius: 14px;
}

.gallery-item img {
    width: 100%;
    height: 100%;

    object-fit: cover;

    transition: transform 0.5s ease;
}

.gallery-item:hover img {
    transform: scale(1.08);
}

.gallery-item span {
    position: absolute;

    left: 12px;
    bottom: 12px;

    padding: 7px 12px;

    border-radius: 7px;

    background: rgba(255, 255, 255, 0.92);

    color: var(--dark-color);

    font-size: 0.78rem;
    font-weight: 600;
}


/* ================= CONTACT ================= */

.contact-section {
    background: var(--white);
}

.contact-wrapper {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 50px;

    align-items: center;
}

.contact-details {
    margin-top: 25px;

    display: grid;
    gap: 12px;
}

.contact-details p {
    display: flex;
    gap: 10px;

    align-items: center;
}

.contact-card {
    padding: 35px;

    border-radius: 18px;

    background: var(--primary-light);
}

.contact-card h3 {
    margin-bottom: 10px;
}

.contact-card p {
    margin-bottom: 20px;
}


/* ================= FOOTER ================= */

.footer {
    background: var(--dark-color);

    color: rgba(255, 255, 255, 0.75);

    padding-top: 55px;
}

.footer-content {
    display: flex;
    justify-content: space-between;

    gap: 40px;

    padding-bottom: 40px;
}

.footer .brand-name {
    color: var(--white);
}

.footer .brand-name strong {
    color: var(--primary-light);
}

.footer p {
    margin-top: 14px;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;

    gap: 18px;

    align-content: flex-start;
}

.footer-links a:hover {
    color: var(--white);
}

.footer-bottom {
    padding: 18px 5%;

    text-align: center;

    border-top: 1px solid rgba(255, 255, 255, 0.12);
}


/* =========================================================
   RESPONSIVE DESIGN
========================================================= */

@media (max-width: 1100px) {

    .products-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .nav-links {
        gap: 12px;
    }

    .cart-text {
        display: none;
    }

    .cart-button {
        min-width: 50px;
        padding: 0 10px;
    }

}


@media (max-width: 850px) {

    .menu-toggle {
        display: block;
        order: 2;
    }

    .cart-button {
        order: 3;
    }

    .nav-links {
        display: none;

        position: absolute;

        top: 78px;
        left: 0;

        width: 100%;

        padding: 25px 5%;

        background: var(--white);

        border-bottom: 1px solid var(--border-color);

        flex-direction: column;
        align-items: flex-start;

        gap: 18px;
    }

    .nav-links.active {
        display: flex;
    }

    .hero {
        min-height: auto;
        padding: 80px 0;
    }

    .hero-content,
    .why-wrapper,
    .contact-wrapper {
        grid-template-columns: 1fr;
        gap: 45px;
    }

    .hero-text {
        text-align: center;
    }

    .hero-description {
        margin-left: auto;
        margin-right: auto;
    }

    .hero-buttons {
        justify-content: center;
    }

    .about-grid {
        grid-template-columns: 1fr;
    }

    .footer-content {
        flex-direction: column;
    }

}


@media (max-width: 600px) {

    .section {
        padding: 65px 0;
    }

    .products-grid,
    .gallery-grid {
        grid-template-columns: 1fr;
    }

    .hero-text h1 {
        font-size: 2.6rem;
    }

    .hero-visual {
        min-height: 320px;
    }

    .circle-one {
        width: 280px;
        height: 280px;
    }

    .circle-two {
        width: 210px;
        height: 210px;
    }

    .nature-card {
        width: 250px;
        min-height: 260px;
    }

    .product-image {
        height: 240px;
    }

    .navbar {
        min-height: 70px;
    }

    .nav-links {
        top: 70px;
    }

    .brand-logo img {
        width: 42px;
        height: 42px;
    }

    .brand-name {
        font-size: 0.95rem;
    }

    .brand-name strong {
        font-size: 0.75rem;
    }

    .cart-sidebar {
        width: 100%;
    }

    .cart-header {
        padding: 18px 16px;
    }

    .cart-items {
        padding: 16px;
    }

    .cart-footer {
        padding: 16px;
    }

}


@media (max-width: 390px) {

    .brand-name {
        display: none;
    }

    .navbar {
        gap: 10px;
    }

    .product-actions {
        grid-template-columns: 1fr;
    }

}

/* =========================================================
   AUTH AREA - LOGGED IN USER
========================================================= */

.auth-area {
    display: flex;
    align-items: center;
    gap: 10px;
}


.user-welcome {
    color: #243025;
    font-size: 0.9rem;
    font-weight: 600;
    white-space: nowrap;
}


.logout-btn {
    border: none;
    background: #243025;
    color: #ffffff;
    padding: 10px 16px;
    border-radius: 8px;
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: 0.3s ease;
}


.logout-btn:hover {
    background: #4f6f52;
}


.logout-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}


@media (max-width: 768px) {

    .auth-area {
        flex-direction: column;
        align-items: stretch;
        width: 100%;
    }


    .user-welcome {
        text-align: center;
        padding: 10px;
    }


    .logout-btn {
        width: 100%;
    }

}

/* =========================================================
   MY PROFILE LINK
========================================================= */

.profile-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    padding: 10px 16px;

    border-radius: 8px;

    background: #eef5ed;

    color: #355438;

    text-decoration: none;

    font-size: 0.9rem;

    font-weight: 600;

    white-space: nowrap;

    transition: 0.3s ease;
}


.profile-link:hover {
    background: #dfeadd;
    transform: translateY(-1px);
}


/* =========================================================
   MOBILE AUTH AREA
========================================================= */

@media (max-width: 768px) {

    .profile-link {
        width: 100%;
    }

}

/* =========================================================
   KHANAK FOUNDATION
   CHECKOUT PAGE
========================================================= */

.checkout-header {
    background: #ffffff;
    border-bottom: 1px solid #dfe6dc;
    padding: 18px 0;
}


.checkout-header-container {
    width: min(1100px, 92%);
    margin: auto;

    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}


.checkout-brand {
    display: flex;
    align-items: center;
    gap: 14px;

    text-decoration: none;
    color: #26352a;
}


.checkout-brand img {
    width: 62px;
    height: 62px;

    object-fit: cover;

    border-radius: 50%;
}


.checkout-brand h1 {
    margin: 0;

    font-size: 1.4rem;
}


.checkout-brand span {
    display: block;

    margin-top: 3px;

    color: #68766b;

    font-size: 0.9rem;
}


.back-home-btn {
    padding: 12px 20px;

    border: 1px solid #d5ded2;
    border-radius: 12px;

    background: #f7faf6;

    color: #3e5d42;

    text-decoration: none;

    font-weight: 600;

    transition: 0.3s ease;
}


.back-home-btn:hover {
    transform: translateY(-2px);
    background: #eaf2e7;
}


.checkout-page {
    min-height: calc(100vh - 100px);

    padding: 50px 0 70px;

    background:
        linear-gradient(
            135deg,
            #f5f8f3,
            #ffffff
        );
}


.checkout-page > div {
    width: min(1100px, 92%);
    margin: auto;
}


.checkout-heading {
    text-align: center;

    max-width: 700px;
    margin: 0 auto 35px;
}


.checkout-tag {
    margin-bottom: 8px;

    color: #547257;

    font-size: 0.82rem;
    font-weight: 700;

    letter-spacing: 1.5px;
}


.checkout-heading h2 {
    margin: 0 0 10px;

    color: #26352a;

    font-size: clamp(2rem, 4vw, 3rem);
}


.checkout-heading p:last-child {
    color: #69756b;
}


.checkout-loading {
    width: min(500px, 92%);
    margin: 100px auto;

    text-align: center;

    color: #4d644f;
}


.checkout-spinner {
    width: 45px;
    height: 45px;

    margin: 0 auto 18px;

    border: 4px solid #dce8da;
    border-top-color: #4f6f52;

    border-radius: 50%;

    animation: khanakSpin 0.8s linear infinite;
}


@keyframes khanakSpin {

    to {
        transform: rotate(360deg);
    }

}


.checkout-message {
    display: none;

    margin-bottom: 24px;
    padding: 15px 18px;

    border-radius: 12px;

    font-weight: 500;
}


.checkout-message.error {
    display: block;

    background: #fff1ef;
    border: 1px solid #efc4bd;

    color: #a54b3d;
}


.checkout-message.success {
    display: block;

    background: #edf8ec;
    border: 1px solid #bedebc;

    color: #356d39;
}


.checkout-grid {
    display: grid;

    grid-template-columns:
        minmax(0, 1.15fr)
        minmax(330px, 0.85fr);

    gap: 28px;

    align-items: start;
}


.checkout-card {
    background: #ffffff;

    border: 1px solid #e0e7de;
    border-radius: 18px;

    padding: 28px;

    box-shadow:
        0 12px 35px rgba(40, 67, 43, 0.08);
}


.checkout-card-heading {
    display: flex;
    align-items: center;
    gap: 14px;

    padding-bottom: 20px;
    margin-bottom: 25px;

    border-bottom: 1px solid #e6ece4;
}


.checkout-step-number {
    width: 42px;
    height: 42px;

    display: flex;
    align-items: center;
    justify-content: center;

    flex-shrink: 0;

    border-radius: 50%;

    background: #4f6f52;

    color: white;

    font-weight: 700;
}


.checkout-card-heading h3 {
    margin: 0 0 4px;

    color: #29382d;

    font-size: 1.25rem;
}


.checkout-card-heading p {
    margin: 0;

    color: #748075;

    font-size: 0.9rem;
}


.checkout-form-group {
    margin-bottom: 20px;
}


.checkout-form-group label {
    display: block;

    margin-bottom: 8px;

    color: #354237;

    font-weight: 600;
}


.checkout-form-group input {
    width: 100%;

    box-sizing: border-box;

    padding: 14px 15px;

    border: 1px solid #ccd8c9;
    border-radius: 10px;

    background: #fbfcfa;

    color: #28362b;

    font-size: 1rem;

    outline: none;

    transition: 0.3s ease;
}


.checkout-form-group input:focus {
    border-color: #4f6f52;

    box-shadow:
        0 0 0 3px rgba(79, 111, 82, 0.12);
}


.checkout-form-group input[readonly] {
    background: #f2f5f1;

    color: #6c766d;

    cursor: not-allowed;
}


.checkout-info-box {
    display: flex;
    gap: 10px;

    margin: 22px 0;

    padding: 14px;

    border-radius: 10px;

    background: #f4f8f2;

    color: #58705b;
}


.checkout-info-box p {
    margin: 0;

    font-size: 0.9rem;
    line-height: 1.6;
}


.place-order-btn {
    width: 100%;

    padding: 16px;

    border: none;
    border-radius: 12px;

    background: #4f6f52;

    color: #ffffff;

    font-size: 1rem;
    font-weight: 700;

    cursor: pointer;

    transition: 0.3s ease;
}


.place-order-btn:hover:not(:disabled) {
    transform: translateY(-2px);

    background: #3f6044;
}


.place-order-btn:disabled {
    opacity: 0.55;

    cursor: not-allowed;
}


.checkout-items {
    display: flex;
    flex-direction: column;

    gap: 15px;
}


.checkout-item {
    display: flex;
    gap: 14px;

    padding-bottom: 15px;

    border-bottom: 1px solid #edf0eb;
}


.checkout-item-image {
    width: 72px;
    height: 72px;

    flex-shrink: 0;

    overflow: hidden;

    border-radius: 10px;

    background: #f2f5f1;
}


.checkout-item-image img {
    width: 100%;
    height: 100%;

    object-fit: cover;
}


.checkout-item-details {
    flex: 1;
}


.checkout-item-details h4 {
    margin: 0 0 7px;

    color: #2d3b30;

    font-size: 0.98rem;
}


.checkout-item-details p {
    margin: 0 0 7px;

    color: #788278;

    font-size: 0.88rem;
}


.checkout-item-details strong {
    color: #426347;
}


.checkout-summary {
    margin-top: 24px;

    padding-top: 20px;
}


.checkout-summary-row,
.checkout-total-row {
    display: flex;
    justify-content: space-between;
    gap: 20px;

    margin-bottom: 15px;

    color: #69746a;
}


.checkout-summary-row strong {
    color: #3b493d;
}


.checkout-summary-divider {
    height: 1px;

    margin: 18px 0;

    background: #e1e7df;
}


.checkout-total-row {
    margin-bottom: 0;

    color: #26372a;

    font-size: 1.15rem;
    font-weight: 700;
}


.checkout-total-row strong {
    color: #3d6243;

    font-size: 1.35rem;
}


.payment-info {
    display: flex;
    gap: 12px;

    margin-top: 25px;
    padding: 16px;

    border-radius: 12px;

    background: #f8faf7;

    color: #5f6d61;
}


.payment-info strong {
    display: block;

    margin-bottom: 5px;

    color: #344738;
}


.payment-info p {
    margin: 0;

    font-size: 0.85rem;
    line-height: 1.5;
}


.checkout-empty-cart {
    padding: 30px 15px;

    text-align: center;
}


.checkout-empty-cart > div {
    font-size: 2.5rem;
}


.checkout-empty-cart h3 {
    margin: 10px 0;

    color: #314234;
}


.checkout-empty-cart p {
    color: #748075;
}


.checkout-empty-cart a {
    display: inline-block;

    margin-top: 8px;
    padding: 11px 18px;

    border-radius: 9px;

    background: #4f6f52;

    color: white;

    text-decoration: none;
}


/* =========================================================
   SUCCESS MODAL
========================================================= */

.order-success-modal {
    position: fixed;

    inset: 0;

    display: none;
    align-items: center;
    justify-content: center;

    padding: 20px;

    background:
        rgba(24, 37, 27, 0.65);

    z-index: 9999;
}


.order-success-modal.active {
    display: flex;
}


.order-success-box {
    width: min(480px, 100%);

    padding: 38px 30px;

    border-radius: 20px;

    background: #ffffff;

    text-align: center;

    box-shadow:
        0 20px 60px rgba(0, 0, 0, 0.2);

    animation:
        successPop 0.35s ease;
}


@keyframes successPop {

    from {
        opacity: 0;
        transform: scale(0.9);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }

}


.success-icon {
    width: 68px;
    height: 68px;

    display: flex;
    align-items: center;
    justify-content: center;

    margin: 0 auto 20px;

    border-radius: 50%;

    background: #e4f2e2;

    color: #3e7b43;

    font-size: 2rem;
    font-weight: 700;
}


.order-success-box h2 {
    margin: 0 0 10px;

    color: #2c3d30;
}


.order-success-box > p {
    color: #6d786e;

    line-height: 1.6;
}


.order-number-box {
    margin: 22px 0;

    padding: 16px;

    border: 1px dashed #9eb39f;
    border-radius: 12px;

    background: #f6faf5;
}


.order-number-box span {
    display: block;

    margin-bottom: 7px;

    color: #728074;

    font-size: 0.85rem;
}


.order-number-box strong {
    color: #385f3e;

    font-size: 1.2rem;
}


.success-small-text {
    font-size: 0.9rem;
}


.success-whatsapp-btn,
.continue-shopping-btn {
    width: 100%;

    padding: 14px;

    margin-top: 12px;

    border-radius: 10px;

    font-weight: 700;

    cursor: pointer;

    transition: 0.3s ease;
}


.success-whatsapp-btn {
    border: none;

    background: #4f6f52;

    color: white;
}


.success-whatsapp-btn:hover {
    transform: translateY(-2px);

    background: #3d6042;
}


.continue-shopping-btn {
    border: 1px solid #ccd8ca;

    background: white;

    color: #4c654f;
}


.continue-shopping-btn:hover {
    background: #f3f7f2;
}


/* =========================================================
   RESPONSIVE CHECKOUT
========================================================= */

@media (max-width: 850px) {

    .checkout-grid {
        grid-template-columns: 1fr;
    }


    .checkout-header-container {
        align-items: flex-start;
    }

}


@media (max-width: 600px) {

    .checkout-header {
        padding: 14px 0;
    }


    .checkout-header-container {
        flex-direction: column;
    }


    .back-home-btn {
        width: 100%;

        box-sizing: border-box;

        text-align: center;
    }


    .checkout-page {
        padding-top: 30px;
    }


    .checkout-card {
        padding: 20px;
    }


    .checkout-brand h1 {
        font-size: 1.15rem;
    }


    .checkout-brand img {
        width: 52px;
        height: 52px;
    }


    .order-success-box {
        padding: 30px 20px;
    }

}

/* =========================================
   CART DRAWER SCROLL FIX
========================================= */

.cart-drawer {
    display: flex;
    flex-direction: column;
    height: 100vh;
}


/* Product items only will scroll */

.cart-items {
    flex: 1;
    overflow-y: auto;
    padding-bottom: 20px;
}


/* Bottom cart section always visible */

.cart-footer {
    flex-shrink: 0;
    background: #ffffff;
    border-top: 1px solid #e5e5e5;
    padding: 18px 24px 20px;
}


/* Subtotal */

.cart-subtotal {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    font-size: 18px;
    font-weight: 600;
}


/* Checkout button */

.proceed-checkout-btn {
    width: 100%;
    border: none;
    padding: 16px 20px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 17px;
    font-weight: 700;
    margin-bottom: 10px;
    background: #1f2f24;
    color: #ffffff;
}


/* WhatsApp button */

.whatsapp-order-btn {
    width: 100%;
    border: none;
    padding: 15px 20px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 17px;
    font-weight: 700;
    background: #56725d;
    color: #ffffff;
}


.proceed-checkout-btn:hover,
.whatsapp-order-btn:hover {
    opacity: 0.9;
}


/* Mobile */

@media (max-width: 600px) {

    .cart-footer {
        padding: 15px;
    }

    .proceed-checkout-btn,
    .whatsapp-order-btn {
        font-size: 16px;
        padding: 14px;
    }

}