/*
 * EyeLensBD storefront palette — three colours only:
 *   ink (black), white, and the logo red as the single accent.
 * Neutral greys below are tints of ink used for lines and image wells.
 * To switch the accent (e.g. to the logo teal #00A9A5), change --accent
 * and --accent-rgb here and in layouts/app.blade.php.
 */
:root {
    --ink: #0a0a0a;
    --ink-rgb: 10 10 10;
    --ink-soft: #262626;
    --white: #ffffff;
    --accent: #d7001f;
    --accent-rgb: 215 0 31;
    --accent-dark: #ad0019;
    --line: #e8e8e8;
    --surface: #f5f5f5;
    --muted: #6b6b6b;

    /* Back-compat aliases used by older inline styles. */
    --brand-primary: var(--ink);
    --brand-dark: var(--ink-soft);
    --brand-white: var(--white);

    --swiper-theme-color: var(--ink);
    --swiper-pagination-color: var(--white);
    --swiper-navigation-size: 16px;
}

body { background-color: var(--white); color: var(--ink); }
:where(*, ::before, ::after) { border-color: var(--line); }
:where(input, select, textarea, button) { accent-color: var(--ink); }
:where(input, textarea)::placeholder { color: #9a9a9a; opacity: 1; }
:where(a, button, input, select, textarea):focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}
:where(button):disabled { cursor: not-allowed; }
::selection { background: var(--accent); color: var(--white); }

/* Primary (black) buttons get a subtle lift on hover across every page. */
:where(button, a)[class*="bg-brand-primary"]:not([class*="hover:bg-"]):hover { background-color: var(--ink-soft); }

/* ---------- Logo ---------- */
.storefront-brand-logo { width: 120px; height: 64px; object-fit: contain; }
.storefront-brand-logo-default { object-fit: cover; object-position: center 45%; }

@media (max-width: 1023px) {
    .storefront-brand-logo { width: 96px; height: 52px; }
}

/* ---------- Section heading (shared by every home section) ---------- */
.sf-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    font-size: .6875rem;
    font-weight: 700;
    letter-spacing: .18em;
    text-transform: uppercase;
    color: var(--accent);
}
.sf-eyebrow::before {
    content: '';
    width: 1.25rem;
    height: 2px;
    background: currentColor;
    border-radius: 2px;
}
.sf-title {
    font-family: 'Plus Jakarta Sans', 'Inter', sans-serif;
    font-weight: 800;
    letter-spacing: -.02em;
    color: var(--ink);
}

/* ---------- Shared tile (categories, shapes, brands, services) ---------- */
.sf-tile {
    border: 1px solid var(--line);
    background: var(--white);
    border-radius: 1rem;
    transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}
.sf-tile:hover {
    border-color: var(--ink);
    box-shadow: 0 10px 30px -12px rgb(var(--ink-rgb) / .18);
    transform: translateY(-2px);
}

/* ---------- Product card ---------- */
.product-card {
    border: 1px solid var(--line);
    transition: border-color .2s ease, box-shadow .25s ease;
}
.product-card:hover {
    border-color: #cfcfcf;
    box-shadow: 0 16px 40px -18px rgb(var(--ink-rgb) / .25);
}
.product-card-image { transition: transform .5s ease; }
.product-card:hover .product-card-image { transform: scale(1.05); }

/* ---------- Desktop nav underline ---------- */
.sf-nav-link { position: relative; }
.sf-nav-link::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: -11px;
    height: 2px;
    background: var(--accent);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform .2s ease;
}
.group:hover > .sf-nav-link::after,
.sf-nav-link:hover::after,
.sf-nav-link[aria-current="page"]::after { transform: scaleX(1); }

/* ---------- Third-party widgets ---------- */
#toast-container > div {
    background-color: var(--ink) !important;
    color: var(--white) !important;
    box-shadow: 0 12px 30px -10px rgb(var(--ink-rgb) / .4) !important;
    border-radius: .75rem !important;
    opacity: 1;
}
#toast-container > .toast-error { background-color: var(--accent) !important; }
#toast-container .toast-progress { background-color: var(--white); opacity: .5; }
.swiper-pagination-bullet { opacity: .5; background: var(--white); width: 8px; height: 8px; transition: width .2s, opacity .2s; }
.swiper-pagination-bullet-active { opacity: 1; width: 24px; border-radius: 99px; background: var(--white); }
input[type="range"] { accent-color: var(--ink); }

/* Laravel pagination links inherit the palette. */
nav[role="navigation"] [aria-current="page"] > span {
    background: var(--ink) !important;
    border-color: var(--ink) !important;
    color: var(--white) !important;
}

@media (prefers-reduced-motion: reduce) {
    .sf-tile, .product-card, .product-card-image, .sf-nav-link::after { transition: none !important; transform: none !important; }
}
