/* =========================================
   WHITNEY'S SHOTS
   INITIAL WEBSITE FOUNDATION
   ========================================= */

:root {
    --green: #0b3d20;
    --green-dark: #071a12;
    --green-light: #1d6a34;
    --yellow: #ffd400;
    --orange: #ff8a00;
    --burgundy: #3b0509;
    --cream: #fffdf4;
    --white: #ffffff;
    --text: #182018;
    --muted: #667066;
    --line: rgba(11, 61, 32, .12);
    --shadow: 0 18px 50px rgba(7, 26, 18, .12);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: Arial, Helvetica, sans-serif;
    color: var(--text);
    background: var(--cream);
    line-height: 1.5;
}

button, a {
    font: inherit;
}

button {
    cursor: pointer;
}

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

/* Header */
.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    min-height: 76px;
    padding: 10px 5%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    background: rgba(255, 253, 244, .94);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--line);
}

.brand img {
    width: 105px;
    height: 58px;
    object-fit: contain;
}

nav {
    display: flex;
    align-items: center;
    gap: 24px;
}

nav a {
    font-weight: 700;
    font-size: .94rem;
}

nav a:hover {
    color: var(--green-light);
}

.menu-btn {
    display: none;
    border: 0;
    background: transparent;
    font-size: 1.7rem;
}

.cart-btn {
    border: 0;
    border-radius: 999px;
    background: var(--green);
    color: white;
    padding: 11px 17px;
    font-weight: 800;
}

.cart-btn span {
    display: inline-grid;
    place-items: center;
    min-width: 22px;
    height: 22px;
    margin-left: 5px;
    padding: 0 5px;
    border-radius: 50%;
    background: var(--yellow);
    color: var(--green-dark);
    font-size: .78rem;
}

/* Hero */
.hero {
    min-height: calc(100vh - 76px);
    padding: 60px 7%;
    display: grid;
    grid-template-columns: 1.05fr .95fr;
    align-items: center;
    gap: 30px;
    background:
        radial-gradient(circle at 85% 15%, rgba(255, 212, 0, .28), transparent 28%),
        linear-gradient(135deg, #fffdf4 0%, #fff4bd 48%, #ffe08a 100%);
}

.hero-copy {
    max-width: 650px;
}

.eyebrow {
    color: var(--green-light);
    font-size: .76rem;
    font-weight: 900;
    letter-spacing: .16em;
    margin-bottom: 12px;
}

h1 {
    color: var(--green-dark);
    font-size: clamp(3rem, 7vw, 6.5rem);
    line-height: .95;
    letter-spacing: -.055em;
}

h1 span {
    color: var(--orange);
}

.hero-text {
    max-width: 570px;
    margin: 24px 0;
    color: #465046;
    font-size: 1.1rem;
}

.hero-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.btn {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    min-height: 48px;
    padding: 0 21px;
    border-radius: 999px;
    border: 1px solid transparent;
    font-weight: 900;
}

.btn.primary {
    background: var(--green);
    color: white;
}

.btn.secondary {
    border-color: var(--green);
    color: var(--green);
}

.btn.full {
    width: 100%;
}

.hero-logo {
    display: grid;
    place-items: center;
}

.hero-logo img {
    width: min(100%, 560px);
    max-height: 520px;
    object-fit: contain;
    filter: drop-shadow(0 30px 35px rgba(59, 5, 9, .22));
}

/* Sections */
.section {
    padding: 90px 7%;
}

.section-heading {
    max-width: 700px;
    margin-bottom: 38px;
}

.section-heading h2,
.story h2 {
    color: var(--green-dark);
    font-size: clamp(2rem, 4vw, 3.5rem);
    line-height: 1;
    letter-spacing: -.035em;
    margin-bottom: 12px;
}

.section-heading p:last-child,
.story p {
    color: var(--muted);
}

/* Products */
.product-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 25px;
}

.product-card {
    overflow: hidden;
    background: white;
    border: 1px solid var(--line);
    border-radius: 28px;
    box-shadow: var(--shadow);
}

.product-visual {
    min-height: 290px;
    display: grid;
    place-items: center;
    padding: 28px;
    background: linear-gradient(135deg, #ffd500, #ff8a00);
}

.product-visual.hibiscus {
    background: linear-gradient(135deg, #5c0710, #2b0206);
}

.product-visual.green-revive {
    background: linear-gradient(135deg, #0d3f25, #062016);
}

.product-visual img {
    width: min(80%, 280px);
    max-height: 270px;
    object-fit: contain;
}

.product-content {
    padding: 26px;
}

.product-content h3 {
    color: var(--green-dark);
    font-size: 1.45rem;
    margin-bottom: 7px;
}

.product-content p {
    color: var(--muted);
}

.product-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    margin-top: 20px;
}

.price {
    color: var(--green);
    font-size: 1.35rem;
    font-weight: 900;
}

.price del {
    color: #899189;
    font-size: .9rem;
    font-weight: 700;
    margin-right: 4px;
}

.add-btn {
    border: 0;
    border-radius: 999px;
    padding: 11px 16px;
    background: var(--green);
    color: white;
    font-weight: 900;
}

/* Story */
.story {
    display: grid;
    grid-template-columns: 1.3fr .7fr;
    gap: 35px;
    align-items: center;
    background: #f4f0df;
}

.info-card {
    padding: 30px;
    border-radius: 25px;
    background: var(--green);
    color: white;
    box-shadow: var(--shadow);
}

.info-card strong,
.info-card span {
    display: block;
}

.info-card strong {
    color: var(--yellow);
    font-size: 1.3rem;
    margin-bottom: 8px;
}

/* Contact */
.contact-section {
    background: white;
}

.contact-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
}

.contact-card {
    border: 1px solid var(--line);
    border-radius: 22px;
    padding: 25px;
    background: var(--cream);
    text-align: left;
}

button.contact-card {
    color: inherit;
}

.contact-card span,
.contact-card strong,
.contact-card small {
    display: block;
}

.contact-card span {
    font-size: 1.8rem;
    margin-bottom: 12px;
}

.contact-card strong {
    color: var(--green-dark);
    font-size: 1.1rem;
}

.contact-card small {
    color: var(--muted);
    margin-top: 4px;
}

/* Footer */
footer {
    padding: 35px 7%;
    background: var(--green-dark);
    color: white;
    text-align: center;
}

footer img {
    width: 115px;
    height: 60px;
    object-fit: contain;
    margin-bottom: 10px;
}

footer p {
    opacity: .75;
    font-size: .85rem;
}

/* Cart */
.overlay {
    position: fixed;
    inset: 0;
    z-index: 70;
    background: rgba(0, 0, 0, .45);
    opacity: 0;
    pointer-events: none;
    transition: .25s;
}

.cart-panel {
    position: fixed;
    top: 0;
    right: 0;
    z-index: 80;
    width: min(430px, 92vw);
    height: 100vh;
    padding: 25px;
    background: white;
    transform: translateX(100%);
    transition: transform .3s ease;
    box-shadow: -20px 0 50px rgba(0,0,0,.18);
    display: flex;
    flex-direction: column;
}

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

.overlay.open {
    opacity: 1;
    pointer-events: auto;
}

.cart-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.cart-head button {
    border: 0;
    background: transparent;
    font-size: 2rem;
}

.cart-items {
    flex: 1;
    overflow-y: auto;
}

.empty-cart {
    color: var(--muted);
    padding: 30px 0;
}

.cart-item {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 12px;
    padding: 15px 0;
    border-bottom: 1px solid var(--line);
}

.cart-item strong {
    display: block;
}

.qty-controls {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 7px;
}

.qty-controls button {
    width: 28px;
    height: 28px;
    border: 1px solid var(--line);
    border-radius: 50%;
    background: white;
}

.cart-total {
    display: flex;
    justify-content: space-between;
    padding: 20px 0;
    border-top: 1px solid var(--line);
    font-size: 1.15rem;
}

@media (max-width: 800px) {
    nav {
        display: none;
        position: absolute;
        top: 76px;
        left: 0;
        right: 0;
        padding: 18px 5%;
        flex-direction: column;
        align-items: stretch;
        background: var(--cream);
        border-bottom: 1px solid var(--line);
    }

    nav.open {
        display: flex;
    }

    .menu-btn {
        display: block;
    }

    .hero {
        grid-template-columns: 1fr;
        text-align: center;
        padding-top: 45px;
    }

    .hero-text {
        margin-left: auto;
        margin-right: auto;
    }

    .hero-actions {
        justify-content: center;
    }

    .hero-logo img {
        width: min(90%, 390px);
    }

    .product-grid,
    .contact-grid,
    .story {
        grid-template-columns: 1fr;
    }

    .section {
        padding: 65px 5%;
    }
}

@media (max-width: 480px) {
    h1 {
        font-size: 3.2rem;
    }

    .site-header {
        padding-left: 4%;
        padding-right: 4%;
    }

    .brand img {
        width: 92px;
    }

    .product-visual {
        min-height: 245px;
    }
}


/* =========================================
   FUNCTIONAL OVERLAYS
   These additions do not alter the existing
   public-page layout. They are used only when
   checkout, quotation, invoice or admin tools
   are opened.
   ========================================= */

.modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 18px;
    background: rgba(0,0,0,.58);
}

.modal-backdrop.open { display: flex; }

.modal {
    width: min(760px, 100%);
    max-height: 92vh;
    overflow-y: auto;
    background: #fff;
    color: var(--text);
    border-radius: 24px;
    box-shadow: 0 25px 80px rgba(0,0,0,.3);
}

.modal-head {
    position: sticky;
    top: 0;
    z-index: 2;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 22px;
    background: #fff;
    border-bottom: 1px solid var(--line);
}

.modal-head h2 { color: var(--green-dark); }

.modal-close {
    border: 0;
    background: transparent;
    font-size: 2rem;
    line-height: 1;
}

.modal-body { padding: 22px; }

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-group.full-width { grid-column: 1 / -1; }

.form-group label {
    font-size: .8rem;
    font-weight: 800;
    color: var(--green-dark);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    border: 1px solid #d8ded8;
    border-radius: 12px;
    padding: 12px 13px;
    background: #fff;
    color: var(--text);
    outline: none;
}

.form-group textarea { min-height: 90px; resize: vertical; }

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--green-light);
}

.modal-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 20px;
}

.document-preview {
    background: #fff;
    border: 1px solid #ddd;
    padding: 26px;
    color: #111;
}

.document-header {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    border-bottom: 2px solid var(--green);
    padding-bottom: 18px;
    margin-bottom: 18px;
}

.document-header img { width: 130px; height: 70px; object-fit: contain; }
.document-title { text-align: right; }
.document-title h2 { color: var(--green-dark); margin-bottom: 5px; }

.document-table {
    width: 100%;
    border-collapse: collapse;
    margin: 18px 0;
    font-size: .9rem;
}

.document-table th,
.document-table td {
    padding: 9px 7px;
    border-bottom: 1px solid #ddd;
    text-align: left;
}

.document-table th { background: #f4f6f0; }
.document-table .right { text-align: right; }

.document-total {
    margin-left: auto;
    width: min(320px, 100%);
}

.document-total div {
    display: flex;
    justify-content: space-between;
    padding: 6px 0;
}

.document-total .grand {
    margin-top: 6px;
    padding-top: 10px;
    border-top: 2px solid var(--green);
    font-size: 1.15rem;
    font-weight: 900;
}

.admin-modal { width: min(1050px, 100%); }

.admin-tabs {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.admin-tab {
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 9px 14px;
    background: #fff;
    color: var(--green-dark);
    font-weight: 800;
}

.admin-tab.active {
    background: var(--green);
    color: #fff;
}

.admin-panel { display: none; }
.admin-panel.active { display: block; }

.stat-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-bottom: 20px;
}

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

.stat-card small,
.stat-card strong { display: block; }
.stat-card small { color: var(--muted); }
.stat-card strong { color: var(--green-dark); font-size: 1.45rem; margin-top: 5px; }

.admin-table-wrap { overflow-x: auto; }
.admin-table { width: 100%; border-collapse: collapse; min-width: 650px; }
.admin-table th, .admin-table td { padding: 10px; border-bottom: 1px solid var(--line); text-align: left; }
.admin-table th { background: #f4f6f0; }

.small-btn {
    border: 0;
    border-radius: 9px;
    padding: 7px 10px;
    background: var(--green);
    color: #fff;
    font-weight: 800;
}

@media (max-width: 650px) {
    .form-grid { grid-template-columns: 1fr; }
    .form-group.full-width { grid-column: auto; }
    .stat-grid { grid-template-columns: repeat(2, 1fr); }
    .document-header { flex-direction: column; }
    .document-title { text-align: left; }
}

@media print {
    body > *:not(#documentModal) { display: none !important; }
    #documentModal { position: static; display: block !important; background: white; padding: 0; }
    #documentModal .modal { width: 100%; max-height: none; box-shadow: none; border-radius: 0; }
    #documentModal .modal-head,
    #documentModal .modal-actions { display: none !important; }
    #documentModal .modal-body { padding: 0; }
    .document-preview { border: 0; padding: 0; }
}


/* Admin-only document controls */
.admin-document-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 18px;
}

.whatsapp-target {
    margin: 0 0 12px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #f8faf6;
}

.whatsapp-target label {
    display: block;
    margin-bottom: 6px;
    color: var(--green-dark);
    font-size: .78rem;
    font-weight: 800;
}

.whatsapp-target input {
    width: 100%;
    border: 1px solid #d8ded8;
    border-radius: 10px;
    padding: 10px 12px;
}

@media print {
    body > *:not(#documentModal) { display: none !important; }
    #documentModal {
        position: static !important;
        display: block !important;
        background: #fff !important;
        padding: 0 !important;
    }
    #documentModal .modal {
        max-height: none !important;
        width: 100% !important;
        box-shadow: none !important;
        border-radius: 0 !important;
    }
    #documentModal .modal-head,
    #documentModal .modal-actions,
    #documentWhatsAppTarget { display: none !important; }
    #documentModal .modal-body { padding: 0 !important; }
}

/* =========================================
   ORDER -> QUOTATION -> INVOICE WORKFLOW
   ========================================= */
.orders-heading { display:flex; justify-content:space-between; gap:18px; margin-bottom:16px; }
.orders-heading h3 { margin:2px 0 5px; color:var(--green-dark); font-size:1.35rem; }
.admin-helper { margin:0; color:var(--muted); max-width:760px; font-size:.9rem; line-height:1.55; }
.orders-table td { vertical-align:middle; }
.orders-table td small { color:var(--muted); }
.order-actions { display:flex; flex-wrap:wrap; gap:7px; min-width:220px; }
.order-actions .small-btn { cursor:pointer; }
.quote-action { background:#b07b10; }
.invoice-action { background:var(--green-dark); }
.empty-admin { display:flex; flex-direction:column; gap:4px; padding:12px 0; color:var(--muted); }
.empty-admin strong { color:var(--green-dark); }

.document-preview {
    background:#fff;
    border:1px solid #e7e4da;
    border-radius:20px;
    padding:30px;
    box-shadow:0 16px 45px rgba(7,26,18,.08);
    color:#1d241f;
}
.document-brand-line { height:5px; border-radius:5px; background:linear-gradient(90deg,#0b3d20,#c49324,#0b3d20); margin:-30px -30px 26px; }
.document-brand { display:flex; align-items:center; gap:13px; }
.document-brand img { width:92px; height:62px; object-fit:contain; }
.document-brand strong { display:block; color:var(--green-dark); letter-spacing:.08em; font-size:1rem; }
.document-brand small { display:block; color:var(--muted); margin-top:3px; }
.document-title { text-align:right; display:flex; flex-direction:column; gap:3px; }
.document-type { color:#b07b10; font-size:1.45rem; font-weight:950; letter-spacing:.1em; }
.document-title strong { color:var(--green-dark); font-size:1rem; }
.document-title small { color:var(--muted); }
.document-parties { display:grid; grid-template-columns:1fr 1fr; gap:15px; margin:24px 0 18px; }
.document-parties > div { background:#f7f4e9; border:1px solid #e9e4d5; border-radius:14px; padding:13px 15px; }
.document-parties span { display:block; font-size:.68rem; font-weight:900; letter-spacing:.12em; color:#b07b10; margin-bottom:5px; }
.document-parties strong,.document-parties small { display:block; }
.document-parties strong { color:var(--green-dark); }
.document-parties small { color:var(--muted); margin-top:3px; word-break:break-word; }
.document-intro { color:#566057; line-height:1.6; margin-bottom:18px; }

@media (max-width:650px) {
    .order-actions { min-width:180px; }
    .document-preview { padding:20px; }
    .document-brand-line { margin:-20px -20px 20px; }
    .document-parties { grid-template-columns:1fr; }
    .document-title { text-align:left; }
}


/* Document image tools — functional addition, existing UI unchanged */
.document-image-tools {
    margin-top: 18px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: #f8faf6;
}

.document-image-heading {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin-bottom: 10px;
}

.document-image-heading strong {
    color: var(--green-dark);
}

.document-image-heading span {
    color: var(--muted);
    font-size: .82rem;
}

.document-image-frame {
    display: grid;
    place-items: center;
    width: 100%;
    max-height: 520px;
    overflow: auto;
    border-radius: 10px;
    background: #e9ede7;
    padding: 8px;
}

.document-image-frame img {
    display: block;
    width: min(100%, 560px);
    height: auto;
    border-radius: 5px;
    box-shadow: 0 8px 24px rgba(0,0,0,.12);
}

.document-close-btn {
    min-width: 105px;
}

/* A document opened from inside the admin modal is always above it. */
#documentModal {
    z-index: 300;
}
#adminModal {
    z-index: 100;
}

/* A4 output in the system print dialog. */
@media print {
    @page {
        size: A4 portrait;
        margin: 0;
    }
    html, body {
        width: 210mm !important;
        margin: 0 !important;
        padding: 0 !important;
    }
    .print-sheet {
        width: 210mm;
        min-height: 297mm;
        padding: 12mm;
        margin: 0;
    }
}


/* Whitney's Shots branded confirmation dialog */
.brand-notice-backdrop {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: grid;
    place-items: center;
    padding: 22px;
    background: rgba(4, 15, 10, .72);
    backdrop-filter: blur(5px);
}
.brand-notice-card {
    position: relative;
    width: min(440px, 100%);
    padding: 30px 26px 26px;
    border: 1px solid #e4e8df;
    border-radius: 24px;
    background: #fff;
    color: #173b2a;
    text-align: center;
    box-shadow: 0 24px 80px rgba(0,0,0,.28);
    overflow: hidden;
}
.brand-notice-accent {
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 7px;
    background: linear-gradient(90deg, #173b2a, #d4af37);
}
.brand-notice-logo { width: 88px; height: 76px; object-fit: contain; margin: 4px auto 8px; }
.brand-notice-kicker { margin: 0 0 8px; color: #a27c18; font-size: .7rem; font-weight: 900; letter-spacing: .13em; }
.brand-notice-card h2 { margin: 0 0 12px; color: #173b2a; font-size: 1.45rem; }
.brand-notice-message { margin: 0 auto 22px; max-width: 340px; color: #626b64; line-height: 1.6; }
.brand-notice-card .btn { min-width: 130px; justify-content: center; }
