/* ==========================================================================
   make-own-pack.php — "Make Your Own Pack" (employer custom package)
   Same look as before. The page used to have two <head> blocks, each with a
   large <style>; this file is the two merged into what the browser actually
   applied (the second block won where they overlapped). Colours now come from
   the palette tokens and there is a proper dark mode.
   Scoped under body.mop-page; the old global "* { margin:0; padding:0 }"
   reset now only applies to the page content, not the shared header/footer.
   Unused legacy rules (.ddd, .sbtbtnsp, .sp-quantity, .checkoutsummarypage
   .table …) have been dropped — nothing on the page uses them.
   ========================================================================== */

.mop-page {
    /* page variables, now on the palette */
    --mop-surface: var(--theme-bg-surface, #ffffff);                  /* was #ffffff */
    --mop-soft: var(--theme-bg-subtle-6, #f5f5f5);                    /* was #f5f5f5 */
    --mop-softer: var(--theme-bg-muted-2, #efefef);                   /* was #efefef */
    --mop-text: var(--theme-text-strong, #0d0d0d);                    /* was #0d0d0d */
    --mop-text-2: var(--theme-text, #555555);                         /* was #555555 */
    --mop-text-3: var(--theme-text-faint, #999999);                   /* was #999999 */
    --mop-line-1: color-mix(in srgb, var(--theme-text-strong, #000) 12%, transparent);  /* was rgba(0,0,0,.12) */
    --mop-line-2: color-mix(in srgb, var(--theme-text-strong, #000) 25%, transparent);  /* was rgba(0,0,0,.25) */
    --mop-line-3: color-mix(in srgb, var(--theme-text-strong, #000) 38%, transparent);  /* was rgba(0,0,0,.38) */
    --mop-brand: var(--theme-text-blue-10, #1a3fa8);                  /* navy buttons / package name, was #1a3fa8 */
    --mop-brand-hover: color-mix(in srgb, var(--mop-brand) 82%, #000);/* was #162f85 */
    --mop-brand-text: var(--mop-brand);
    --mop-accent: var(--theme-primary, #1ca3c2);                      /* prices, was #1ca3c2 */
    --mop-radius: 12px;
    --mop-font: 'Segoe UI', system-ui, -apple-system, sans-serif;
}
html.dark .mop-page {
    --mop-softer: var(--theme-bg-muted);
    --mop-brand: var(--theme-button-bg);
    --mop-brand-hover: var(--theme-button-hover);
    --mop-brand-text: var(--theme-link);
    --mop-accent: var(--theme-accent);
}

/* page background (was #efefef) */
body.mop-page { background: var(--mop-softer); color: var(--mop-text); }
html.dark body.mop-page { background: var(--theme-page); }

/* reset + font, page content only */
.mop-main, .mop-main *, .mop-main *::before, .mop-main *::after { box-sizing: border-box; margin: 0; padding: 0; }
.mop-main { font-family: var(--mop-font); color: var(--mop-text); }

/* ── Hero ── */
.mop-main .page-hero {
    background: linear-gradient(135deg, #001b85 0%, var(--mop-accent) 100%);   /* was #001b85 → #1ca3c2 */
    padding: 2.5rem 2rem 2rem;
    color: #fff;
    position: relative;
    overflow: hidden;
    text-align: center;
    border-radius: 15px;
    margin-bottom: 1rem;
}
html.dark .mop-main .page-hero {
    background: linear-gradient(135deg,
        color-mix(in srgb, var(--theme-band-bg, #001b85) 70%, #000) 0%,
        color-mix(in srgb, var(--mop-accent) 55%, var(--theme-bg-surface)) 100%);
}
.mop-main .page-hero::before {
    content: ''; position: absolute; right: -60px; top: -60px;
    width: 260px; height: 260px; border-radius: 50%;
    background: rgba(255,255,255,0.06); pointer-events: none;
}
.mop-main .page-hero h1 { font-size: 22px; font-weight: 500; letter-spacing: -0.3px; color: #fff; }
.mop-main .page-hero p  { font-size: 13px; opacity: 0.75; margin-top: 4px; }

/* ── Layout ── */
.mop-main.card-container { max-width: 900px; margin: 0 auto; padding: 1.5rem 1rem 3rem; }

/* ── Card ── */
.mop-main .card {
    background: var(--mop-surface);
    border: 0.5px solid var(--mop-line-1);
    border-radius: var(--mop-radius);
    overflow: hidden;
    margin-bottom: 1.5rem;
}

/* ── Table header ── */
.mop-main .tbl-head {
    display: grid;
    grid-template-columns: 2fr 1.3fr 1fr 1fr;
    gap: 8px; padding: .75rem 1.25rem;
    background: var(--mop-soft);
    border-bottom: 0.5px solid var(--mop-line-1);
}
.mop-main .tbl-head span {
    font-size: 11px; font-weight: 500; color: var(--mop-text-2);
    text-transform: uppercase; letter-spacing: .6px;
}
.mop-main .tbl-head span:not(:first-child) { text-align: center; }

/* ── Package info row ── */
.mop-main .pkg-row {
    display: flex; align-items: center; justify-content: space-between;
    padding: .85rem 1.25rem;
    border-bottom: 0.5px solid var(--mop-line-1);
    background: color-mix(in srgb, var(--mop-brand) 10%, var(--mop-surface));   /* was #e8edf8 */
}
.mop-main .pkg-name  { font-size: 14px; font-weight: 500; color: var(--mop-brand-text); }
.mop-main .pkg-name small { font-weight: 400; font-size: 12px; color: var(--mop-text-2); }   /* was an inline style */
.mop-main .pkg-price { font-size: 14px; font-weight: 500; color: var(--mop-accent); }

/* ── Product row ── */
.mop-main .product-row {
    display: grid;
    grid-template-columns: 2fr 1.3fr 1fr 1fr;
    gap: 8px; align-items: center;
    padding: .85rem 1.25rem;
    border-bottom: 0.5px solid var(--mop-line-1);
    transition: background .15s;
}
.mop-main .product-row:last-child { border-bottom: none; }
.mop-main .product-row:hover { background: var(--mop-soft); }
.mop-main .product-name { font-size: 14px; color: var(--mop-text); }
.mop-main .unit-price   { font-size: 13px; color: var(--mop-text-2); text-align: center; }
.mop-main .line-price   { font-size: 14px; font-weight: 500; color: var(--mop-accent); text-align: center; min-width: 70px; }
.mop-main .line-zero    { color: var(--mop-text-3); }

/* ── Qty stepper ── */
.mop-main .qty-wrap { display: flex; align-items: center; justify-content: center; gap: 6px; }
.mop-main .qty-btn {
    width: 28px; height: 28px; border-radius: 6px;
    border: 0.5px solid var(--mop-line-2);
    background: var(--mop-soft);
    color: var(--mop-text);
    font-size: 16px; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: background .12s, border-color .12s; line-height: 1;
}
.mop-main .qty-btn:hover  { background: var(--mop-softer); border-color: var(--mop-line-3); }
.mop-main .qty-btn:active { transform: scale(0.95); }
.mop-main .qty-btn:focus-visible { outline: 2px solid var(--theme-focus-ring, rgba(30,172,198,.4)); outline-offset: 1px; }
.mop-main .qty-display {
    width: 52px; height: 28px; line-height: 28px; border-radius: 6px;
    border: 0.5px solid var(--mop-line-1);
    background: var(--mop-surface);
    color: var(--mop-text);
    text-align: center; font-size: 13px; font-weight: 500;
}

/* ── Actions bar ── */
.mop-main .actions-row {
    display: flex; gap: 10px; justify-content: flex-end;
    padding: 1rem 1.25rem;
    background: var(--mop-soft);
    border-top: 0.5px solid var(--mop-line-1);
}
.mop-main .btn {
    display: inline-block;
    padding: 8px 18px; border-radius: 8px; font-size: 13px; line-height: 1.4;
    cursor: pointer; border: 0.5px solid var(--mop-line-2);
    background: var(--mop-surface);
    color: var(--mop-text); transition: background .15s;
    text-decoration: none;
}
.mop-main .btn:hover         { background: var(--mop-soft); }
.mop-main .btn-primary       { background: var(--mop-brand); color: #fff; border-color: var(--mop-brand); }
.mop-main .btn-primary:hover { background: var(--mop-brand-hover); border-color: var(--mop-brand-hover); }
.mop-main .btn-danger        { background: #c0392b; color: #fff; border-color: #c0392b; }
.mop-main .btn-danger:hover  { background: #a93226; }

/* ── Summary section ── */
.mop-main .summary-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }

.mop-main .total-card,
.mop-main .gst-card {
    background: var(--mop-surface);
    border: 0.5px solid var(--mop-line-1);
    border-radius: var(--mop-radius);
    padding: 1.25rem;
}
.mop-main .total-row {
    display: flex; justify-content: space-between;
    padding: 6px 0; font-size: 13px; color: var(--mop-text-2);
}
.mop-main .total-row.grand {
    font-size: 15px; font-weight: 500;
    color: var(--mop-text);
    border-top: 0.5px solid var(--mop-line-1);
    margin-top: 8px; padding-top: 12px;
}
.mop-main .total-row.grand small { font-weight: 400; font-size: 11px; }    /* was an inline style */
.mop-main .total-row.grand .mop-grand-val { color: var(--mop-accent); }    /* was an inline style */
.mop-main .total-val { font-weight: 500; color: var(--mop-text); }

/* ── GST card ── */
.mop-main .gst-card h3 { font-size: 14px; font-weight: 500; margin-bottom: 12px; color: var(--mop-text); }
.mop-main .field        { margin-bottom: 10px; }
.mop-main .field label  {
    font-size: 11px; font-weight: 500; color: var(--mop-text-2);
    display: block; margin-bottom: 4px;
    text-transform: uppercase; letter-spacing: .5px;
}
.mop-main .field label em { font-style: normal; color: #c0392b; }
.mop-main .field input,
.mop-main .field select {
    width: 100%; padding: 7px 10px; border-radius: 7px;
    border: 0.5px solid var(--mop-line-2);
    background: var(--mop-surface);
    color: var(--mop-text); font-size: 13px;
}
.mop-main .field input:focus,
.mop-main .field select:focus { outline: none; border-color: var(--mop-accent); box-shadow: 0 0 0 3px var(--theme-focus-ring, rgba(30,172,198,.25)); }
.mop-main .checkbox-row {
    display: flex; align-items: center; gap: 8px;
    margin: 10px 0; font-size: 13px; color: var(--mop-text-2);
}
.mop-main .checkbox-row input { accent-color: var(--mop-brand); }
.mop-main .checkout-btns { display: flex; gap: 10px; margin-top: 1rem; flex-wrap: wrap; }

.mop-main .hidden { display: none !important; }

/* ── Phones ── */
@media (max-width: 600px) {
    .mop-main .summary-grid { grid-template-columns: 1fr; }
    .mop-main .tbl-head,
    .mop-main .product-row { grid-template-columns: 1.6fr 1fr .9fr; }
    .mop-main .tbl-head span:last-child,
    .mop-main .product-row .line-price { display: none; }
}
