/*
 * ═══════════════════════════════════════════════════════════
 * VASTRABHA — Premium Design System v1.0
 * Brand: Yellow (#F5B800) & Red (#D92B2B) on Rich Dark/White
 * Mobile-First • Handcrafted • Zero Generic AI Look
 * ═══════════════════════════════════════════════════════════
 */

/* ── Google Fonts ───────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800;900&family=Space+Grotesk:wght@400;500;600;700&display=swap');

/* ── CSS Custom Properties (Design Tokens) ──────────────── */
:root {
    /* Brand Colors */
    --vb-gold:        #F5B800;
    --vb-gold-light:  #FFD54F;
    --vb-gold-dark:   #C49000;
    --vb-red:         #D92B2B;
    --vb-red-light:   #EF5350;
    --vb-red-dark:    #B71C1C;
    --vb-green:       #2E7D32;
    --vb-green-light: #4CAF50;

    /* Neutrals */
    --vb-white:       #FFFFFF;
    --vb-off-white:   #FAFAFA;
    --vb-gray-50:     #F5F5F5;
    --vb-gray-100:    #EEEEEE;
    --vb-gray-200:    #E0E0E0;
    --vb-gray-300:    #BDBDBD;
    --vb-gray-400:    #9E9E9E;
    --vb-gray-500:    #757575;
    --vb-gray-600:    #616161;
    --vb-gray-700:    #424242;
    --vb-gray-800:    #2C2C2C;
    --vb-gray-900:    #1A1A1A;
    --vb-black:       #0D0D0D;

    /* Semantic */
    --vb-bg:          var(--vb-white);
    --vb-bg-alt:      var(--vb-off-white);
    --vb-text:        var(--vb-gray-900);
    --vb-text-muted:  var(--vb-gray-500);
    --vb-border:      var(--vb-gray-200);
    --vb-accent:      var(--vb-gold);
    --vb-danger:      var(--vb-red);
    --vb-success:     var(--vb-green);

    /* Typography */
    --font-primary:   'Outfit', sans-serif;
    --font-display:   'Space Grotesk', sans-serif;
    --fs-xs:   0.75rem;
    --fs-sm:   0.8125rem;
    --fs-base: 0.9375rem;
    --fs-md:   1.0625rem;
    --fs-lg:   1.25rem;
    --fs-xl:   1.5rem;
    --fs-2xl:  2rem;
    --fs-3xl:  2.5rem;
    --fs-4xl:  3.25rem;
    --fs-hero: clamp(2.5rem, 6vw, 5rem);

    /* Spacing */
    --sp-1: 0.25rem;
    --sp-2: 0.5rem;
    --sp-3: 0.75rem;
    --sp-4: 1rem;
    --sp-5: 1.25rem;
    --sp-6: 1.5rem;
    --sp-8: 2rem;
    --sp-10: 2.5rem;
    --sp-12: 3rem;
    --sp-16: 4rem;
    --sp-20: 5rem;

    /* Borders & Radius */
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 9999px;

    /* Shadows */
    --shadow-sm:   0 1px 3px rgba(0,0,0,0.06);
    --shadow-md:   0 4px 14px rgba(0,0,0,0.08);
    --shadow-lg:   0 10px 30px rgba(0,0,0,0.1);
    --shadow-xl:   0 20px 50px rgba(0,0,0,0.14);
    --shadow-gold: 0 4px 20px rgba(245,184,0,0.25);
    --shadow-red:  0 4px 20px rgba(217,43,43,0.2);

    /* Transitions */
    --ease-out:  cubic-bezier(0.22, 1, 0.36, 1);
    --ease-snap: cubic-bezier(0.34, 1.56, 0.64, 1);
    --dur-fast:  150ms;
    --dur-base:  250ms;
    --dur-slow:  400ms;

    /* Layout */
    --container-max: 1280px;
    --header-h: 64px;
    --nav-h: 44px;
}

/* ── Reset & Base ───────────────────────────────────────── */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
    font-size: 16px;
}

body {
    font-family: var(--font-primary);
    font-size: var(--fs-base);
    color: var(--vb-text);
    background: var(--vb-bg);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color var(--dur-fast) var(--ease-out);
}

button, input, select, textarea {
    font-family: inherit;
    font-size: inherit;
    border: none;
    outline: none;
    background: none;
}

ul, ol { list-style: none; }

/* ── Layout Utilities ───────────────────────────────────── */
.vb-container {
    width: 100%;
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--sp-4);
}

.vb-section {
    padding: var(--sp-12) 0;
}

.vb-grid {
    display: grid;
    gap: var(--sp-4);
}

/* ── Typography ─────────────────────────────────────────── */
.vb-heading {
    font-family: var(--font-display);
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: -0.02em;
    color: var(--vb-text);
}

.vb-heading--hero { font-size: var(--fs-hero); }
.vb-heading--xl   { font-size: var(--fs-3xl); }
.vb-heading--lg   { font-size: var(--fs-2xl); }
.vb-heading--md   { font-size: var(--fs-xl); }

.vb-label {
    font-size: var(--fs-xs);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--vb-text-muted);
}

/* ── Buttons ────────────────────────────────────────────── */
.vb-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--sp-2);
    padding: var(--sp-3) var(--sp-6);
    font-weight: 600;
    font-size: var(--fs-sm);
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: all var(--dur-base) var(--ease-out);
    position: relative;
    overflow: hidden;
    white-space: nowrap;
}

.vb-btn::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(255,255,255,0.15);
    transform: translateY(100%);
    transition: transform var(--dur-base) var(--ease-out);
}

.vb-btn:hover::after { transform: translateY(0); }

.vb-btn--primary {
    background: var(--vb-red);
    color: var(--vb-white);
    box-shadow: var(--shadow-red);
}

.vb-btn--primary:hover {
    background: var(--vb-red-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(217,43,43,0.35);
}

.vb-btn--gold {
    background: var(--vb-gold);
    color: var(--vb-black);
    box-shadow: var(--shadow-gold);
}

.vb-btn--gold:hover {
    background: var(--vb-gold-dark);
    transform: translateY(-2px);
}

.vb-btn--outline {
    border: 2px solid var(--vb-gray-800);
    color: var(--vb-gray-800);
    background: transparent;
}

.vb-btn--outline:hover {
    background: var(--vb-gray-800);
    color: var(--vb-white);
}

.vb-btn--lg {
    padding: var(--sp-4) var(--sp-8);
    font-size: var(--fs-base);
}

.vb-btn--sm {
    padding: var(--sp-2) var(--sp-4);
    font-size: var(--fs-xs);
}

.vb-btn--block { width: 100%; }

/* ── Form Inputs ────────────────────────────────────────── */
.vb-input-group {
    display: flex;
    flex-direction: column;
    gap: var(--sp-2);
    margin-bottom: var(--sp-4);
}

.vb-input-group label {
    font-size: var(--fs-sm);
    font-weight: 600;
    color: var(--vb-gray-700);
}

.vb-input {
    width: 100%;
    padding: var(--sp-3) var(--sp-4);
    background: var(--vb-gray-50);
    border: 2px solid transparent;
    border-radius: var(--radius-md);
    font-size: var(--fs-base);
    color: var(--vb-text);
    transition: all var(--dur-base) var(--ease-out);
}

.vb-input:focus {
    border-color: var(--vb-gold);
    background: var(--vb-white);
    box-shadow: 0 0 0 4px rgba(245,184,0,0.12);
}

.vb-input::placeholder {
    color: var(--vb-gray-400);
}

/* ── Cards ──────────────────────────────────────────────── */
.vb-card {
    background: var(--vb-white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: all var(--dur-base) var(--ease-out);
    position: relative;
}

.vb-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

/* ── Product Card (The Star Component) ──────────────────── */
.vb-product-card {
    background: var(--vb-white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    position: relative;
    transition: all var(--dur-slow) var(--ease-out);
    cursor: pointer;
}

.vb-product-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-xl);
}

.vb-product-card__img-wrap {
    position: relative;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    background: var(--vb-gray-100);
}

.vb-product-card__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s var(--ease-out);
}

.vb-product-card:hover .vb-product-card__img {
    transform: scale(1.08);
}

.vb-product-card__badge {
    position: absolute;
    top: var(--sp-3);
    left: var(--sp-3);
    padding: var(--sp-1) var(--sp-3);
    font-size: var(--fs-xs);
    font-weight: 700;
    border-radius: var(--radius-sm);
    z-index: 2;
}

.vb-product-card__badge--sale {
    background: var(--vb-red);
    color: var(--vb-white);
}

.vb-product-card__badge--new {
    background: var(--vb-gold);
    color: var(--vb-black);
}

.vb-product-card__wishlist {
    position: absolute;
    top: var(--sp-3);
    right: var(--sp-3);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255,255,255,0.9);
    backdrop-filter: blur(6px);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 2;
    transition: all var(--dur-base) var(--ease-snap);
    border: none;
}

.vb-product-card__wishlist:hover {
    transform: scale(1.15);
    background: var(--vb-red);
    color: var(--vb-white);
}

.vb-product-card__body {
    padding: var(--sp-3) var(--sp-3) var(--sp-4);
}

.vb-product-card__brand {
    font-size: var(--fs-xs);
    font-weight: 600;
    color: var(--vb-gold-dark);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: var(--sp-1);
}

.vb-product-card__name {
    font-size: var(--fs-sm);
    font-weight: 500;
    color: var(--vb-gray-800);
    line-height: 1.3;
    margin-bottom: var(--sp-2);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.vb-product-card__price {
    display: flex;
    align-items: baseline;
    gap: var(--sp-2);
    flex-wrap: wrap;
}

.vb-product-card__price-sale {
    font-size: var(--fs-md);
    font-weight: 700;
    color: var(--vb-text);
}

.vb-product-card__price-original {
    font-size: var(--fs-sm);
    color: var(--vb-gray-400);
    text-decoration: line-through;
}

.vb-product-card__price-discount {
    font-size: var(--fs-xs);
    font-weight: 700;
    color: var(--vb-green);
}

.vb-product-card__rating {
    display: flex;
    align-items: center;
    gap: var(--sp-1);
    margin-top: var(--sp-2);
    font-size: var(--fs-xs);
    color: var(--vb-gray-500);
}

.vb-product-card__rating-star {
    color: var(--vb-gold);
}

/* ── Flash Messages ─────────────────────────────────────── */
.vb-flash-container {
    position: fixed;
    top: calc(var(--header-h) + var(--sp-4));
    right: var(--sp-4);
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: var(--sp-2);
    max-width: 400px;
    width: 100%;
}

.vb-flash {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--sp-3);
    padding: var(--sp-3) var(--sp-4);
    border-radius: var(--radius-md);
    font-size: var(--fs-sm);
    font-weight: 500;
    animation: vb-flash-in 0.4s var(--ease-snap);
    backdrop-filter: blur(10px);
}

.vb-flash--success { background: rgba(46,125,50,0.92); color: #fff; }
.vb-flash--error   { background: rgba(217,43,43,0.92); color: #fff; }
.vb-flash--warning { background: rgba(245,184,0,0.92); color: #000; }
.vb-flash--info    { background: rgba(66,66,66,0.92); color: #fff; }

.vb-flash__close {
    cursor: pointer;
    font-size: var(--fs-lg);
    line-height: 1;
    opacity: 0.7;
    transition: opacity var(--dur-fast);
    background: none;
    border: none;
    color: inherit;
}
.vb-flash__close:hover { opacity: 1; }

@keyframes vb-flash-in {
    from { transform: translateX(100%); opacity: 0; }
    to   { transform: translateX(0);   opacity: 1; }
}

/* ── Skeleton Loader ────────────────────────────────────── */
.vb-skeleton {
    background: linear-gradient(90deg, var(--vb-gray-100) 25%, var(--vb-gray-200) 50%, var(--vb-gray-100) 75%);
    background-size: 200% 100%;
    animation: vb-shimmer 1.5s infinite;
    border-radius: var(--radius-sm);
}

@keyframes vb-shimmer {
    0%   { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ── Star Rating Display ────────────────────────────────── */
.vb-stars {
    display: inline-flex;
    gap: 2px;
}

.vb-stars__icon {
    width: 16px;
    height: 16px;
    color: var(--vb-gray-300);
}

.vb-stars__icon--filled {
    color: var(--vb-gold);
}

/* ── Badges & Tags ──────────────────────────────────────── */
.vb-tag {
    display: inline-flex;
    align-items: center;
    padding: var(--sp-1) var(--sp-3);
    font-size: var(--fs-xs);
    font-weight: 600;
    border-radius: var(--radius-full);
    background: var(--vb-gray-100);
    color: var(--vb-gray-700);
}

.vb-tag--gold    { background: rgba(245,184,0,0.15); color: var(--vb-gold-dark); }
.vb-tag--red     { background: rgba(217,43,43,0.1); color: var(--vb-red); }
.vb-tag--green   { background: rgba(46,125,50,0.1); color: var(--vb-green); }

/* ── Responsive Grid for Products ───────────────────────── */
.vb-product-grid {
    display: grid;
    gap: var(--sp-4);
    grid-template-columns: repeat(2, 1fr);
}

@media (min-width: 600px) {
    .vb-product-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (min-width: 900px) {
    .vb-product-grid { grid-template-columns: repeat(4, 1fr); gap: var(--sp-5); }
}

@media (min-width: 1200px) {
    .vb-product-grid { grid-template-columns: repeat(4, 1fr); gap: var(--sp-6); }
}

/* ── Desktop Adjustments ────────────────────────────────── */
@media (min-width: 768px) {
    :root {
        --header-h: 72px;
    }
    .vb-container { padding: 0 var(--sp-8); }
    .vb-section   { padding: var(--sp-16) 0; }
}
