:root {
    --sd-primary: #de1f26;
    --sd-primary-dark: #b3181d;
    --sd-primary-soft: #fbe7e4;
    --sd-accent: #8c3a34;
    --sd-dark: #211d1a;
    --sd-dark-2: #3a2e28;
    --sd-ink: #2a2622;
    --sd-muted: #857a68;
    --sd-border: #ece6d9;
    --sd-bg: #f8f6f1;
    --sd-white: #ffffff;
    --sd-success: #1a9a5b;
    --sd-radius: 10px;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: "Segoe UI", Arial, sans-serif;
    color: var(--sd-ink);
    background: var(--sd-bg);
    line-height: 1.5;
}

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

.sd-container {
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.sd-header {
    background: var(--sd-white);
    border-bottom: 3px solid var(--sd-primary);
    position: sticky;
    top: 0;
    z-index: 20;
}

.sd-header__bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px;
    gap: 24px;
}

.sd-header__brand { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.sd-header__brand img { height: 48px; width: auto; }
.sd-header__brand strong { font-size: 1.05rem; color: var(--sd-primary); }

.sd-header__nav-row { background: var(--sd-bg); border-top: 1px solid var(--sd-border); }
.sd-header__nav-row .sd-container { padding: 0 20px; }

.sd-nav { display: flex; justify-content: center; gap: 32px; flex-wrap: wrap; }
.sd-nav a {
    display: inline-block;
    font-weight: 600;
    font-size: 0.92rem;
    color: var(--sd-ink);
    padding: 10px 0 8px;
    border-bottom: 2px solid transparent;
}
.sd-nav a:hover, .sd-nav a.is-active { color: var(--sd-primary); border-color: var(--sd-primary); }

/* Search */
.sd-search {
    display: flex;
    align-items: stretch;
    flex: 1 1 auto;
    max-width: 560px;
    min-height: 48px;
    border: 2px solid var(--sd-primary);
    border-radius: 999px;
    overflow: hidden;
}
.sd-search__category {
    border: none;
    border-right: 1px solid var(--sd-border);
    background: var(--sd-white);
    padding: 0 14px;
    font-size: 0.82rem;
    color: var(--sd-muted);
    max-width: 160px;
}
.sd-search__input {
    flex: 1;
    border: none;
    padding: 0 16px;
    font-size: 0.95rem;
    min-width: 0;
}
.sd-search__input:focus, .sd-search__category:focus { outline: none; }
.sd-search__submit {
    border: none;
    background: var(--sd-primary);
    color: #fff;
    padding: 0 22px;
    cursor: pointer;
    display: flex;
    align-items: center;
}
.sd-search__submit:hover { background: var(--sd-primary-dark); }

/* Header actions (account/cart icons) */
.sd-header__actions { display: flex; gap: 22px; flex-shrink: 0; }
.sd-header__icon-link {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--sd-ink);
    font-weight: 700;
    font-size: 0.85rem;
    white-space: nowrap;
}
.sd-header__icon-link:hover { color: var(--sd-primary); }
.sd-header__icon-link svg { flex-shrink: 0; }
.sd-icon-wrap { position: relative; display: inline-flex; }
.sd-cart-badge {
    position: absolute;
    top: -8px;
    right: -9px;
    background: var(--sd-primary);
    color: #fff;
    font-size: 0.65rem;
    font-weight: 800;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    border-radius: 999px;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

/* Top bar */
.sd-topbar {
    background: var(--sd-primary);
    color: #ffe9e7;
    font-size: 0.82rem;
}
.sd-topbar__bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 7px 20px;
    gap: 16px;
    flex-wrap: wrap;
}
.sd-topbar__contact { display: flex; gap: 24px; flex-wrap: wrap; }
.sd-topbar a { color: #fff; }
.sd-topbar__social { display: flex; gap: 12px; align-items: center; }
.sd-topbar__social a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: rgba(255,255,255,.18);
}
.sd-topbar__social a:hover { background: rgba(255,255,255,.32); }

/* Hero */
.sd-hero {
    padding: 34px 0;
}
.sd-hero__grid {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
    flex-wrap: wrap;
    background: linear-gradient(120deg, var(--sd-dark) 0%, var(--sd-dark-2) 100%);
    color: #fff;
    border-radius: 18px;
    padding: 48px 44px;
}
.sd-hero__text { flex: 1 1 0%; min-width: 280px; }
.sd-hero__kicker {
    display: inline-block;
    background: var(--sd-primary);
    color: #fff;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: .06em;
    text-transform: uppercase;
    padding: 5px 12px;
    border-radius: 999px;
    margin-bottom: 16px;
}
.sd-hero__text h1 { font-size: 2rem; line-height: 1.2; margin: 0 0 14px; }
.sd-hero__text p { color: #d8d2c7; margin: 0 0 24px; max-width: 46ch; }
.sd-hero__logo {
    flex: 1 1 0%;
    min-width: 220px;
    align-self: stretch;
    border-radius: 14px;
    background: rgba(255,255,255,.06);
    display: flex;
    align-items: center;
    justify-content: center;
}
.sd-hero__logo img { max-width: 70%; max-height: 70%; width: auto; height: auto; border-radius: 8px; background: #fff; padding: 16px; }
.sd-hero__photo {
    flex: 1 1 0%;
    min-width: 220px;
    align-self: stretch;
    border-radius: 14px;
    border: 1px solid rgba(255,255,255,.14);
    background: var(--sd-bg) center/contain no-repeat;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--sd-muted);
    font-size: 0.75rem;
    text-align: center;
    padding: 16px;
}
.sd-hero__actions { display: flex; gap: 14px; flex-wrap: wrap; }

/* Hero carousel */
.sd-carousel { position: relative; }
.sd-carousel__viewport { position: relative; min-height: 460px; border-radius: 18px; overflow: hidden; }
.sd-carousel__slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    visibility: hidden;
    transition: opacity .6s ease;
    pointer-events: none;
}
.sd-carousel__slide.is-active { opacity: 1; visibility: visible; pointer-events: auto; }
.sd-carousel__nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255,255,255,.15);
    color: #fff;
    border: none;
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
    z-index: 5;
    display: flex;
    align-items: center;
    justify-content: center;
}
.sd-carousel__nav:hover { background: rgba(255,255,255,.3); }
.sd-carousel__nav--prev { left: 16px; }
.sd-carousel__nav--next { right: 16px; }
.sd-carousel__dots {
    position: absolute;
    bottom: 18px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 5;
}
.sd-carousel__dot {
    width: 8px;
    height: 8px;
    padding: 0;
    border: none;
    border-radius: 999px;
    background: rgba(255,255,255,.4);
    cursor: pointer;
    transition: width .2s ease, background .2s ease;
}
.sd-carousel__dot.is-active { background: #fff; width: 22px; }

.sd-btn {
    display: inline-block;
    background: var(--sd-primary);
    color: #fff;
    font-weight: 700;
    padding: 12px 26px;
    border-radius: 999px;
    border: none;
    cursor: pointer;
    font-size: 0.95rem;
}
.sd-btn:hover { background: var(--sd-primary-dark); }
.sd-btn--outline {
    background: transparent;
    border: 2px solid #fff;
    color: #fff;
}
.sd-btn--outline:hover { background: rgba(255,255,255,.15); }
.sd-btn--secondary { background: var(--sd-dark-2); }
.sd-btn--secondary:hover { background: var(--sd-dark); }
.sd-btn[disabled] { background: #b8ab94; cursor: not-allowed; }
.sd-btn--sm { padding: 8px 16px; font-size: 0.85rem; }

/* Sections */
.sd-section { padding: 44px 0; }
.sd-section__head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 22px; flex-wrap: wrap; gap: 8px; }
.sd-section__head h2 { font-size: 1.4rem; margin: 0; font-weight: 800; }
.sd-section__head .sd-link { color: var(--sd-primary); font-weight: 700; font-size: 0.9rem; }

/* Category chips */
.sd-cat-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 22px;
}
.sd-cat-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    width: 96px;
    text-align: center;
}
.sd-cat-card__ic {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--sd-white);
    border: 2px solid var(--sd-border);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--sd-primary);
}
.sd-cat-card__ic svg { width: 26px; height: 26px; }
.sd-cat-card__label { font-size: 0.78rem; font-weight: 700; color: var(--sd-ink); line-height: 1.3; }
.sd-cat-card:hover .sd-cat-card__ic { background: var(--sd-primary); border-color: var(--sd-primary); color: #fff; }
.sd-cat-card:hover .sd-cat-card__label { color: var(--sd-primary); }
.sd-cat-card.is-active .sd-cat-card__ic { background: var(--sd-primary); border-color: var(--sd-primary); color: #fff; }
.sd-cat-card.is-active .sd-cat-card__label { color: var(--sd-primary); }

/* Category slider (home) */
.sd-cat-slider { display: flex; align-items: center; gap: 10px; }
.sd-cat-slider .sd-cat-grid {
    flex: 1;
    min-width: 0;
    flex-wrap: nowrap;
    overflow-x: auto;
    scroll-behavior: smooth;
    scroll-snap-type: x proximity;
    padding: 4px 2px 10px;
    scrollbar-width: none;
}
.sd-cat-slider .sd-cat-grid::-webkit-scrollbar { display: none; }
.sd-cat-slider .sd-cat-card { flex: 0 0 auto; scroll-snap-align: start; }
.sd-cat-slider__nav {
    flex: 0 0 auto;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 1px solid var(--sd-border);
    background: #fff;
    color: var(--sd-ink);
    font-size: 1.3rem;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}
.sd-cat-slider__nav:hover { background: var(--sd-primary); color: #fff; border-color: var(--sd-primary); }

/* Product grid */
.sd-product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 18px;
}
.sd-card {
    background: var(--sd-white);
    border: 1px solid var(--sd-border);
    border-radius: var(--sd-radius);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}
.sd-card__media {
    position: relative;
    aspect-ratio: 1 / 1;
    background: var(--sd-bg) center/cover no-repeat;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--sd-muted);
    font-size: 0.8rem;
}
.sd-card__body { padding: 14px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.sd-card__cat { font-size: 0.72rem; text-transform: uppercase; color: var(--sd-primary); font-weight: 700; letter-spacing: .04em; }
.sd-card__title { font-size: 0.95rem; font-weight: 700; margin: 0; }
.sd-card__price { font-weight: 800; color: var(--sd-ink); margin-top: auto; }
.sd-card__price--quote { color: var(--sd-muted); font-weight: 600; font-size: 0.85rem; margin-top: auto; }
.sd-card__actions { padding: 0 14px 14px; display: flex; gap: 8px; }
.sd-card__actions form { flex: 1; display: flex; }
.sd-card__actions .sd-card__cta { flex: 1; }
.sd-card__cta {
    display: block;
    width: 100%;
    text-align: center;
    background: var(--sd-primary);
    color: #fff;
    border: none;
    border-radius: 999px;
    padding: 9px 10px;
    font-size: 0.82rem;
    font-weight: 700;
    cursor: pointer;
}
.sd-card__cta:hover { background: var(--sd-primary-dark); }
.sd-card__cta--outline { background: transparent; border: 1.5px solid var(--sd-primary); color: var(--sd-primary); }
.sd-card__cta--outline:hover { background: var(--sd-primary-soft); }
.sd-card__cta[disabled] { background: #d8d2c5; cursor: not-allowed; }

.sd-badge {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 20px;
    background: var(--sd-primary-soft);
    color: var(--sd-accent);
}
.sd-badge--success { background: #e3f5ec; color: var(--sd-success); }
.sd-badge--warning { background: #fdf1de; color: #a15c00; }
.sd-badge--critical { background: var(--sd-primary-soft); color: var(--sd-primary); }
.sd-badge--muted { background: var(--sd-bg); color: var(--sd-muted); }
.sd-badge--overlay {
    position: absolute;
    top: 10px;
    left: 10px;
    background: var(--sd-accent);
    color: #fff;
}
.sd-badge--overlay.sd-badge--success { background: var(--sd-success); color: #fff; }

/* Breadcrumb */
.sd-breadcrumb { font-size: 0.85rem; color: var(--sd-muted); padding: 16px 0 0; }
.sd-breadcrumb a { color: var(--sd-primary); }

/* Product detail */
.sd-product {
    display: grid;
    grid-template-columns: minmax(260px, 460px) 1fr;
    gap: 36px;
    align-items: start;
}
.sd-product__media {
    background-color: var(--sd-bg);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    border-radius: var(--sd-radius);
    aspect-ratio: 1 / 1;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    color: var(--sd-muted);
}
.sd-product__media img { width: 100%; height: 100%; object-fit: cover; }
.sd-gallery-thumbs { display: flex; gap: 10px; margin-top: 12px; flex-wrap: wrap; }
.sd-gallery-thumb {
    width: 64px;
    height: 64px;
    border-radius: 8px;
    border: 2px solid var(--sd-border);
    background-color: var(--sd-bg);
    background-size: cover;
    background-position: center;
    cursor: pointer;
    padding: 0;
}
.sd-gallery-thumb.is-active, .sd-gallery-thumb:hover { border-color: var(--sd-primary); }
.sd-product__info h1 { font-size: 1.6rem; margin: 0 0 8px; }
.sd-product__price { font-size: 1.5rem; font-weight: 800; margin: 10px 0; color: var(--sd-primary); }
.sd-product__desc { color: var(--sd-muted); white-space: pre-line; margin-bottom: 22px; }
.sd-qty {
    display: inline-flex;
    align-items: center;
    border: 1px solid var(--sd-border);
    border-radius: 999px;
    overflow: hidden;
    margin-right: 10px;
}
.sd-qty input { width: 52px; border: none; text-align: center; padding: 10px 0; font-size: 1rem; }
.sd-qty button { background: var(--sd-bg); border: none; width: 34px; height: 40px; font-size: 1.1rem; cursor: pointer; }

/* Cart */
.sd-table { width: 100%; border-collapse: collapse; background: var(--sd-white); border-radius: var(--sd-radius); overflow: hidden; }
.sd-table th, .sd-table td { padding: 12px 14px; text-align: left; border-bottom: 1px solid var(--sd-border); font-size: 0.92rem; }
.sd-table th { background: var(--sd-bg); font-size: 0.78rem; text-transform: uppercase; color: var(--sd-muted); }
.sd-table tfoot td { font-weight: 800; }
.sd-cart-product { display: flex; align-items: center; gap: 10px; }
.sd-cart-product img { width: 52px; height: 52px; object-fit: cover; border-radius: 6px; background: var(--sd-bg); }
.sd-remove-link { color: var(--sd-accent); font-weight: 700; font-size: 0.85rem; background: none; border: none; cursor: pointer; }

/* Customer account */
.sd-account__hello { color: var(--sd-muted); margin: -8px 0 26px; }
.sd-account__hello span { font-size: 0.88rem; }
.sd-account__hello a { color: var(--sd-primary); font-weight: 600; }
.sd-account {
    display: flex;
    align-items: start;
    gap: 32px;
}
.sd-account__nav {
    flex: 0 0 220px;
    background: var(--sd-white);
    border: 1px solid var(--sd-border);
    border-radius: var(--sd-radius);
    overflow: hidden;
}
.sd-account__nav a {
    display: block;
    padding: 13px 18px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--sd-ink);
    border-bottom: 1px solid var(--sd-border);
}
.sd-account__nav a:last-child { border-bottom: none; }
.sd-account__nav a:hover { background: var(--sd-bg); }
.sd-account__nav a.is-active { background: var(--sd-primary-soft); color: var(--sd-primary); }
.sd-account__content { flex: 1; min-width: 0; }
.sd-account__stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 16px; }
.sd-account__stat-num { font-size: 1.8rem; font-weight: 800; color: var(--sd-ink); }

@media (max-width: 720px) {
    .sd-account { flex-direction: column; }
    .sd-account__nav { flex: 0 0 auto; width: 100%; display: flex; flex-wrap: wrap; }
    .sd-account__nav a { flex: 1 1 auto; text-align: center; border-bottom: none; border-right: 1px solid var(--sd-border); }
}

/* Forms */
.sd-honeypot { position: absolute; left: -9999px; top: -9999px; height: 0; width: 0; overflow: hidden; opacity: 0; }
.sd-form { max-width: 560px; }
.sd-field { margin-bottom: 16px; }
.sd-field label { display: block; font-weight: 700; font-size: 0.88rem; margin-bottom: 6px; color: var(--sd-ink); }
.sd-field input, .sd-field textarea, .sd-field select {
    width: 100%;
    padding: 10px 12px;
    border: 1.5px solid var(--sd-border);
    border-radius: 9px;
    font-size: 0.92rem;
    font-family: inherit;
    background: var(--sd-bg);
    transition: border-color .15s, box-shadow .15s, background .15s;
}
.sd-field textarea { resize: vertical; min-height: 80px; }
.sd-field input:focus, .sd-field textarea:focus, .sd-field select:focus {
    outline: none; border-color: var(--sd-primary); background: #fff; box-shadow: 0 0 0 3px var(--sd-primary-soft);
}
.sd-field input[type="file"] { background: none; border-style: dashed; padding: 14px 12px; cursor: pointer; }
.sd-field input[type="checkbox"] { width: auto; }

/* Admin form cards (product/category/page-builder forms) */
.sd-form-card { background: #fff; border: 1px solid var(--sd-border); border-radius: 14px; padding: 24px 26px; max-width: 780px; margin-bottom: 20px; }
.sd-form-card .sd-field { margin-bottom: 0; }
.sd-form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px 18px; margin-bottom: 16px; }
.sd-form-grid--full { grid-column: 1 / -1; }
.sd-check-row { display: flex; align-items: center; gap: 9px; margin-bottom: 16px; }
.sd-check-row label { margin: 0; font-weight: 600; font-size: .88rem; }
.sd-form-actions { display: flex; align-items: center; gap: 12px; margin-top: 20px; padding-top: 20px; border-top: 1px solid var(--sd-border); }
.sd-form-actions .sd-link-cancel { font-size: .87rem; font-weight: 700; color: var(--sd-muted); }
.sd-form-actions .sd-link-cancel:hover { color: var(--sd-ink); }

/* Table row actions */
.sd-table-actions { display: flex; align-items: center; gap: 14px; }
.sd-table-actions a { font-size: .84rem; font-weight: 700; color: var(--sd-primary); }
.sd-table-actions a:hover { text-decoration: underline; }
.sd-table-actions form { display: inline; }
.sd-table-actions .sd-remove-link { font-size: .84rem; }
.sd-icon-picker { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 10px; }
.sd-icon-choice {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 10px 6px;
    border: 1.5px solid var(--sd-border);
    border-radius: 10px;
    cursor: pointer;
    text-align: center;
}
.sd-icon-choice input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.sd-icon-choice__swatch {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--sd-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--sd-primary);
}
.sd-icon-choice__swatch svg { width: 20px; height: 20px; }
.sd-icon-choice__label { font-size: 0.72rem; color: var(--sd-muted); line-height: 1.25; }
.sd-icon-choice:has(input:checked) { border-color: var(--sd-primary); background: var(--sd-primary-soft); }
.sd-icon-choice:has(input:checked) .sd-icon-choice__label { color: var(--sd-primary); font-weight: 700; }

.sd-alert { padding: 12px 16px; border-radius: var(--sd-radius); margin-bottom: 18px; font-size: 0.9rem; }
.sd-alert--success { background: #e3f5ec; color: var(--sd-success); }
.sd-alert--error { background: var(--sd-primary-soft); color: var(--sd-accent); }
.sd-alert--info { background: #f1ece0; color: var(--sd-ink); }

/* Footer */
.sd-footer { background: var(--sd-dark); color: #cbc2b3; margin-top: 60px; border-top: 3px solid var(--sd-primary); }
.sd-footer .sd-container { padding: 44px 20px 24px; display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 30px; }
.sd-footer h3 { color: #fff; font-size: 1rem; margin: 0 0 14px; }
.sd-footer ul { list-style: none; padding: 0; margin: 0; }
.sd-footer li { margin-bottom: 8px; font-size: 0.88rem; }
.sd-footer a:hover { color: var(--sd-primary); }
.sd-footer__bottom { text-align: center; padding: 14px; font-size: 0.8rem; border-top: 1px solid #3a332a; }

/* Admin */
.sd-admin { display: flex; min-height: 100vh; background: var(--sd-bg); align-items: flex-start; }

.sd-admin__sidebar {
    width: 260px; flex-shrink: 0; background: #fff; border-right: 1px solid var(--sd-border);
    display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; overflow-y: auto;
}
.sd-admin__brand { display: flex; align-items: center; gap: 10px; padding: 20px 22px; border-bottom: 1px solid var(--sd-border); }
.sd-admin__brand-mark {
    width: 34px; height: 34px; border-radius: 9px; background: var(--sd-primary); color: #fff;
    display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: .95rem; flex-shrink: 0;
}
.sd-admin__brand-text { min-width: 0; }
.sd-admin__brand-text strong { display: block; font-size: .98rem; font-weight: 800; color: var(--sd-ink); line-height: 1.25; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sd-admin__brand-text span { font-size: .72rem; color: var(--sd-muted); text-transform: uppercase; letter-spacing: .05em; }

.sd-admin__user { display: flex; align-items: center; gap: 10px; margin: 16px 18px 6px; padding: 12px; border-radius: 12px; background: linear-gradient(135deg, var(--sd-primary-soft), #fdf1de); }
.sd-admin__user-avatar { width: 38px; height: 38px; border-radius: 50%; background: var(--sd-primary); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: .9rem; flex-shrink: 0; }
.sd-admin__user-info { min-width: 0; }
.sd-admin__user-info strong { display: block; font-size: .82rem; font-weight: 700; color: var(--sd-ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sd-admin__user-info span { font-size: .72rem; color: var(--sd-muted); }

.sd-admin__nav { flex: 1; padding: 6px 12px 16px; }
.sd-admin__nav-title { font-size: .68rem; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--sd-muted); padding: 14px 10px 6px; margin: 0; }
.sd-admin__nav a {
    display: flex; align-items: center; gap: 11px; padding: 9px 12px; border-radius: 9px;
    font-size: .87rem; font-weight: 600; color: var(--sd-ink); margin-bottom: 2px; transition: background .12s, color .12s;
}
.sd-admin__nav a svg { width: 18px; height: 18px; flex-shrink: 0; color: var(--sd-muted); transition: color .12s; }
.sd-admin__nav a:hover { background: var(--sd-bg); }
.sd-admin__nav a.is-active { background: var(--sd-primary-soft); color: var(--sd-primary); }
.sd-admin__nav a.is-active svg { color: var(--sd-primary); }
.sd-admin__badge { margin-left: auto; background: var(--sd-primary); color: #fff; font-size: .68rem; font-weight: 800; padding: 1px 7px; border-radius: 20px; line-height: 1.5; }

.sd-admin__nav-foot { border-top: 1px solid var(--sd-border); padding: 12px; display: flex; flex-direction: column; gap: 2px; }
.sd-admin__nav-foot a { display: flex; align-items: center; gap: 11px; padding: 9px 12px; border-radius: 9px; font-size: .85rem; font-weight: 600; color: var(--sd-muted); }
.sd-admin__nav-foot a svg { width: 17px; height: 17px; flex-shrink: 0; }
.sd-admin__nav-foot a:hover { background: var(--sd-bg); color: var(--sd-ink); }

.sd-admin__body { flex: 1; min-width: 0; }
.sd-admin__topbar {
    height: 64px; background: #fff; border-bottom: 1px solid var(--sd-border); display: flex; align-items: center;
    justify-content: space-between; padding: 0 28px; position: sticky; top: 0; z-index: 5;
}
.sd-admin__topbar-title { font-size: .95rem; font-weight: 700; color: var(--sd-ink); }
.sd-admin__topbar-actions { display: flex; align-items: center; gap: 20px; }
.sd-admin__topbar-actions a { display: flex; align-items: center; gap: 6px; font-size: .85rem; font-weight: 600; color: var(--sd-muted); }
.sd-admin__topbar-actions a:hover { color: var(--sd-primary); }
.sd-admin__topbar-actions svg { width: 17px; height: 17px; }

.sd-admin__main { padding: 28px 32px 48px; }
.sd-admin__main h1 { margin: 0 0 22px; font-size: 1.4rem; font-weight: 800; color: var(--sd-ink); }

.sd-admin-table { width: 100%; border-collapse: collapse; background: #fff; border-radius: 14px; overflow: hidden; border: 1px solid var(--sd-border); }
.sd-admin-table th, .sd-admin-table td { padding: 12px 16px; border-bottom: 1px solid var(--sd-border); font-size: .87rem; text-align: left; }
.sd-admin-table th { background: var(--sd-bg); font-size: .7rem; text-transform: uppercase; letter-spacing: .04em; color: var(--sd-muted); font-weight: 700; }
.sd-admin-table tbody tr:last-child td { border-bottom: none; }
.sd-admin-table tbody tr:hover { background: var(--sd-bg); }

/* Admin dashboard widgets */
.sd-adm-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 18px; margin-bottom: 22px; }
.sd-adm-stat { background: #fff; border: 1px solid var(--sd-border); border-radius: 14px; padding: 20px; display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.sd-adm-stat__label { font-size: .73rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--sd-muted); margin: 0; }
.sd-adm-stat__value { font-size: 1.7rem; font-weight: 800; color: var(--sd-ink); margin: 10px 0 0; }
.sd-adm-stat__icon { width: 42px; height: 42px; border-radius: 11px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; color: #fff; box-shadow: 0 8px 16px rgba(33,29,26,.14); }
.sd-adm-stat__icon svg { width: 21px; height: 21px; }
.sd-adm-stat--blue .sd-adm-stat__icon { background: #4a6cf7; }
.sd-adm-stat--purple .sd-adm-stat__icon { background: #8b5cf6; }
.sd-adm-stat--teal .sd-adm-stat__icon { background: #14b8a6; }
.sd-adm-stat--amber .sd-adm-stat__icon { background: #f59e0b; }
.sd-adm-stat--primary .sd-adm-stat__icon { background: var(--sd-primary); }

.sd-adm-grid { display: grid; grid-template-columns: .9fr 1.5fr; gap: 20px; align-items: start; margin-bottom: 22px; }
.sd-adm-card { background: #fff; border: 1px solid var(--sd-border); border-radius: 14px; overflow: hidden; }
.sd-adm-card__head { padding: 17px 20px; border-bottom: 1px solid var(--sd-border); display: flex; align-items: center; justify-content: space-between; }
.sd-adm-card__head h2 { margin: 0; font-size: .98rem; font-weight: 700; color: var(--sd-ink); }
.sd-adm-card__head a { font-size: .82rem; font-weight: 700; color: var(--sd-primary); }
.sd-adm-card__body { padding: 20px; }
.sd-adm-card .sd-admin-table { border: none; border-radius: 0; }
.sd-adm-card .sd-admin-table th:first-child, .sd-adm-card .sd-admin-table td:first-child { padding-left: 20px; }
.sd-adm-card .sd-admin-table th:last-child, .sd-adm-card .sd-admin-table td:last-child { padding-right: 20px; }

.sd-adm-bar { margin-bottom: 16px; }
.sd-adm-bar:last-child { margin-bottom: 0; }
.sd-adm-bar__row { display: flex; justify-content: space-between; align-items: baseline; font-size: .85rem; font-weight: 700; margin-bottom: 7px; color: var(--sd-ink); }
.sd-adm-bar__row span { font-weight: 600; color: var(--sd-muted); font-size: .78rem; }
.sd-adm-bar__track { height: 8px; border-radius: 6px; background: var(--sd-bg); overflow: hidden; }
.sd-adm-bar__fill { height: 100%; border-radius: 6px; }

.sd-adm-empty { padding: 32px 20px; text-align: center; color: var(--sd-muted); font-size: .88rem; }

@media (max-width: 1100px) { .sd-adm-grid { grid-template-columns: 1fr; } }
@media (max-width: 900px) { .sd-admin__sidebar { display: none; } .sd-admin__main { padding: 20px; } .sd-admin__topbar { padding: 0 18px; } }
/* Auth pages (login / forgot password / reset password) */
.sd-auth { min-height: 100vh; display: flex; background: var(--sd-bg); }
.sd-auth__side {
    flex: 1 1 46%;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 48px 56px;
    color: #fff;
    background: linear-gradient(150deg, var(--sd-primary) 0%, var(--sd-primary-dark) 70%, var(--sd-dark) 130%);
    overflow: hidden;
}
.sd-auth__side::before, .sd-auth__side::after {
    content: ""; position: absolute; border-radius: 50%; background: rgba(255,255,255,.06);
}
.sd-auth__side::before { width: 420px; height: 420px; top: -160px; right: -140px; }
.sd-auth__side::after { width: 280px; height: 280px; bottom: -120px; left: -80px; background: rgba(255,255,255,.05); }
.sd-auth__logo { position: relative; z-index: 1; display: inline-flex; }
.sd-auth__logo img { height: 40px; background: #fff; padding: 6px 10px; border-radius: 8px; }
.sd-auth__side-content { position: relative; z-index: 1; max-width: 400px; }
.sd-auth__side-content h2 { font-size: 1.7rem; line-height: 1.25; margin: 0 0 14px; font-weight: 800; }
.sd-auth__side-content p { opacity: .88; font-size: .95rem; line-height: 1.6; margin: 0; }
.sd-auth__badges { position: relative; z-index: 1; list-style: none; margin: 28px 0 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.sd-auth__badges li { display: flex; align-items: center; gap: 10px; font-size: .88rem; opacity: .92; }
.sd-auth__badges svg { flex-shrink: 0; width: 18px; height: 18px; }
.sd-auth__foot { position: relative; z-index: 1; font-size: .78rem; opacity: .7; }
.sd-auth__main { flex: 1 1 54%; display: flex; align-items: center; justify-content: center; padding: 40px 24px; }
.sd-auth__card { width: 100%; max-width: 400px; background: #fff; border-radius: 18px; padding: 40px 38px; box-shadow: 0 20px 50px rgba(33,29,26,.1); }
.sd-auth__card-logo { display: none; margin-bottom: 24px; }
.sd-auth__card-logo img { height: 34px; }
.sd-auth__eyebrow { color: var(--sd-primary); font-weight: 800; font-size: .76rem; letter-spacing: .06em; text-transform: uppercase; margin: 0 0 8px; }
.sd-auth__title { font-size: 1.55rem; font-weight: 800; margin: 0 0 8px; color: var(--sd-ink); }
.sd-auth__subtitle { color: var(--sd-muted); margin: 0 0 28px; font-size: .92rem; line-height: 1.5; }
.sd-auth__field { margin-bottom: 18px; }
.sd-auth__label { display: block; font-weight: 700; font-size: .85rem; margin-bottom: 7px; color: var(--sd-ink); }
.sd-auth__input-wrap { position: relative; display: flex; align-items: center; }
.sd-auth__input-wrap .sd-auth__icon { position: absolute; left: 14px; width: 18px; height: 18px; color: var(--sd-muted); pointer-events: none; }
.sd-auth__input {
    width: 100%; padding: 13px 14px 13px 42px; border: 1.5px solid var(--sd-border); border-radius: 10px;
    font-size: .95rem; font-family: inherit; background: var(--sd-bg); transition: border-color .15s, box-shadow .15s, background .15s;
}
.sd-auth__input:focus { outline: none; border-color: var(--sd-primary); background: #fff; box-shadow: 0 0 0 3px var(--sd-primary-soft); }
.sd-auth__input--password { padding-right: 44px; }
.sd-auth__toggle {
    position: absolute; right: 6px; background: none; border: none; cursor: pointer; color: var(--sd-muted);
    padding: 8px; display: flex; align-items: center; border-radius: 6px; transition: color .15s;
}
.sd-auth__toggle:hover { color: var(--sd-primary); }
.sd-auth__toggle svg { width: 19px; height: 19px; }
.sd-auth__toggle svg[hidden] { display: none; }
.sd-auth__row { display: flex; justify-content: flex-end; align-items: center; margin: -6px 0 22px; }
.sd-auth__link { color: var(--sd-primary); font-weight: 700; font-size: .85rem; text-decoration: none; }
.sd-auth__link:hover { text-decoration: underline; }
.sd-auth__submit {
    width: 100%; padding: 14px; background: var(--sd-primary); color: #fff; border: none; border-radius: 10px;
    font-weight: 800; font-size: .98rem; cursor: pointer; transition: background .15s, transform .1s;
    box-shadow: 0 10px 24px rgba(222,31,38,.28);
}
.sd-auth__submit:hover { background: var(--sd-primary-dark); }
.sd-auth__submit:active { transform: translateY(1px); }
.sd-auth__footer { margin-top: 26px; text-align: center; font-size: .88rem; color: var(--sd-muted); }
.sd-auth__back { display: inline-flex; align-items: center; gap: 6px; margin-bottom: 22px; color: var(--sd-muted); font-size: .85rem; text-decoration: none; font-weight: 600; }
.sd-auth__back:hover { color: var(--sd-primary); }
.sd-auth__back svg { width: 16px; height: 16px; }
@media (max-width: 960px) {
    .sd-auth__side { display: none; }
    .sd-auth__card-logo { display: block; text-align: center; }
    .sd-auth__main { padding: 32px 18px; }
}
.sd-auth--embedded { min-height: 0; margin: 32px 0 60px; border-radius: 18px; overflow: hidden; box-shadow: 0 20px 50px rgba(33,29,26,.08); }
.sd-auth--embedded .sd-auth__side, .sd-auth--embedded .sd-auth__main { min-height: 560px; }
.sd-auth--embedded .sd-auth__card { box-shadow: none; border-radius: 0; }

.sd-empty { padding: 40px; text-align: center; color: var(--sd-muted); }

/* Settings dashboard */
.sd-settings { display: grid; grid-template-columns: 1fr 320px; gap: 24px; align-items: start; }
.sd-settings__card { background: #fff; border: 1px solid var(--sd-border); border-radius: var(--sd-radius); padding: 22px 24px; margin-bottom: 20px; scroll-margin-top: 16px; }
.sd-settings__card h2 { font-size: 1.05rem; margin: 0 0 4px; }
.sd-settings__hint { color: var(--sd-muted); font-size: 0.82rem; margin: 0 0 18px; }
.sd-settings__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px 18px; }
.sd-settings__side { position: sticky; top: 16px; display: flex; flex-direction: column; gap: 16px; }
.sd-settings__nav { background: #fff; border: 1px solid var(--sd-border); border-radius: var(--sd-radius); padding: 16px; }
.sd-settings__nav a { display: block; padding: 6px 4px; font-size: 0.85rem; color: var(--sd-ink); }
.sd-settings__nav a:hover { color: var(--sd-primary); }
.sd-settings__save { width: 100%; margin-top: 10px; }

.sd-toggle { display: flex; align-items: center; gap: 10px; cursor: pointer; font-weight: 600; font-size: 0.9rem; }
.sd-toggle input { appearance: none; width: 38px; height: 22px; border-radius: 999px; background: var(--sd-border); position: relative; cursor: pointer; flex-shrink: 0; transition: background .15s; }
.sd-toggle input::before { content: ''; position: absolute; top: 2px; left: 2px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: transform .15s; box-shadow: 0 1px 2px rgba(0,0,0,.3); }
.sd-toggle input:checked { background: var(--sd-primary); }
.sd-toggle input:checked::before { transform: translateX(16px); }

.sd-color-field { display: flex; align-items: center; gap: 8px; }
.sd-color-field input[type="color"] { width: 40px; height: 40px; padding: 0; border: 1px solid var(--sd-border); border-radius: 8px; cursor: pointer; background: none; }
.sd-color-field input[type="text"] { flex: 1; }

.sd-file-current { font-size: 0.78rem; color: var(--sd-muted); margin-top: 4px; }
.sd-file-current img { display: block; max-height: 40px; margin-top: 6px; border-radius: 6px; border: 1px solid var(--sd-border); }

.sd-whatsapp-preview { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 50%; color: #fff; box-shadow: 0 6px 16px rgba(0,0,0,.25); }

.sd-settings-tabs { display: flex; gap: 4px; margin-bottom: 20px; border-bottom: 1px solid var(--sd-border); }
.sd-settings-tabs a { padding: 10px 16px; font-size: 0.88rem; font-weight: 700; color: var(--sd-muted); border-bottom: 2px solid transparent; }
.sd-settings-tabs a:hover { color: var(--sd-ink); }
.sd-settings-tabs a.is-active { color: var(--sd-primary); border-color: var(--sd-primary); }

.sd-info-box { background: var(--sd-bg); border: 1px solid var(--sd-border); border-radius: 8px; padding: 12px 16px; font-size: 0.85rem; color: var(--sd-muted); margin-bottom: 18px; }

@media (max-width: 900px) {
    .sd-settings { grid-template-columns: 1fr; }
    .sd-settings__side { position: static; }
}

/* Topbar devis-tracking search */
.sd-topbar-search { display: flex; align-items: center; border: 1px solid rgba(255,255,255,.35); border-radius: 999px; overflow: hidden; }
.sd-topbar-search input {
    background: transparent;
    border: none;
    color: #fff;
    padding: 4px 10px;
    font-size: 0.78rem;
    width: 150px;
}
.sd-topbar-search input::placeholder { color: rgba(255,255,255,.75); }
.sd-topbar-search input:focus { outline: none; }
.sd-topbar-search button { background: transparent; border: none; color: #fff; padding: 4px 10px; cursor: pointer; display: flex; align-items: center; }
.sd-topbar-search button:hover { color: rgba(255,255,255,.8); }

/* Devis confirmation ribbon */
.sd-ribbon {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 45;
    background: var(--sd-dark);
    color: #fff;
    box-shadow: 0 -8px 24px rgba(0,0,0,.2);
}
.sd-ribbon__bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 12px 20px;
    flex-wrap: wrap;
}
.sd-ribbon__bar span { font-size: 0.9rem; font-weight: 600; }

/* WhatsApp floating widget (storefront) */
.sd-whatsapp-float {
    position: fixed;
    bottom: 22px;
    z-index: 40;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    box-shadow: 0 10px 24px rgba(0,0,0,.28);
}
.sd-whatsapp-float svg { width: 28px; height: 28px; }
.sd-whatsapp-float.sd-whatsapp-float--pulse::before {
    content: '';
    position: absolute;
    inset: -6px;
    border-radius: 50%;
    background: inherit;
    opacity: .55;
    animation: sd-whatsapp-pulse 1.8s ease-out infinite;
}
@media (prefers-reduced-motion: reduce) {
    .sd-whatsapp-float--pulse::before { animation: none; }
}
@keyframes sd-whatsapp-pulse {
    to { transform: scale(1.6); opacity: 0; }
}

@media (max-width: 720px) {
    .sd-product { grid-template-columns: 1fr; }
    .sd-header__bar { flex-wrap: wrap; }
    .sd-search { order: 3; max-width: 100%; flex-basis: 100%; }
    .sd-topbar__contact { gap: 12px; font-size: 0.78rem; }
    .sd-hero__grid { padding: 32px 24px; }
    .sd-hero__text, .sd-hero__logo, .sd-hero__photo { flex-basis: 100%; min-width: 0; }
    .sd-hero__logo, .sd-hero__photo { min-height: 220px; align-self: auto; }
    .sd-hero__text h1 { font-size: 1.6rem; }
    .sd-carousel__viewport { min-height: 860px; }
    .sd-carousel__nav { display: none; }
}
