/* =====================================================
   IP Business — shared theme for the services pages
   (hub, IP Délice, IP Barbershop)
   Palette: midnight navy · powder blue · white
   ===================================================== */

:root {
    --navy-900: #0B1F3A;   /* midnight navy */
    --navy-800: #13294B;
    --navy-700: #1B3358;
    --navy-600: #2A4A7A;
    --powder-500: #7FA8D6;
    --powder-400: #B0D4F0; /* powder blue */
    --powder-200: #DCEAF7;
    --powder-50:  #F2F7FC;
    --white: #FFFFFF;

    --text: var(--navy-900);
    --text-muted: #5B6B85;
    --border: #D6E4F2;
    --bg: var(--powder-50);
    --card: var(--white);

    --success: #2E7D32;
    --warning: #B7791F;
    --danger:  #C62828;

    --radius-sm: 10px;
    --radius: 16px;
    --radius-lg: 22px;
    --shadow: 0 6px 24px rgba(11, 31, 58, 0.08);
    --shadow-hover: 0 14px 36px rgba(11, 31, 58, 0.16);
    --font: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    --header-h: 68px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
    font-family: var(--font);
    background: var(--ipb-page, var(--bg));
    color: var(--ipb-ink, var(--text));
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input, select, textarea { font: inherit; color: inherit; }

.container { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 16px; }

/* ---------- Header ---------- */
.ipb-header {
    position: sticky; top: 0; z-index: 50;
    height: var(--header-h);
    background: var(--ipb-brand, var(--navy-900));
    color: var(--white);
    border-bottom: 1px solid rgba(176, 212, 240, 0.15);
}
.ipb-header .container { height: 100%; display: flex; align-items: center; gap: 12px; }
.ipb-brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.15rem; white-space: nowrap; }
.ipb-brand img { width: 38px; height: 38px; border-radius: 10px; object-fit: cover; background: var(--ipb-surface, var(--white)); }
.ipb-brand span { color: var(--powder-400); }
.ipb-header nav { margin-inline-start: auto; display: flex; align-items: center; gap: 4px; }
.ipb-header nav a, .ipb-icon-btn {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 8px 12px; border-radius: 10px; font-size: .92rem; font-weight: 600;
    color: var(--powder-200); transition: background .2s, color .2s;
}
.ipb-header nav a:hover, .ipb-header nav a.active, .ipb-icon-btn:hover { background: rgba(176, 212, 240, 0.12); color: var(--white); }
.ipb-icon-btn { position: relative; padding: 8px 10px; }
.ipb-badge {
    position: absolute; top: 2px; inset-inline-end: 0;
    min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px;
    background: var(--powder-400); color: var(--navy-900);
    font-size: .7rem; font-weight: 800; display: flex; align-items: center; justify-content: center;
}
.ipb-badge[hidden] { display: none; }
.ipb-nav-label { display: inline; }
@media (max-width: 720px) {
    .ipb-nav-label { display: none; }
    .ipb-header nav a { padding: 8px 9px; }
    .ipb-brand { font-size: 1rem; }
}

/* user menu */
.ipb-user { position: relative; }
.ipb-avatar {
    width: 34px; height: 34px; border-radius: 50%;
    background: var(--powder-400); color: var(--navy-900);
    font-weight: 800; display: flex; align-items: center; justify-content: center;
}
.ipb-menu {
    position: absolute; inset-inline-end: 0; top: calc(100% + 8px); min-width: 220px;
    background: var(--ipb-surface, var(--white)); color: var(--ipb-ink, var(--text)); border-radius: 14px;
    box-shadow: var(--shadow-hover); border: 1px solid var(--ipb-border, var(--border)); padding: 6px; display: none;
}
.ipb-menu.open { display: block; }
.ipb-menu .ipb-menu-name { padding: 10px 12px; font-weight: 700; border-bottom: 1px solid var(--ipb-border, var(--border)); margin-bottom: 4px; }
.ipb-menu a, .ipb-menu button {
    display: flex; width: 100%; align-items: center; gap: 10px;
    padding: 10px 12px; border-radius: 10px; font-size: .92rem; color: var(--ipb-ink, var(--text)); text-align: start;
}
.ipb-menu a:hover, .ipb-menu button:hover { background: var(--ipb-surface-2, var(--powder-50)); }
.ipb-menu i { width: 18px; color: var(--ipb-ink-3, var(--navy-600)); }
.ipb-menu .danger, .ipb-menu .danger i { color: var(--danger); }

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 12px 20px; border-radius: 12px; font-weight: 700; font-size: .95rem;
    transition: transform .15s, box-shadow .2s, background .2s; white-space: nowrap;
}
.btn:active { transform: scale(.98); }
.btn-primary { background: var(--ipb-brand, var(--navy-900)); color: var(--white); }
.btn-primary:hover { background: var(--navy-700); box-shadow: var(--shadow); }
.btn-powder { background: var(--powder-400); color: var(--navy-900); }
.btn-powder:hover { background: var(--ipb-chip, var(--powder-200)); }
.btn-outline { border: 1.5px solid var(--ipb-border, var(--border)); color: var(--ipb-ink, var(--text)); background: var(--ipb-surface, var(--white)); }
.btn-outline:hover { border-color: var(--navy-600); }
.btn-ghost-light { border: 1.5px solid rgba(220, 234, 247, 0.5); color: var(--white); }
.btn-ghost-light:hover { background: rgba(176, 212, 240, 0.12); }
.btn-danger { background: #FDECEC; color: var(--danger); }
.btn-whatsapp { background: #25D366; color: var(--white); }
.btn-sm { padding: 8px 12px; font-size: .82rem; border-radius: 10px; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .55; cursor: not-allowed; }

/* ---------- Hero ---------- */
.ipb-hero {
    background:
        radial-gradient(circle at 85% 15%, rgba(176, 212, 240, 0.22), transparent 45%),
        linear-gradient(135deg, var(--navy-900), var(--navy-700));
    color: var(--white);
    padding: 48px 0 56px;
}
.ipb-hero .eyebrow {
    display: inline-flex; align-items: center; gap: 8px;
    background: rgba(176, 212, 240, 0.14); color: var(--powder-200);
    padding: 6px 12px; border-radius: 999px; font-size: .82rem; font-weight: 600; margin-bottom: 14px;
}
.ipb-hero h1 { font-size: clamp(1.7rem, 4vw, 2.6rem); line-height: 1.15; font-weight: 800; margin-bottom: 10px; }
.ipb-hero p { color: var(--powder-200); max-width: 560px; margin-bottom: 22px; }
.ipb-hero .actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* ---------- Sections ---------- */
.section { padding: 36px 0; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.section-head h2 { font-size: 1.35rem; font-weight: 800; }
.section-head p { color: var(--ipb-muted, var(--text-muted)); font-size: .9rem; }
.pill {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 4px 10px; border-radius: 999px; font-size: .75rem; font-weight: 700;
    background: var(--ipb-chip, var(--powder-200)); color: var(--ipb-ink-2, var(--navy-700));
}
.pill-danger { background: #FDECEC; color: var(--danger); }
.pill-success { background: #E7F4E8; color: var(--success); }

/* ---------- Chips (category filter) ---------- */
.chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 6px; scrollbar-width: thin; }
.chip {
    display: inline-flex; align-items: center; gap: 8px; flex-shrink: 0;
    padding: 9px 14px; border-radius: 999px; font-size: .88rem; font-weight: 600;
    background: var(--ipb-surface, var(--white)); border: 1.5px solid var(--ipb-border, var(--border)); color: var(--ipb-ink, var(--text));
}
.chip:hover { border-color: var(--powder-500); }
.chip.active { background: var(--ipb-brand, var(--navy-900)); color: var(--white); border-color: var(--navy-900); }

/* ---------- Cards / grids ---------- */
.grid { display: grid; gap: 16px; }
.grid-auto { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.grid-auto-sm { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); }
.card {
    background: var(--ipb-surface, var(--card)); border: 1px solid var(--ipb-border, var(--border)); border-radius: var(--radius);
    box-shadow: var(--shadow); overflow: hidden;
}
.card-link { transition: transform .2s, box-shadow .2s; }
.card-link:hover { transform: translateY(-3px); box-shadow: var(--shadow-hover); }
.card-img { position: relative; aspect-ratio: 4 / 3; background: var(--ipb-chip, var(--powder-200)); overflow: hidden; }
.card-img img { width: 100%; height: 100%; object-fit: cover; }
.card-img .ph { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; color: var(--powder-500); font-size: 2rem; }
.card-img .tag { position: absolute; top: 10px; left: 10px; }
.card-body { padding: 14px; }
.card-title { font-weight: 700; font-size: 1rem; margin-bottom: 4px; }
.card-sub { color: var(--ipb-muted, var(--text-muted)); font-size: .85rem; }
.price { font-weight: 800; color: var(--ipb-ink, var(--navy-900)); }
.price-old { color: var(--ipb-muted, var(--text-muted)); text-decoration: line-through; font-size: .82rem; margin-inline-start: 6px; font-weight: 500; }
.rating { color: #E0A100; font-size: .85rem; }
.rating .muted { color: var(--ipb-muted, var(--text-muted)); }
.is-unavailable .card-img img { filter: grayscale(.8); opacity: .7; }

/* ---------- Forms ---------- */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field label { font-size: .85rem; font-weight: 600; color: var(--ipb-muted, var(--text-muted)); }
.input, .field input, .field select, .field textarea {
    width: 100%; padding: 12px 14px; border-radius: 12px;
    border: 1.5px solid var(--ipb-border, var(--border)); background: var(--ipb-surface, var(--white)); outline: none; transition: border-color .2s;
}
.input:focus, .field input:focus, .field select:focus, .field textarea:focus { border-color: var(--navy-600); }
.search {
    display: flex; align-items: center; gap: 10px;
    background: var(--ipb-surface, var(--white)); border-radius: 14px; padding: 0 14px; border: 1.5px solid var(--ipb-border, var(--border));
}
.search input { flex: 1; border: none; outline: none; padding: 13px 0; background: transparent; }
.search i { color: var(--ipb-muted, var(--text-muted)); }

.segmented { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.segmented button {
    display: flex; align-items: center; justify-content: center; gap: 8px;
    padding: 14px; border-radius: 12px; border: 1.5px solid var(--ipb-border, var(--border)); background: var(--ipb-surface, var(--white)); font-weight: 700;
}
.segmented button.active { border-color: var(--navy-900); background: var(--ipb-brand, var(--navy-900)); color: var(--white); }

/* ---------- Misc ---------- */
.panel { background: var(--ipb-surface, var(--white)); border: 1px solid var(--ipb-border, var(--border)); border-radius: var(--radius); padding: 18px; }
.row-between { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.muted { color: var(--ipb-muted, var(--text-muted)); }
.small { font-size: .85rem; }
.empty { text-align: center; padding: 48px 16px; color: var(--ipb-muted, var(--text-muted)); }
.empty i { font-size: 2.4rem; color: var(--powder-500); margin-bottom: 12px; }
.empty h3 { color: var(--ipb-ink, var(--text)); margin-bottom: 6px; }
.spinner {
    width: 34px; height: 34px; border-radius: 50%; margin: 40px auto;
    border: 3px solid var(--powder-200); border-top-color: var(--navy-900); animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.hscroll { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(200px, 240px); gap: 14px; overflow-x: auto; padding-bottom: 8px; }

.qty { display: inline-flex; align-items: center; border: 1.5px solid var(--ipb-border, var(--border)); border-radius: 12px; overflow: hidden; background: var(--ipb-surface, var(--white)); }
.qty button { width: 36px; height: 36px; font-weight: 800; color: var(--ipb-ink, var(--navy-900)); }
.qty button:hover { background: var(--ipb-surface-2, var(--powder-50)); }
.qty span { min-width: 30px; text-align: center; font-weight: 800; }

/* toast */
.ipb-toast-wrap { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 200; display: flex; flex-direction: column; gap: 8px; width: min(92vw, 420px); }
.ipb-toast {
    background: var(--ipb-brand, var(--navy-900)); color: var(--white); padding: 12px 16px; border-radius: 12px;
    box-shadow: var(--shadow-hover); font-size: .92rem; display: flex; gap: 10px; align-items: center;
    animation: toastIn .25s ease;
}
.ipb-toast.error { background: var(--danger); }
@keyframes toastIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* modal */
.ipb-modal-bg { position: fixed; inset: 0; background: rgba(11, 31, 58, 0.55); z-index: 150; display: none; align-items: center; justify-content: center; padding: 16px; }
.ipb-modal-bg.open { display: flex; }
.ipb-modal { background: var(--ipb-surface, var(--white)); border-radius: var(--radius-lg); width: min(100%, 480px); max-height: 90vh; overflow: auto; padding: 22px; }

/* sticky bottom bar (cart summary) */
.bottom-bar {
    position: sticky; bottom: 0; z-index: 40; background: var(--ipb-brand, var(--navy-900)); color: var(--white);
    padding: 12px 0; box-shadow: 0 -6px 20px rgba(11, 31, 58, 0.2);
}
.bottom-bar[hidden] { display: none; }

/* status timeline */
.timeline { list-style: none; }
.timeline li { display: flex; gap: 12px; position: relative; padding-bottom: 18px; }
.timeline li:last-child { padding-bottom: 0; }
.timeline .dot { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--ipb-border, var(--border)); background: var(--ipb-surface, var(--white)); flex-shrink: 0; display: flex; align-items: center; justify-content: center; font-size: .65rem; color: var(--white); z-index: 1; }
.timeline li::before { content: ''; position: absolute; inset-inline-start: 10px; top: 22px; bottom: 0; width: 2px; background: var(--border); }
.timeline li:last-child::before { display: none; }
.timeline li.done .dot { background: var(--ipb-brand, var(--navy-900)); border-color: var(--navy-900); }
.timeline li.done::before { background: var(--ipb-brand, var(--navy-900)); }
.timeline li.current .dot { border-color: var(--navy-900); box-shadow: 0 0 0 4px var(--powder-200); }
.timeline .label { font-weight: 600; }
.timeline li:not(.done):not(.current) .label { color: var(--ipb-muted, var(--text-muted)); }

/* footer */
.ipb-footer { background: var(--ipb-brand, var(--navy-900)); color: var(--powder-200); padding: 28px 0; margin-top: 32px; font-size: .88rem; }
.ipb-footer .container { display: flex; flex-wrap: wrap; gap: 12px 24px; justify-content: space-between; align-items: center; }
.ipb-footer a:hover { color: var(--white); }
.ipb-footer .links { display: flex; gap: 16px; flex-wrap: wrap; }
