/* ==========================================================================
   Girrgitt Filaments - Premium E-Commerce Design System
   Human-Crafted, Modern Industrial Engineering Aesthetic
   Brand: Burgundy Red (#A20303) | Slate Navy (#0F172A) | Pearl Surface (#F8FAFC)
   ========================================================================== */

:root {
    --brand-primary: #A20303;
    --brand-hover: #830202;
    --brand-dark: #620101;
    --brand-light: #fef2f2;
    --brand-subtle: #fee2e2;
    --brand-border: #fecdd3;
    
    --slate-900: #0f172a;
    --slate-800: #1e293b;
    --slate-700: #334155;
    --slate-600: #475569;
    --slate-500: #64748b;
    --slate-400: #94a3b8;
    --slate-200: #e2e8f0;
    --slate-100: #f1f5f9;
    --slate-50:  #f8fafc;
    
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.04);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.04);
    
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-full: 9999px;
}

body:not(.admin-body) {
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    color: var(--slate-800);
    background-color: #ffffff;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    letter-spacing: -0.01em;
    -webkit-font-smoothing: antialiased;
}

body.admin-body {
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: #f1f5f9 !important;
    min-height: 100vh;
    display: flex !important;
    flex-direction: row !important;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

.admin-body .sidebar {
    width: 260px;
    min-height: 100vh;
    background-color: #0f172a;
    flex-shrink: 0;
    display: flex !important;
    flex-direction: column !important;
    z-index: 100;
}

.admin-body .main-wrapper {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    min-width: 0;
    width: calc(100% - 260px);
    background-color: #f1f5f9;
}

.admin-page-content {
    padding: 1.75rem 2rem;
    flex: 1 1 auto;
    width: 100%;
    max-width: 100%;
}

main {
    flex: 1;
}

/* ==========================================================================
   Typography & Utilities
   ========================================================================== */
h1, h2, h3, h4, h5, h6 {
    color: var(--slate-900);
    font-weight: 700;
    letter-spacing: -0.025em;
}

.text-brand { color: var(--brand-primary) !important; }
.bg-brand { background-color: var(--brand-primary) !important; }
.bg-surface { background-color: var(--slate-50) !important; }

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn {
    font-weight: 600;
    padding: 0.55rem 1.25rem;
    border-radius: var(--radius-full);
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    font-size: 0.9rem;
}

.btn-brand {
    background-color: var(--brand-primary);
    color: #ffffff;
    border: 1px solid var(--brand-primary);
    box-shadow: 0 2px 4px rgba(162, 3, 3, 0.15);
}

.btn-brand:hover, .btn-brand:focus {
    background-color: var(--brand-hover);
    color: #ffffff;
    border-color: var(--brand-hover);
    box-shadow: 0 6px 16px rgba(162, 3, 3, 0.25);
    transform: translateY(-1px);
}

.btn-outline-brand {
    color: var(--brand-primary);
    border: 1.5px solid var(--brand-primary);
    background: transparent;
}

.btn-outline-brand:hover {
    background-color: var(--brand-primary);
    color: #ffffff;
    border-color: var(--brand-primary);
    transform: translateY(-1px);
}

.btn-dark {
    background-color: var(--slate-900);
    border-color: var(--slate-900);
}

.btn-dark:hover {
    background-color: var(--slate-800);
    border-color: var(--slate-800);
}

/* ==========================================================================
   Header & Navigation
   ========================================================================== */
.top-announcement-bar {
    background: linear-gradient(90deg, #0f172a 0%, #1e1b4b 50%, #0f172a 100%);
    color: #ffffff;
    font-size: 0.82rem;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.site-navbar {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--slate-200);
    transition: all 0.2s ease;
}

.navbar-brand img {
    height: 44px;
    width: auto;
    object-fit: contain;
}

.nav-link {
    font-weight: 500;
    color: var(--slate-700) !important;
    font-size: 0.92rem;
    padding: 0.5rem 0.85rem !important;
    border-radius: var(--radius-sm);
    transition: color 0.15s ease, background 0.15s ease;
}

.nav-link:hover, .nav-link.active {
    color: var(--brand-primary) !important;
    background-color: var(--brand-light);
}

.pulse-dot {
    display: inline-block;
    width: 7px;
    height: 7px;
    background-color: #ef4444;
    border-radius: 50%;
    margin-right: 5px;
    animation: pulse 1.8s infinite;
}

@keyframes pulse {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7); }
    70% { transform: scale(1.1); box-shadow: 0 0 0 6px rgba(239, 68, 68, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

/* Mega dropdown */
.dropdown-menu {
    border-radius: var(--radius-md);
    border: 1px solid var(--slate-200);
    box-shadow: var(--shadow-lg);
    padding: 0.5rem;
}

.dropdown-item {
    font-size: 0.88rem;
    padding: 0.5rem 0.85rem;
    border-radius: var(--radius-sm);
    font-weight: 500;
}

.dropdown-item:hover {
    background-color: var(--brand-light);
    color: var(--brand-primary);
}

/* ==========================================================================
   Hero & Feature Cards
   ========================================================================== */
.hero-stage {
    background: radial-gradient(circle at 80% 20%, rgba(162, 3, 3, 0.08) 0%, rgba(255, 255, 255, 0) 50%),
                linear-gradient(180deg, #ffffff 0%, var(--slate-50) 100%);
    border-bottom: 1px solid var(--slate-200);
}

.spec-chip {
    display: inline-flex;
    align-items: center;
    padding: 0.35rem 0.75rem;
    background: rgba(15, 23, 42, 0.04);
    border: 1px solid var(--slate-200);
    border-radius: var(--radius-full);
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--slate-700);
}

/* ==========================================================================
   Filament Product Card
   ========================================================================== */
.card-filament {
    background: #ffffff;
    border: 1px solid var(--slate-200);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.25s ease;
    display: flex;
    flex-direction: column;
}

.card-filament:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-xl);
    border-color: var(--brand-border);
}

.filament-img-container {
    background: radial-gradient(circle at center, #ffffff 30%, #f1f5f9 100%);
    height: 230px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 18px;
    overflow: hidden;
}

.filament-img-container img {
    max-height: 100%;
    max-width: 100%;
    object-fit: contain;
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    filter: drop-shadow(0 8px 12px rgba(0, 0, 0, 0.12));
}

.card-filament:hover .filament-img-container img {
    transform: scale(1.08) rotate(2deg);
}

/* Color Swatches on Cards */
.swatch-tray {
    display: flex;
    gap: 4px;
    align-items: center;
}

.swatch-bullet {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    display: inline-block;
    border: 1px solid rgba(0,0,0,0.15);
}

.badge-material {
    background-color: var(--slate-100);
    color: var(--slate-700);
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.25rem 0.6rem;
    border-radius: var(--radius-full);
}

/* ==========================================================================
   Product Detail Specs Table & Swatches
   ========================================================================== */
.color-swatch-dot {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    display: inline-block;
    border: 2px solid #ffffff;
    box-shadow: 0 0 0 1px var(--slate-300, #cbd5e1);
    cursor: pointer;
    margin-right: 8px;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.color-swatch-dot:hover, .color-swatch-dot.active {
    transform: scale(1.2);
    box-shadow: 0 0 0 2px var(--brand-primary);
}

.table-specs th {
    background-color: var(--slate-50);
    color: var(--slate-600);
    font-weight: 600;
    font-size: 0.85rem;
    width: 40%;
}

.table-specs td {
    font-size: 0.85rem;
    color: var(--slate-800);
}

/* ==========================================================================
   B2B Bulk Enquiry Table
   ========================================================================== */
.bulk-table-container {
    background: #ffffff;
    border-radius: var(--radius-lg);
    border: 1px solid var(--slate-200);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.bulk-item-row {
    transition: background-color 0.15s ease;
}

.bulk-item-row:hover {
    background-color: var(--slate-50);
}

.bulk-item-row.selected {
    background-color: var(--brand-light);
}

/* ==========================================================================
   Footer
   ========================================================================== */
footer {
    background-color: var(--slate-900);
    color: var(--slate-400);
    font-size: 0.88rem;
    border-top: 1px solid var(--slate-800);
}

footer a {
    color: var(--slate-300);
    text-decoration: none;
    transition: color 0.15s ease;
}

footer a:hover {
    color: #ffffff;
}

/* ==========================================================================
   Admin Portal Styling
   ========================================================================== */
.admin-sidebar {
    background-color: #0b1120;
    min-height: 100vh;
    color: #94a3b8;
}

.kpi-card {
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--slate-200);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.kpi-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* ==========================================================================
   Offcanvas Cart Drawer Styling
   ========================================================================== */
#cartOffcanvas {
    border-left: 1px solid rgba(0, 0, 0, 0.08);
}

.cart-drawer-item {
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
    border: 1px solid #e2e8f0 !important;
}

.cart-drawer-item:hover {
    border-color: #cbd5e1 !important;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.cart-drawer-qty-btn {
    width: 26px;
    height: 26px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-color: #e2e8f0 !important;
    font-weight: 700;
    transition: background 0.15s ease;
}

.cart-drawer-qty-btn:hover {
    background-color: var(--brand-primary) !important;
    color: #ffffff !important;
    border-color: var(--brand-primary) !important;
}

.cart-drawer-remove-btn {
    border: none;
    background: transparent;
    transition: opacity 0.15s ease, transform 0.15s ease;
}

.cart-drawer-remove-btn:hover {
    transform: scale(1.15);
}

#drawerCartBody::-webkit-scrollbar {
    width: 6px;
}

#drawerCartBody::-webkit-scrollbar-track {
    background: #f8fafc;
}

#drawerCartBody::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

#drawerCartBody::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}
