/* ============================================================
   SHREE MOBILES — Global Design System (Tailwind Companion)
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&family=Inter:wght@400;500;600&display=swap');

:root {
    --primary: #C9A84C;
    --primary-dark: #8B6F2E;
    --primary-light: #E5C366;
    --bg-void: #080810;
    --surface: #12121A;
    --on-surface: #FFFFFF;
    --zinc-gray: #71717A;
    
    /* Fluid Typography Foundation */
    --font-size-xs: clamp(0.7rem, 0.6rem + 0.5vw, 0.8rem);
    --font-size-sm: clamp(0.8rem, 0.7rem + 0.5vw, 0.9rem);
    --font-size-base: clamp(1rem, 0.9rem + 0.5vw, 1.1rem);
    --font-size-lg: clamp(1.2rem, 1.1rem + 1vw, 1.5rem);
    --font-size-xl: clamp(1.5rem, 1.2rem + 2vw, 2.5rem);
    --font-size-2xl: clamp(2.5rem, 2rem + 5vw, 6rem);
}

/* Material Symbols */
.material-symbols-outlined {
    font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
}

/* Base Styles */
body {
    font-family: 'Inter', sans-serif;
    @apply antialiased text-white bg-void;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6, .font-headline {
    font-family: 'Plus Jakarta Sans', sans-serif;
}

/* Premium Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: var(--bg-void);
}
::-webkit-scrollbar-thumb {
    background: rgba(201, 168, 76, 0.2);
    border-radius: 20px;
    border: 2px solid var(--bg-void);
}
::-webkit-scrollbar-thumb:hover {
    background: var(--primary);
}

/* Glass Effect */
.glass {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.glass-premium {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0.01) 100%);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

/* Gold Gradient */
.gold-gradient {
    background: linear-gradient(135deg, #C9A84C 0%, #8B6F2E 100%);
}

.gold-text {
    background: linear-gradient(to bottom, #E5C366, #C9A84C);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Animations */
@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.animate-float {
    animation: float 6s ease-in-out infinite;
}

/* Product Card Micro-Interactions */
.product-card-hover {
    @apply transition-all duration-700 cubic-bezier(0.23, 1, 0.32, 1);
}
.product-card-hover:hover {
    @apply -translate-y-3 shadow-[0_30px_60px_-15px_rgba(201,168,76,0.3)] border-primary/30;
}

/* Status Badges */
.status-badge {
    @apply px-3 py-1 rounded-full text-[10px] font-black uppercase tracking-widest;
}

.status-pending { @apply bg-zinc-800 text-zinc-400; }
.status-confirmed { @apply bg-primary/20 text-primary; }
.status-delivered { @apply bg-green-500/20 text-green-500; }
.status-cancelled { @apply bg-red-500/20 text-red-500; }

/* Spotlight Reveal */
.spotlight-reveal {
    mask-image: radial-gradient(circle 200px at var(--x, 50%) var(--y, 50%), black 0%, transparent 100%);
}

/* ============================================================
   MOBILE OVERRIDES (Automatic Detection)
   ============================================================ */

/* Global Mobile Fixes */
body.is-mobile {
    font-size: var(--font-size-base);
}

body.is-mobile .parallax-title {
    font-size: 20vw !important; /* Scale up for small screens to maintain impact */
}

body.is-mobile .glass-card {
    border-radius: 1.5rem;
    padding: 1.5rem !important;
}

/* Responsive Navigation Bar */
body.is-mobile nav {
    top: 0 !important;
    left: 0 !important;
    transform: none !important;
    width: 100% !important;
    max-width: none !important;
}

body.is-mobile nav .nav-links-desktop {
    display: none !important;
}

/* Fluid Containers */
.container-fluid {
    width: 100%;
    max-width: 1400px;
    margin-left: auto;
    margin-right: auto;
    padding-left: clamp(1rem, 5vw, 5rem);
    padding-right: clamp(1rem, 5vw, 5rem);
}

/* Responsive Utilities */
@media (max-width: 768px) {
    .hide-on-mobile { display: none !important; }
    .show-on-mobile { display: block !important; }
}

/* Bottom Navigation */
#bottomNav.is-visible {
    transform: translateY(0);
}

body.is-mobile #bottomNav {
    display: flex !important;
}

body.is-mobile #navbar {
    top: 0 !important;
    padding-top: 1rem;
}

/* Premium Toast Overrides for Mobile */
body.is-mobile #toastContainer {
    bottom: 100px; /* Above bottom nav */
    right: 20px;
    left: 20px;
}

/* ============================================================
   QUICK WINS: MOBILE OPTIMIZATION (Product Grids, Headers, Touch)
   ============================================================ */

/* Touch-friendly minimum hit targets (form controls + links only — not icons) */
body.is-mobile button,
body.is-mobile a,
body.is-mobile input,
body.is-mobile select,
body.is-mobile textarea {
    min-height: 44px;
}

/* ── Page Headers ── */
body.is-mobile header {
    padding-top: 5rem !important;
    padding-bottom: 1.5rem !important;
    padding-left: 1rem !important;
    padding-right: 1rem !important;
}

body.is-mobile header h1 {
    font-size: 2.25rem !important;
    line-height: 1.1 !important;
}

body.is-mobile header p {
    font-size: 0.85rem !important;
}

/* ── Product Cards (Smaller for mobile) ── */
body.is-mobile #productsGrid {
    gap: 0.75rem !important;
}

body.is-mobile #productsGrid > .glass-card {
    min-height: 300px !important;
    border-radius: 1rem !important;
    padding: 1rem !important;
}

body.is-mobile #accessoriesGrid {
    gap: 0.75rem !important;
}

body.is-mobile #accessoriesGrid > .glass-card {
    min-height: 240px !important;
    border-radius: 1rem !important;
    padding: 0.75rem !important;
}

/* ── Section spacing ── */
body.is-mobile section {
    padding-top: 3rem !important;
    padding-bottom: 3rem !important;
}

body.is-mobile section .max-w-7xl {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
}

/* ── Index page: Featured grid ── */
body.is-mobile #featured-grid {
    gap: 1rem !important;
}

body.is-mobile #featured-grid > div {
    min-height: 240px !important;
}

/* ── Headline sizes ── */
body.is-mobile h2.font-headline {
    font-size: 1.75rem !important;
}

body.is-mobile h3.font-headline {
    font-size: 1.25rem !important;
}

/* ── Bento grid items ── */
body.is-mobile #ecosystem .glass-card,
body.is-mobile #ecosystem .bg-primary,
body.is-mobile #ecosystem .bg-zinc-900 {
    padding: 1.5rem !important;
    min-height: 200px !important;
}

/* ── Owner showcase ── */
body.is-mobile #owner-showcase .glass-card {
    min-height: auto !important;
}

body.is-mobile #owner-showcase .owner-container {
    min-height: 300px !important;
}

/* ── Repairs page ── */
body.is-mobile #repairs-grid {
    grid-template-columns: 1fr !important;
}

body.is-mobile #repairForm input,
body.is-mobile #repairForm select,
body.is-mobile #repairForm textarea {
    padding: 1rem 1.5rem !important;
    font-size: 0.9rem !important;
}

/* ── Gallery ── */
body.is-mobile .gallery-item {
    border-radius: 1.25rem !important;
}

body.is-mobile #galleryGrid {
    gap: 0.75rem !important;
}

/* ── CTA section ── */
body.is-mobile section .bg-gradient-to-tr.from-primary {
    padding: 2rem !important;
    border-radius: 2rem !important;
}

body.is-mobile section .bg-gradient-to-tr.from-primary h2 {
    font-size: 2.5rem !important;
}

/* ── Footer ── */
body.is-mobile footer {
    padding-top: 3rem !important;
    padding-bottom: 2rem !important;
}

body.is-mobile footer .grid-cols-4 {
    gap: 2rem !important;
}

body.is-mobile footer .col-span-1 {
    grid-column: span 4 !important;
}

/* ── Navbar padding on mobile ── */
body.is-mobile #navbar > div {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
    border-radius: 1.5rem !important;
}

/* ── Bottom nav on mobile ── */
body.is-mobile #bottomNav {
    display: flex !important;
    transform: translateY(0) !important;
}

/* ── Modal adjustments ── */
body.is-mobile #detailModal .glass-card {
    border-radius: 2rem !important;
}

body.is-mobile #cartSidebar {
    width: 100% !important;
}

/* ── Cart badge ── */
body.is-mobile #cartCount {
    width: 1.25rem !important;
    height: 1.25rem !important;
    font-size: 0.6rem !important;
}

/* ── Trending section ── */
body.is-mobile #trending-grid .trending-card {
    width: 200px !important;
}

/* ── Accessories tabs scrolling ── */
body.is-mobile .acc-tab {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
    padding-top: 0.6rem !important;
    padding-bottom: 0.6rem !important;
    font-size: 0.6rem !important;
}

/* ── Voice bot ── */
body.is-mobile #voice-bot-panel {
    right: 10px !important;
    width: calc(100vw - 20px) !important;
    max-width: 340px !important;
}

body.is-mobile #voice-bot-fab {
    bottom: 80px !important;
    right: 16px !important;
    width: 52px !important;
    height: 52px !important;
}

/* ── Checkout modal on mobile ── */
body.is-mobile #checkoutForm input,
body.is-mobile #checkoutForm button {
    font-size: 0.9rem !important;
}

body.is-mobile #checkoutForm > div {
    margin-bottom: 0.75rem !important;
}

/* ── Auth modal ── */
body.is-mobile #loginModal .glass-card {
    padding: 1.5rem !important;
    border-radius: 2rem !important;
}

/* ── Invoice modal ── */
body.is-mobile #invoiceContent {
    padding: 1.5rem !important;
}

/* ── Repair page main card ── */
body.is-mobile .glass-card.p-12 {
    padding: 1.5rem !important;
    border-radius: 2rem !important;
}

/* ── About page ── */
body.is-mobile .about-header {
    padding-top: 6rem !important;
}

body.is-mobile main.px-8 {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
}

/* ── Extra small: Ensure content never overflows ── */
@media (max-width: 400px) {
    body.is-mobile #productsGrid {
        grid-template-columns: 1fr !important;
    }
    body.is-mobile .flex-wrap.gap-4 {
        gap: 0.5rem !important;
    }
}

/* Smooth Image Loading */
img {
    transition: opacity 0.5s ease-in-out;
}
img.lazy-load {
    opacity: 0;
}
img.loaded {
    opacity: 1;
}

/* Hide scrollbar for carousels */
.scrollbar-hide::-webkit-scrollbar {
    display: none;
}
.scrollbar-hide {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

/* Custom premium image enhancements for high-fidelity clarity */
.premium-product-img {
    image-rendering: auto;
    filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.12)) contrast(1.01) saturate(1.02);
    mix-blend-mode: normal;
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1), filter 0.6s ease-in-out, opacity 0.4s ease-in-out;
    transform-style: preserve-3d;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}
.premium-product-img:hover {
    filter: drop-shadow(0 20px 30px rgba(0, 0, 0, 0.20)) contrast(1.03) saturate(1.04);
}
