/* ===================================================================
   NABILHUT — Brand Design System & CSS Custom Properties
   Fashion for a Better You
   =================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=Playfair+Display:ital,wght@0,700;0,800;1,700&display=swap');

:root {
    /* ---------------------------------------------------------------
       Official NabilHUT Brand Color Palette
    --------------------------------------------------------------- */
    --color-premium-black: #111116;
    --color-luxury-gold: #D99A20;
    --color-champagne-gold: #F5C45A;
    --color-dark-bronze: #4A2608;
    --color-warm-cream: #E8D2B5;
    --color-light-cream: #F8F3EB;
    --color-pure-white: #FFFFFF;

    /* ---------------------------------------------------------------
       Semantic Surface Tokens
    --------------------------------------------------------------- */
    --color-surface: #FFFFFF;
    --color-surface-soft: #FAF9F6;
    --color-surface-cream: #FDFBF8;
    --color-surface-dark: #111116;
    --color-surface-dark-elevated: #161620;
    --color-surface-dark-card: #1A1A24;

    /* ---------------------------------------------------------------
       Dark-context UI Shades (for dark-background sections/admin)
    --------------------------------------------------------------- */
    --color-dark-surface: #181820;
    --color-dark-surface-elevated: #22222D;
    --color-dark-border: #2D2D3B;
    --color-gold-border: rgba(217, 154, 32, 0.35);

    /* ---------------------------------------------------------------
       Semantic Text Tokens
    --------------------------------------------------------------- */
    /* Light-surface text (used on white/cream backgrounds) */
    --color-text-primary: #222222;
    --color-text-secondary: #555555;
    --color-text-muted: #777777;

    /* Dark-surface text (used on black/dark backgrounds) */
    --color-text-on-dark: #E2E2EA;
    --color-text-on-dark-muted: #9E9EA8;
    --color-text-on-dark-subtle: #6E6E80;

    /* Inverse (white text for dark surfaces) */
    --color-text-inverse: #FFFFFF;

    /* ---------------------------------------------------------------
       Border Tokens
    --------------------------------------------------------------- */
    --color-border-light: #ECECF2;
    --color-border-cream: #E5D8C5;
    --color-border-dark: #2D2D3B;

    /* ---------------------------------------------------------------
       Status / State Colors
    --------------------------------------------------------------- */
    --color-success: #198754;
    --color-warning: #D99A20;
    --color-danger: #DC3545;
    --color-info: #0D6EFD;

    /* ---------------------------------------------------------------
       Tonal Legacy Aliases (kept for backward-compat with storefront.css / admin.css)
    --------------------------------------------------------------- */
    --color-text-muted-dark: #9E9EA8;   /* muted text specifically on dark surfaces */
    --color-cream-light: #F7EFE5;
    --color-cream-surface: #FDFBF8;

    /* ---------------------------------------------------------------
       Typography — Inter Full Project
    --------------------------------------------------------------- */
    --font-heading: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --font-display: 'Playfair Display', Georgia, 'Times New Roman', serif;
    --font-regular: 400;
    --font-medium: 500;
    --font-semibold: 600;
    --font-bold: 700;

    /* ---------------------------------------------------------------
       Radius & Shadows
    --------------------------------------------------------------- */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 14px;
    --radius-pill: 50px;

    --shadow-subtle: 0 4px 20px rgba(0, 0, 0, 0.06);
    --shadow-card: 0 10px 30px rgba(17, 17, 22, 0.08);
    --shadow-gold: 0 6px 20px rgba(217, 154, 32, 0.25);
    --shadow-dark: 0 15px 40px rgba(0, 0, 0, 0.35);

    /* ---------------------------------------------------------------
       Transitions
    --------------------------------------------------------------- */
    --transition-smooth: all 0.28s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===================================================================
   Base Resets & Global Styles
   =================================================================== */
* {
    box-sizing: border-box;
}

body {
    font-family: var(--font-sans);
    font-weight: 400;
    color: var(--color-text-primary);
    background-color: #FAFAFC;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6, .brand-font {
    font-family: var(--font-heading);
    letter-spacing: -0.015em;
}

h1, h2, h3 {
    font-weight: 700;
}

h4, h5, h6, .brand-font {
    font-weight: 600;
}

a {
    color: inherit;
    text-decoration: none;
    transition: var(--transition-smooth);
}

/* ===================================================================
   Luxury Button System
   =================================================================== */
.btn-gold {
    background: linear-gradient(135deg, var(--color-champagne-gold) 0%, var(--color-luxury-gold) 100%);
    color: var(--color-premium-black) !important;
    font-weight: 700;
    font-size: 0.9rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    border: none;
    border-radius: var(--radius-md);
    padding: 0.75rem 1.6rem;
    box-shadow: var(--shadow-gold);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: var(--transition-smooth);
}

.btn-gold:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(217, 154, 32, 0.4);
    filter: brightness(1.05);
    color: var(--color-premium-black) !important;
}

.btn-gold:focus-visible {
    outline: 3px solid var(--color-champagne-gold);
    outline-offset: 2px;
}

.btn-gold:disabled,
.btn-gold.disabled {
    background: #C4A050;
    color: rgba(17, 17, 22, 0.6) !important;
    box-shadow: none;
    transform: none;
    cursor: not-allowed;
}

.btn-outline-gold {
    background: transparent;
    color: var(--color-luxury-gold) !important;
    border: 1.5px solid var(--color-luxury-gold);
    font-weight: 600;
    font-size: 0.88rem;
    letter-spacing: 0.8px;
    border-radius: var(--radius-md);
    padding: 0.65rem 1.4rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: var(--transition-smooth);
}

.btn-outline-gold:hover {
    background: var(--color-luxury-gold);
    color: var(--color-premium-black) !important;
    transform: translateY(-2px);
    box-shadow: var(--shadow-gold);
}

.btn-outline-gold:focus-visible {
    outline: 3px solid var(--color-luxury-gold);
    outline-offset: 2px;
}

.btn-dark-luxury {
    background: var(--color-premium-black);
    color: var(--color-pure-white) !important;
    border: 1px solid var(--color-dark-border);
    font-weight: 600;
    font-size: 0.9rem;
    border-radius: var(--radius-md);
    padding: 0.75rem 1.5rem;
    transition: var(--transition-smooth);
}

.btn-dark-luxury:hover {
    background: var(--color-luxury-gold);
    color: var(--color-premium-black) !important;
    border-color: var(--color-luxury-gold);
}

/* ===================================================================
   Badge System
   =================================================================== */
.badge-gold {
    background: linear-gradient(135deg, var(--color-champagne-gold), var(--color-luxury-gold));
    color: var(--color-premium-black);
    font-weight: 700;
    font-size: 0.72rem;
    letter-spacing: 0.8px;
    padding: 0.35rem 0.65rem;
    border-radius: var(--radius-sm);
    text-transform: uppercase;
}

.badge-luxury-black {
    background: var(--color-premium-black);
    color: var(--color-pure-white);
    border: 1px solid var(--color-gold-border);
    font-weight: 600;
    font-size: 0.72rem;
    letter-spacing: 0.8px;
    padding: 0.35rem 0.65rem;
    border-radius: var(--radius-sm);
    text-transform: uppercase;
}

/* ===================================================================
   Global Form Accessibility Improvements
   =================================================================== */

/* Consistent focus ring for all interactive elements */
.form-control:focus,
.form-select:focus,
.form-check-input:focus {
    border-color: var(--color-luxury-gold);
    box-shadow: 0 0 0 3px rgba(217, 154, 32, 0.2);
    outline: none;
}

/* Placeholder contrast — ensure readable placeholder text */
::placeholder {
    color: #888896 !important;
    opacity: 1;
}

/* ===================================================================
   Utility: Text on Dark Surfaces
   These classes explicitly set readable foreground colors for use
   on dark section backgrounds, overriding Bootstrap defaults.
   =================================================================== */

/* Override Bootstrap text-muted on any element inside a dark section */
.dark-section .text-muted,
.dark-section p.text-muted,
.dark-surface .text-muted {
    color: var(--color-text-on-dark-muted) !important;
}

/* Admin portal: ensure Bootstrap text-muted is readable on dark backgrounds */
.admin-wrapper .text-muted,
.admin-wrapper p.text-muted {
    color: var(--color-text-on-dark-muted) !important;
}

/* ===================================================================
   Custom Scrollbar
   =================================================================== */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: #111116;
}
::-webkit-scrollbar-thumb {
    background: #333340;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--color-luxury-gold);
}

/* ===================================================================
   Accessible Color Overrides
   Bootstrap's text-warning (#ffc107) on white = ~1.3:1, fails WCAG AA.
   These tokens provide accessible alternatives for each context.
   =================================================================== */

:root {
    /* Accessible amber for star ratings / icons on white or cream surfaces */
    --color-star-rating: #B8860B;          /* dark amber — 4.6:1 on white */

    /* Accessible gold link text on light surface */
    --color-link-gold: #B8860B;            /* same — ensures readability */
}

/* ===================================================================
   Global: Bootstrap text-warning override for light-surface contexts.
   Only applies OUTSIDE of known dark sections.
   Does NOT touch .admin-wrapper, .store-header, .main-nav,
   .store-footer, .promo-strip-banner, .hero-slider-section,
   .announcement-bar, .mobile-bottom-nav, .dropdown-menu-dark-luxury
   (all of which have dark backgrounds where #ffc107 is fine).
   =================================================================== */
.service-highlights-bar .text-warning,
.product-card .text-warning,
.product-card-body .text-warning,
.card.bg-white .text-warning,
.offcanvas.bg-white .text-warning,
main .text-warning:not(.store-header *):not(.main-nav *):not(.hero-slider-section *):not(.promo-strip-banner *):not(.store-footer *):not(.announcement-bar *):not(.mobile-bottom-nav *) {
    color: var(--color-luxury-gold) !important;
}
