/* ==========================================================================
   Storefront theme — simple, low-card, easy to browse
   Loaded AFTER app.css, on storefront pages only (components/layouts/site
   .blade.php). Every rule here only overrides *cosmetic* properties (color,
   font, radius, shadow, spacing, border) on the existing class contract —
   no selector is renamed and no layout (display/grid/flex/width) is
   touched, so every data-action/id hook that public/js/*.js depends on
   keeps working untouched. Font (Onest) is loaded via the Google Fonts
   <link> in site.blade.php.

   Design direction: the previous theme wrapped almost every block — trust
   items, category tiles, the shop rail, FAQ rows — in its own bordered,
   shadowed "card", which reads as visually busy/heavy. This pass keeps only
   ONE elevation cue per surface (a hairline border OR a soft shadow, never
   both), drops the card treatment entirely from low-priority blocks (trust
   bar, FAQ rows), and moves the page background to a clean near-white
   neutral instead of a warm cream, so the configurable brand color (still
   wired via --site-primary/--site-secondary) does the visual work instead
   of borders and gradients everywhere.
   ========================================================================== */

:root {
    --font-display: 'Onest', sans-serif;
    --font-eyebrow: 'Onest', sans-serif;
    /* --site-primary/--site-secondary stay wired to the admin-configurable
       site settings; these are only the fallback defaults. */
    --color-primary: var(--site-primary, #be185d);
    --color-primary-dark: color-mix(in srgb, var(--color-primary) 72%, #000);
    --color-primary-soft: color-mix(in srgb, var(--color-primary) 8%, transparent);
    --color-secondary: var(--site-secondary, #f6a623);
    --color-dark: #171717;
    --color-green: #2d6a4f;
    --light: #fafafa;
    --surface: #ffffff;
    --star: #f6a623;
    --accent: var(--color-secondary);
    --sale-badge: #d1264c;
    --border-color: #e9e9e7;
    --text-muted: #7a7a76;
    --radius: 10px;
    --radius-lg: 14px;
    --radius-pill: 999px;
    /* One soft shadow, used sparingly — on hover states and true overlays
       (modals), not as a resting state on every block. */
    --shadow-sm: 0 2px 10px rgba(20, 20, 18, 0.06);
    --shadow-md: 0 10px 28px rgba(20, 20, 18, 0.1);
    --shadow-lg: 0 24px 56px rgba(20, 20, 18, 0.16);
}

body {
    font-family: 'Onest', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: #3a3a38;
    background: var(--light);
}

/* ----- Buttons: flat, clear, one hover cue ----- */
.btn {
    border-radius: var(--radius-pill);
    font-family: 'Onest', sans-serif;
    font-weight: 600;
    letter-spacing: 0.01em;
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, transform 0.15s ease;
}

.btn-primary {
    background: var(--color-primary);
    border: none;
    box-shadow: none;
}

.btn-primary:hover:not(:disabled) {
    background: var(--color-primary-dark);
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}

.btn-outline {
    border: 1.5px solid var(--border-color);
    background: var(--surface);
    color: var(--color-dark);
}

.btn-outline:hover:not(:disabled) {
    border-color: var(--color-primary);
    color: var(--color-primary);
    background: var(--surface);
}

.btn-buy-now {
    background: var(--color-dark);
}

.btn-buy-now:hover:not(:disabled) {
    background: var(--color-primary-dark);
    transform: translateY(-1px);
}

.btn-google {
    border-radius: var(--radius-pill);
}

.btn-icon {
    border-radius: 50%;
}

/* ----- Forms / cards ----- */
/* app.css's 2rem field gap suits admin's long forms; storefront forms
   (login, profile, address, contact) read better tighter. */
.form-group {
    margin-bottom: 1.25rem;
}

.form-control {
    border-radius: var(--radius);
    border-color: var(--border-color);
    font-family: 'Onest', sans-serif;
}

.form-control:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px var(--color-primary-soft);
}

/* Flat by default — a hairline border only, no shadow. Shadow is reserved
   for the handful of surfaces that genuinely float above the page. */
.card {
    border-radius: var(--radius-lg);
    box-shadow: none;
    border: 1px solid var(--border-color);
}

.badge {
    font-family: 'Onest', sans-serif;
}

.section-title {
    font-family: var(--font-display);
    font-weight: 700;
    color: var(--color-dark);
}

.page-title {
    font-family: var(--font-display);
    font-weight: 800;
    color: var(--color-dark);
    position: relative;
    padding-bottom: 14px;
}

.page-title::after {
    content: "";
    display: block;
    width: 44px;
    height: 3px;
    border-radius: 4px;
    background: var(--color-primary);
    margin-top: 10px;
}

/* Centered section intro: eyebrow label, then .page-title with its
   underline re-centered via this modifier, then an optional description. */
.section-eyebrow {
    display: inline-block;
    font-family: 'Onest', sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--color-primary);
    margin-bottom: 0.5rem;
}

.page-title-center {
    text-align: center;
}

.page-title-center::after {
    margin-left: auto;
    margin-right: auto;
}

.section-header-desc {
    max-width: 560px;
    margin: 0.75rem auto 0;
    color: var(--text-muted);
    text-align: center;
}


/* ===================== Header / topbar / nav — single clean row ===================== */
.site-topbar {
    background: var(--color-dark);
    font-family: 'Onest', sans-serif;
}

/* Follows the bar's own light text color rather than --color-secondary,
   which the admin may set to a dark shade that vanishes on this bar. */
.site-topbar svg {
    color: inherit;
}

.site-topbar-tag {
    background: var(--color-primary);
    color: #fff;
}

.site-topbar-social a {
    transition: background-color 0.2s ease;
}

.site-topbar-social a:hover {
    background: var(--color-primary);
}

.site-header {
    background: var(--surface);
    color: var(--color-dark);
    border-bottom: 1px solid var(--border-color);
    box-shadow: none;
}

.site-navbar-inner {
    padding: 0.9rem 1rem;
}

.site-logo {
    max-height: 52px;
}

.mobile-menu-toggle,
.site-brand,
.nav-icon-btn {
    color: var(--color-dark);
}

.site-brand:hover {
    color: var(--color-primary);
}

.site-brand {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 1.55rem;
    letter-spacing: -0.01em;
    gap: 0.6rem;
}

/* Icon badge next to the wordmark (only rendered when there's no uploaded
   logo image — see components/layouts/site.blade.php). */
.site-brand-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: var(--color-primary);
    color: #fff;
    box-shadow: none;
    flex-shrink: 0;
}

.site-brand-icon svg {
    width: 21px;
    height: 21px;
}

/* Center the primary nav links (desktop only — the 640px-and-below
   breakpoint in app.css switches .site-nav to a column-flex dropdown, where
   centering has no visible effect anyway). */
.site-nav {
    justify-content: center;
}

.site-nav a {
    font-family: 'Onest', sans-serif;
    font-size: 0.87rem;
    font-weight: 600;
    color: #55554f;
    position: relative;
}

.site-nav a::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background: var(--color-primary);
    border-radius: 2px;
    transition: width 0.2s ease;
}

.site-nav a:hover,
.site-nav a.active {
    color: var(--color-dark);
}

.site-nav a:hover::after,
.site-nav a.active::after {
    width: 100%;
}

/* Right-side icon buttons: search toggle, wishlist, cart, account */
.nav-icon-btn:hover {
    background: var(--light);
    color: var(--color-primary);
}

.site-icon-count {
    background: var(--color-primary);
    color: #fff;
}

.nav-search-panel {
    background: var(--light);
}

.nav-search-form {
    background: var(--surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-pill);
}

.nav-search-form input {
    color: var(--color-dark);
}

.nav-search-form button {
    background: var(--color-primary);
    color: #fff;
    transition: background-color 0.2s ease, transform 0.15s ease;
}

.nav-search-form button:hover {
    background: var(--color-primary-dark);
}

.nav-search-form button:active {
    transform: scale(0.93);
}

/* ===================== Footer ===================== */
.site-footer {
    background: var(--color-dark);
    color: rgba(255, 255, 255, 0.6);
    border-top: none;
}

.site-footer-brand-name {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 1.5rem;
    color: #fff;
}

.site-footer-heading {
    font-family: 'Onest', sans-serif;
    font-weight: 700;
    font-size: 0.9rem;
    letter-spacing: 0.02em;
    color: #fff;
    display: inline-block;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--color-primary);
}

.site-footer-link:hover {
    color: #fff;
}

.site-footer-social a {
    border-radius: 9px;
    background: rgba(255, 255, 255, 0.06);
}

.site-footer-social a:hover {
    background: var(--color-primary);
}

/* ===================== Home: hero, trust bar, category, products ===================== */
.hero-slider {
    border-radius: 0;
    background: var(--light);
}

.hero-slide-title {
    font-family: var(--font-display);
    font-weight: 800;
    letter-spacing: -0.01em;
}

.hero-slide-subtitle {
    font-family: 'Onest', sans-serif;
}

.hero-slide-btn {
    border-radius: var(--radius-pill);
    font-family: 'Onest', sans-serif;
    font-weight: 600;
    box-shadow: none;
    transition: transform 0.2s ease;
}

.hero-slide-btn:hover {
    transform: translateY(-1px);
}

.hero-slider-dot.active {
    background: var(--color-primary);
}

/* Trust bar: no per-item card — just icon + text on the bar's own tint. */
.trust-bar {
    background: var(--surface);
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

.trust-item {
    border-radius: 0;
    box-shadow: none;
    background: transparent;
    transition: none;
}

.trust-item:hover {
    transform: none;
    box-shadow: none;
}

.trust-item svg {
    background: var(--color-primary-soft);
    color: var(--color-primary);
    border-radius: 50%;
}

.trust-item-title {
    font-family: 'Onest', sans-serif;
    font-weight: 600;
}

.home-panel-title {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 1.45rem;
    color: var(--color-dark);
}

.home-panel-link {
    font-family: 'Onest', sans-serif;
    font-weight: 600;
}

.home-panel-link:hover {
    color: var(--color-primary);
}

.category-tile {
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: none;
    transition: transform 0.25s ease;
}

.category-tile:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-sm);
}

.category-name {
    font-family: 'Onest', sans-serif;
    font-weight: 700;
}

/* Product card: flat at rest — a hairline border, no shadow — with a
   single soft lift on hover. This is the single biggest "too many cards"
   fix, since it's repeated dozens of times per page. */
.product-card {
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    box-shadow: none;
    transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.product-card:hover {
    border-color: var(--border-color);
    box-shadow: var(--shadow-sm);
    transform: none;
}

.product-card:hover .product-card-image {
    transform: scale(1.04);
}

.product-card-image {
    transition: transform 0.3s ease;
}

.product-card-category {
    font-family: 'Onest', sans-serif;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.product-card-name {
    font-family: 'Onest', sans-serif;
    font-weight: 600;
    color: var(--color-dark);
}

.product-card-link:hover .product-card-name {
    color: var(--color-primary);
}

.wishlist-btn,
.wishlist-btn-card {
    border-radius: 50%;
}

.wishlist-btn.active,
.wishlist-btn-card.active {
    color: var(--sale-badge);
    border-color: var(--sale-badge);
}

.wishlist-btn.active svg,
.wishlist-btn-card.active svg {
    fill: var(--sale-badge);
}

.stars-fill {
    color: var(--star);
}

.price,
.product-card-price {
    color: var(--color-dark);
    font-family: 'Onest', sans-serif;
    font-weight: 700;
}

.price-off {
    background: var(--color-primary);
    color: #fff;
    border-radius: 6px;
}

/* ===================== Shop / category listing ===================== */
.shop-rail,
.shop-toolbar {
    border-radius: var(--radius-lg);
    background: var(--surface);
    border: 1px solid var(--border-color);
    box-shadow: none;
}

.shop-rail-title {
    font-family: 'Onest', sans-serif;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.03em;
    color: var(--color-dark);
}

.shop-facet-link:hover,
.shop-facet-link.active,
.shop-clear {
    color: var(--color-primary);
}

.pagination-link {
    border-radius: 50%;
}

.pagination-link.is-current {
    background: var(--color-primary);
    border-color: var(--color-primary);
}

/* ===================== Product detail ===================== */
.pdp-title {
    font-family: var(--font-display);
    font-weight: 800;
    color: var(--color-dark);
}

.pdp-category:hover,
.pdp-rating-value {
    color: var(--color-primary);
}

.qty-stepper {
    border-radius: var(--radius-pill);
    overflow: visible;
    border-color: var(--border-color);
}

.qty-btn {
    border-radius: 50%;
    background: var(--surface);
    transition: background 0.2s ease, color 0.2s ease;
}

.qty-btn:hover {
    background: var(--color-primary);
    color: #fff;
}

.rating-stars,
.star-filled {
    color: var(--star);
}

.review-item-avatar {
    background: var(--color-primary);
    font-family: 'Onest', sans-serif;
}

.review-form-box {
    border-radius: var(--radius-lg);
}

.star-rating-input label,
.star-rating-input label:hover,
.star-rating-input label:hover ~ label,
.star-rating-input input:checked ~ label {
    color: var(--star);
}

/* PDP price: brand-colored selling price, muted MRP, discount pill. */
.pdp-price .price-lg {
    color: var(--color-primary);
}

.pdp-price .price-lg .price-whole {
    font-size: 2.1rem;
}

.pdp-mrp-inline {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-muted);
}

.pdp-price-off {
    padding: 0.2rem 0.6rem;
    border-radius: var(--radius-pill);
    background: var(--color-primary-soft);
    color: var(--color-primary);
    font-size: 0.8rem;
}

/* PDP buy box */
.buybox {
    padding: 1.5rem;
    background: var(--surface);
}

.buybox .size-selector-label {
    font-size: 0.95rem;
    margin-bottom: 0.65rem;
}

.buybox .size-option {
    padding: 0 1rem;
    border-radius: var(--radius-pill);
}

.buybox-stock {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.buybox-stock.in-stock::before,
.buybox-stock.out-of-stock::before {
    background: currentColor;
}

.buybox-purchase-row .qty-stepper {
    padding: 0 0.3rem;
}

.buybox-purchase-row .qty-input {
    border: none;
    background: transparent;
    font-weight: 600;
}

@media (max-width: 480px) {
    .buybox {
        padding: 1.1rem;
    }
}

/* ===================== Cart / checkout / orders ===================== */
/* The few surfaces that genuinely hold the page's main transaction get to
   keep a soft shadow instead of just a border — but only one cue, not both
   stacked with a heavy border too. */
.cart-panel,
.order-summary,
.buybox,
.order-head-card,
.order-card {
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    border: none;
}

.cart-panel-title {
    font-family: var(--font-display);
    font-weight: 700;
}

.cart-row-name:hover {
    color: var(--color-primary);
}

.cart-row-delete {
    color: var(--sale-badge);
}

.cart-panel-foot strong,
.order-summary-row.order-summary-grand-total {
    color: var(--color-dark);
}

.order-summary-checkout-btn {
    border-radius: var(--radius-pill);
}

.address-option,
.payment-option {
    border-radius: var(--radius);
}

.address-option:has(input:checked) {
    border-color: var(--color-primary);
    background: var(--color-primary-soft);
}

.link-add-address,
.shop-clear {
    color: var(--color-primary);
}

/* ===================== Auth / profile ===================== */
.auth-card {
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    border: none;
}

.auth-card-links a:hover {
    color: var(--color-primary);
}

.profile-hero {
    background: var(--color-primary);
    border-radius: var(--radius-lg);
}

.profile-avatar,
.profile-avatar-edit {
    color: var(--color-primary);
}

.profile-tab-btn.active {
    background: var(--color-primary);
    border-radius: var(--radius-pill);
}

.profile-tab-btn:hover {
    background: var(--color-primary-soft);
}

/* ===================== Static pages: about / contact / faq ===================== */
.faq-item {
    border-radius: var(--radius);
    box-shadow: none;
    border: 1px solid var(--border-color);
}

.faq-question {
    font-family: 'Onest', sans-serif;
}

/* ===================== Mobile header: search/wishlist/cart/account icons stay
   in the row at every breakpoint; only the Home/Shop/... links collapse into
   the hamburger dropdown ===================== */
@media (max-width: 640px) {
    /* The popup nav sits on a white sheet, matching the desktop bar (now also
       white) — keep readable dark text, no underline-grow effect on mobile. */
    .site-nav a {
        color: var(--color-dark);
        font-weight: 500;
    }

    .site-nav a::after {
        display: none;
    }

    .site-nav a:hover,
    .site-nav a.active {
        color: var(--color-primary);
    }
}
