/* ========================================
   1. ROOT VARIABLES
======================================== */

:root {
    --cream: #faf7ef;
    --paper: #fffdf8;
    --sage: #dce5d1;
    --sage-dark: #596a4d;
    --matcha: #788b67;
    --cocoa: #49382f;
    --muted: #8b8278;
    --pink: #f2d8d2;
    --yellow: #f2e4b7;
    --line: #e9e1d4;
    --shadow: 0 14px 35px #49382f0d;
}

/* ========================================
   2. GLOBAL STYLES
======================================== */

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: var(--cream);
    color: var(--cocoa);
    font-family: 'DM Sans', sans-serif;
    font-size: 15px;
}

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

button,
input,
select,
textarea {
    font: inherit;
}

/* ========================================
   3. HEADER & NAVIGATION
======================================== */

.site-header {
    height: 82px;
    padding: 0 max(5vw, 22px);
    display: flex;
    align-items: center;
    gap: 34px;
    background: #faf7efef;
    border-bottom: 1px solid var(--line);
    position: sticky;
    top: 0;
    z-index: 10;
    backdrop-filter: blur(12px);
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font: 600 23px Fredoka, sans-serif;
    white-space: nowrap;
}

.brand small {
    display: block;
    font: 700 9px 'DM Sans', sans-serif;
    letter-spacing: 3px;
    margin-top: -2px;
}

.brand-mark {
    width: 43px;
    height: 43px;
    border-radius: 15px;
    background: var(--sage);
    display: grid;
    place-items: center;
    color: var(--sage-dark);
    font: 700 27px Fredoka, sans-serif;
}

.site-header nav {
    display: flex;
    gap: 27px;
    margin: auto;
    font-size: 14px;
}

.site-header nav a:hover,
.header-actions a:hover {
    color: var(--matcha);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 17px;
    font-size: 13px;
}

.cart-link {
    border: 1px solid var(--line);
    padding: 10px 14px;
    border-radius: 30px;
}

.cart-link span {
    background: var(--sage);
    padding: 3px 7px;
    border-radius: 20px;
    margin-left: 5px;
}

/* ========================================
   4. PAGE LAYOUT
======================================== */

.page-shell {
    max-width: 1180px;
    min-height: 65vh;
    margin: auto;
    padding: 38px 24px 75px;
}

.page-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
    margin-bottom: 22px;
}

.page-title {
    font: 600 37px Fredoka, sans-serif;
    margin: 5px 0;
}

.eyebrow {
    text-transform: uppercase;
    letter-spacing: 2.6px;
    font-size: 11px;
    color: var(--matcha);
    font-weight: 700;
}

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

.intro {
    color: #786e64;
    line-height: 1.8;
    max-width: 490px;
}

/* ========================================
   5. HERO SECTION
======================================== */

.hero {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    align-items: center;
    gap: 40px;
    min-height: 470px;
}

.hero h1 {
    font: 600 clamp(42px, 6vw, 74px)/1.02 Fredoka, sans-serif;
    letter-spacing: -1.5px;
    margin: 18px 0;
}

.hero h1 em {
    color: var(--matcha);
    font-style: normal;
}

.hero p {
    color: #786e64;
    line-height: 1.8;
    max-width: 490px;
}

.hero .btn {
    margin-top: 14px;
}

.hero-art {
    background: var(--sage);
    border-radius: 48% 48% 35px 35px;
    min-height: 360px;
    display: grid;
    place-items: center;
    position: relative;
    overflow: hidden;
}

.hero-art::before,
.hero-art::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    background: var(--yellow);
}

.hero-art::before {
    width: 190px;
    height: 190px;
    right: -38px;
    top: 20px;
}

.hero-art::after {
    width: 130px;
    height: 130px;
    left: -30px;
    bottom: 24px;
    background: var(--pink);
}

.hero-cup {
    z-index: 1;
    font-size: 115px;
    filter: drop-shadow(0 15px 12px #49382f18);
}

.floating-note {
    position: absolute;
    z-index: 2;
    background: var(--paper);
    padding: 12px 17px;
    border-radius: 20px;
    font: 500 16px Fredoka, sans-serif;
    box-shadow: var(--shadow);
}

.note-one {
    left: 10%;
    top: 22%;
}

.note-two {
    right: 8%;
    bottom: 18%;
}

/* ========================================
   6. BUTTONS & LINKS
======================================== */

.btn {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    border: 0;
    background: var(--sage-dark);
    color: white;
    border-radius: 30px;
    padding: 13px 21px;
    font-weight: 700;
    cursor: pointer;
    transition: 0.2s;
}

.btn:hover {
    transform: translateY(-2px);
    background: #46553d;
}

.btn.secondary {
    background: var(--paper);
    border: 1px solid var(--line);
    color: var(--cocoa);
}

.btn.danger {
    background: #a8584c;
}

.btn.small {
    padding: 8px 13px;
    font-size: 12px;
}

.link {
    color: var(--sage-dark);
    text-decoration: underline;
    text-underline-offset: 3px;
}

/* ========================================
   7. SECTION HEADINGS
======================================== */

.section-head {
    display: flex;
    justify-content: space-between;
    align-items: end;
    gap: 20px;
    margin: 55px 0 22px;
}

.section-head h2 {
    font: 600 37px Fredoka, sans-serif;
    margin: 5px 0;
}

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

/* ========================================
   8. FEATURE STRIP
======================================== */

.feature-strip {
    margin-top: 70px;
    background: var(--yellow);
    border-radius: 28px;
    padding: 30px;
    display: flex;
    justify-content: space-around;
    gap: 20px;
    flex-wrap: wrap;
}

.feature-strip strong {
    font: 500 19px Fredoka, sans-serif;
}

.feature-strip span {
    display: block;
    color: #766c5b;
    font-size: 12px;
    margin-top: 5px;
}

/* ========================================
   9. CATEGORY FILTERS
======================================== */

.category-row {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin: 24px 0;
}

.chip {
    padding: 9px 16px;
    border-radius: 30px;
    border: 1px solid var(--line);
    background: var(--paper);
    font-size: 13px;
}

.chip.active,
.chip:hover {
    background: var(--sage);
    border-color: var(--sage);
    color: var(--sage-dark);
}

/* ========================================
   10. PRODUCT CARDS
======================================== */

.product-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 19px;
}

.product-card {
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: 23px;
    padding: 13px;
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
}

.product-art {
    height: 155px;
    border-radius: 16px;
    background: var(--art, var(--sage));
    display: grid;
    place-items: center;
    font-size: 66px;
    position: relative;
}

.product-art span {
    filter: drop-shadow(0 7px 5px #49382f12);
}

.product-card h3 {
    font: 500 19px Fredoka, sans-serif;
    margin: 14px 0 5px;
}

.product-card p {
    color: var(--muted);
    font-size: 12px;
    line-height: 1.5;
    margin: 0 0 15px;
    flex: 1;
}

.product-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.price {
    font-weight: 700;
}

.add-btn {
    width: 34px;
    height: 34px;
    border: 0;
    border-radius: 50%;
    background: var(--sage);
    color: var(--sage-dark);
    font-size: 22px;
    cursor: pointer;
}

.add-btn:hover {
    background: var(--sage-dark);
    color: white;
}

/* ========================================
   11. PANELS & FORMS
======================================== */

.two-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

.panel,
.form-card {
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: 24px;
    padding: 25px;
    box-shadow: var(--shadow);
}

.form-card {
    max-width: 620px;
    margin: 20px auto;
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.field {
    display: flex;
    flex-direction: column;
    gap: 7px;
    margin-bottom: 15px;
}

.field.full {
    grid-column: 1 / -1;
}

.field label {
    font-size: 12px;
    font-weight: 700;
}

.field input,
.field select,
.field textarea {
    width: 100%;
    padding: 12px 13px;
    border-radius: 12px;
    border: 1px solid var(--line);
    background: #fffefa;
    color: var(--cocoa);
    outline-color: var(--matcha);
}

.field textarea {
    min-height: 85px;
    resize: vertical;
}

/* ========================================
   12. TABLES
======================================== */

.table-wrap {
    overflow: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 570px;
}

.data-table th,
.data-table td {
    text-align: left;
    padding: 13px 12px;
    border-bottom: 1px solid var(--line);
    font-size: 13px;
}

.data-table th {
    color: var(--muted);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* ========================================
   13. STATUS LABELS
======================================== */

.status {
    display: inline-block;
    border-radius: 20px;
    padding: 5px 9px;
    font-size: 11px;
    font-weight: 700;
    background: #f4e6bd;
    color: #78602a;
}

.status.paid,
.status.completed,
.status.ready {
    background: #dce9d4;
    color: #4e6b40;
}

.status.cancelled,
.status.failed {
    background: #f3d9d4;
    color: #8a443c;
}

.status.pending {
    background: #f4e6bd;
    color: #78602a;
}

.status.preparing {
    background: #dfe8f1;
    color: #4b6781;
}

/* ========================================
   14. CART & ORDER DETAILS
======================================== */

.qty-controls {
    display: flex;
    align-items: center;
    gap: 10px;
}

.qty-controls form {
    display: inline;
}

.qty-controls button {
    border: 1px solid var(--line);
    background: white;
    border-radius: 8px;
    padding: 3px 9px;
    cursor: pointer;
}

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

.summary-line.total {
    font-size: 19px;
    font-weight: 700;
    border-bottom: 0;
}

.order-item {
    display: flex;
    justify-content: space-between;
    gap: 15px;
    padding: 12px 0;
    border-bottom: 1px solid var(--line);
}

.payment-choice {
    border: 1px solid var(--line);
    border-radius: 15px;
    padding: 15px;
    margin: 10px 0;
    display: flex;
    gap: 12px;
    align-items: start;
}

.payment-choice input {
    margin-top: 4px;
}

/* ========================================
   15. ALERTS & NOTICES
======================================== */

.alert {
    padding: 13px 15px;
    border-radius: 13px;
    background: var(--sage);
    margin-bottom: 17px;
    font-size: 13px;
}

.alert.error {
    background: #f6dfda;
    color: #87483d;
}

.notice {
    background: #fff1cf;
    border: 1px solid #eddda7;
    padding: 15px;
    border-radius: 14px;
    color: #6b5731;
    font-size: 13px;
    line-height: 1.6;
}

/* ========================================
   16. EMPTY STATE
======================================== */

.empty {
    text-align: center;
    padding: 45px 15px;
}

.empty .emoji {
    font-size: 50px;
}

/* ========================================
   17. DASHBOARD & STAFF NAVIGATION
======================================== */

.dashboard-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin: 24px 0;
}

.stat-card {
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: 20px;
    padding: 20px;
}

.stat-card span {
    color: var(--muted);
    font-size: 12px;
}

.stat-card strong {
    display: block;
    font: 600 30px Fredoka, sans-serif;
    margin-top: 8px;
}

.staff-nav {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin: 18px 0 25px;
}

.staff-nav a {
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: 20px;
    padding: 9px 14px;
    font-size: 13px;
}

.staff-nav a:hover {
    background: var(--sage);
}

/* ========================================
   18. FOOTER
======================================== */

.site-footer {
    border-top: 1px solid var(--line);
    padding: 30px max(5vw, 22px);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
}

.site-footer p,
.site-footer > span {
    font-size: 12px;
    color: var(--muted);
}

/* ========================================
   19. RESPONSIVE: TABLETS
======================================== */

@media (max-width: 850px) {
    .site-header {
        gap: 16px;
        flex-wrap: wrap;
        height: auto;
        padding-top: 14px;
        padding-bottom: 14px;
    }

    .site-header nav {
        order: 3;
        width: 100%;
        justify-content: center;
        gap: 20px;
    }

    .header-actions {
        margin-left: auto;
    }

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

    .hero-art {
        min-height: 270px;
    }

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

    .two-col {
        grid-template-columns: 1fr;
    }

    .site-footer {
        justify-content: center;
        text-align: center;
    }

    .dashboard-stats {
        grid-template-columns: 1fr 1fr;
    }
}

/* ========================================
   20. RESPONSIVE: MOBILE
======================================== */

@media (max-width: 520px) {
    .page-shell {
        padding: 25px 15px 50px;
    }

    .brand {
        font-size: 20px;
    }

    .header-actions {
        gap: 10px;
        font-size: 12px;
    }

    .site-header nav {
        font-size: 12px;
    }

    .product-grid {
        gap: 10px;
    }

    .product-card {
        padding: 9px;
    }

    .product-art {
        height: 120px;
        font-size: 51px;
    }

    .product-card h3 {
        font-size: 16px;
    }

    .product-bottom {
        align-items: start;
        flex-direction: column;
    }

    .add-btn {
        width: 100%;
        border-radius: 12px;
    }

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

    .field.full {
        grid-column: auto;
    }

    .dashboard-stats {
        grid-template-columns: 1fr;
    }

    .section-head h2,
    .page-title {
        font-size: 31px;
    }

    .hero h1 {
        font-size: 49px;
    }
}

.site-header nav a {
    font-weight: 500;
    color: var(--cocoa);
    transition: color 0.2s ease;
}

.site-header nav a.active {
    font-weight: 700;
    color: var(--sage-dark);
}

.cart-link {
    font-weight: 500;
    color: var(--cocoa);
    transition: color 0.2s ease;
}

.cart-link.active {
    font-weight: 700;
    color: var(--sage-dark);
}


.site-header .brand {
    display: flex;
    align-items: center;
    flex: 0 0 150px;
    min-width: 0;
    height: 100%;
    overflow: visible;
}

.site-header .brand-logo {
    display: block;
    width: 150px;
    max-width: 100%;
    height: 65px;
    object-fit: contain;
    object-position: left center;
}

/* Padoo logo and brand name */
.site-header .brand {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 0 0 auto;
    text-decoration: none;
    white-space: nowrap;
}

.site-header .brand-logo {
    display: block;
    width: 58px;
    height: 58px;
    object-fit: cover;
    object-position: center;
    border-radius: 14px;
    flex-shrink: 0;
}

.brand-text {
    display: flex;
    flex-direction: column;
    justify-content: center;
    line-height: 1.1;
}

.brand-name {
    font-family: 'Fredoka', sans-serif;
    font-size: 23px;
    font-weight: 600;
    color: var(--cocoa);
}

.brand-subtitle {
    font-family: 'DM Sans', sans-serif;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 3px;
    color: var(--sage-dark);
    margin-top: 4px;
}

/* Footer logo */
.site-footer .footer-brand {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    text-decoration: none;
    margin-bottom: 16px;
}

.site-footer .footer-logo {
    display: block;
    width: 58px;
    height: 58px;
    object-fit: cover;
    border-radius: 14px;
    flex-shrink: 0;
}

.site-footer .footer-brand-text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    line-height: 1.1;
}

.site-footer .footer-brand-name {
    font-family: 'Fredoka', sans-serif;
    font-size: 23px;
    font-weight: 600;
    color: var(--cocoa);
}

.site-footer .footer-brand-subtitle {
    font-family: 'DM Sans', sans-serif;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 3px;
    color: var(--sage-dark);
    margin-top: 4px;
}

/* PRODUCT IMAGE - SQUARE FORMAT */
.product-card .product-image-box {
    width: 100%;
    height: auto;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--paper);
    border-radius: 16px;
}

.product-card .product-image-box img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 0;
}

/* PRODUCT FORM */
.product-card form {
    width: 100%;
    margin-top: 12px;
}

/* ADD TO BAG BUTTON */
.product-card .add-btn.add-btn-wide {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    height: auto;
    min-height: 42px;
    padding: 11px 8px;
    border: 0;
    border-radius: 12px;
    background: var(--sage);
    color: var(--sage-dark);
    font-size: 13px;
    font-weight: 700;
    line-height: 1.4;
    white-space: nowrap;
    word-break: normal;
    overflow-wrap: normal;
    cursor: pointer;
    box-sizing: border-box;
}

.product-card .add-btn.add-btn-wide:hover {
    background: var(--sage-dark);
    color: white;
}

/* COFFEE OPTION */
.product-card form label {
    display: block;
    font-size: 12px;
    font-weight: 700;
    margin-top: 10px;
}

/* Coffee option dropdown - consistent on Home & Menu */
.product-card form select {
    display: block;
    width: 100%;
    margin: 8px 0 12px;
    padding: 10px;
    border: 1px solid #e9e1d4;
    border-radius: 10px;
    background: #fffdf8;
    color: #49382f;
    font-family: inherit;
    font-size: 14px;
    box-sizing: border-box;
    cursor: pointer;
}


/* Padoo cafe photo slideshow */
.hero-art .hero-cup.hero-slideshow {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    margin: 0;
    padding: 0;
    overflow: hidden;
    isolation: isolate;
    font-size: 0;
    filter: none;
    border-radius: inherit;
}

/* Images fill the original hero shape */
.hero-art .hero-slideshow .hero-slide {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    opacity: 0;
    transition: opacity 1.2s ease-in-out;
    z-index: 0;
}

.hero-art .hero-slideshow .hero-slide.active {
    opacity: 1;
}

/* Decorative circles stay behind the photos */
.hero-art::before,
.hero-art::after {
    z-index: 0;
    pointer-events: none;
}

/* Floating notes stay visible above the slideshow */
.hero-art .floating-note {
    z-index: 2;
}

/* Support reduced-motion settings */
@media (prefers-reduced-motion: reduce) {
    .hero-art .hero-slideshow .hero-slide {
        transition: none;
    }
}
.product-art img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    border-radius: inherit;
}

/* Menu product card layout */
.product-card {
    display: flex;
    flex-direction: column;
}

.product-info {
    flex: 1;
}

.product-bottom {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    margin-top: 16px;
}

.product-cart-form {
    width: 100%;
}

.product-cart-form .add-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-sizing: border-box;
}

/* Product images */
.product-art img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    border-radius: inherit;
}

/* Category headings */
.menu-category-heading {
    margin: 32px 0 16px;
}

.menu-category-heading h2 {
    margin: 0;
}

/* MENU PAGE - MATCH HOMEPAGE PRODUCT CARDS */
.menu-category-heading {
    margin: 32px 0 16px;
}

.menu-category-heading h2 {
    margin: 0;
}

/* Keep menu product images square like homepage */
.menu-page .product-image-box {
    width: 100%;
    aspect-ratio: 1 / 1;
    height: auto;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--paper);
    border-radius: 16px;
}

.menu-page .product-image-box img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: contain;
    padding: 0;
}

/* Price above full-width button */
.menu-page .product-bottom {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    margin-top: 16px;
}

.menu-page .product-cart-form {
    width: 100%;
    margin-top: 0;
}

.menu-page .add-btn.add-btn-wide {
    width: 100%;
    min-height: 42px;
    height: auto;
    padding: 11px 8px;
    border: 0;
    border-radius: 12px;
    background: var(--sage);
    color: var(--sage-dark);
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
}

.menu-page .add-btn.add-btn-wide:hover {
    background: var(--sage-dark);
    color: white;
}

/* Align product cards and Add to Bag buttons */
.menu-page .product-card {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.menu-page .product-info {
    flex: 1;
}

.menu-page .product-bottom {
    margin-top: auto;
    padding-top: 16px;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
}

.menu-page .product-cart-form {
    width: 100%;
    margin-top: 0;
}

.menu-page .product-cart-form label {
    display: block;
    margin: 0 0 7px;
}

.menu-page .product-cart-form .add-btn.add-btn-wide {
    width: 100%;
    min-height: 42px;
}
