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

:root {
    --brand-primary: #7F3FBF;
    /* 3DCIM Purple */
    --brand-secondary: #00AEEF;
    /* 3DCIM Cyan */
    --brand-dark: #000000;
    --brand-bg: #ffffff;
    --brand-light-bg: #f8f9fa;
    --brand-text: #333333;
    --brand-muted: #666666;
    --brand-border: #eeeeee;

    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 20px;
    --brand-primary-rgb: 127, 63, 191;
    --shadow-sm: 0 2px 5px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 15px rgba(0, 0, 0, 0.08);
}

/* --- RESPONSIVE MOBILE MENU --- */
.mobile-nav-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(12px);
    z-index: 10000;
    display: none; /* ALWAYS HIDDEN BY DEFAULT */
    flex-direction: column;
    padding: 6rem 2rem;
    align-items: center;
}

.mobile-nav-overlay.active { 
    display: flex !important; 
}

.mobile-nav-links { 
    list-style: none; 
    display: flex; 
    flex-direction: column; 
    gap: 2.5rem; 
    text-align: center; 
}

.mobile-nav-link { 
    color: #fff; 
    font-size: 1.75rem; 
    font-weight: 900; 
    text-decoration: none; 
    text-transform: uppercase; 
    letter-spacing: 2px;
}

.mobile-menu-btn { 
    display: none; /* HIDDEN ON DESKTOP */
    background: #f1f5f9; 
    border: none; 
    width: 44px; 
    height: 44px; 
    border-radius: 12px; 
    cursor: pointer; 
    color: #1e293b;
    align-items: center;
    justify-content: center;
}

@media (max-width: 1024px) {
    .mobile-menu-btn { display: flex; } /* ONLY SHOW ON MOBILE/TABLET */
}

/* --- UTILITY CLASSES --- */
.desktop-only { display: block; }
.mobile-only { display: none; }

@media (max-width: 991px) {
    .desktop-only { display: none !important; }
    .mobile-only { display: block !important; }
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: #f8fafc;
    background-image: radial-gradient(rgba(15, 23, 42, 0.05) 0.5px, transparent 0.5px);
    background-size: 24px 24px;
    color: var(--brand-text);
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    overflow-x: hidden;
}

.container {
    width: 100%;
    padding: 0 1.5rem;
    margin: 0 auto;
    max-width: 1300px;
}

@media (max-width: 768px) {
    .container { padding: 0 1.25rem; }
    body { font-size: 15px; }
    h1 { font-size: 1.75rem !important; }
    h2 { font-size: 1.5rem !important; }
}

/* --- RESPONSIVE SPACING UTILS --- */
.section-padding { padding: 2.5rem 0; }
.section-margin { margin-top: 2.5rem; }

@media (max-width: 768px) {
    .section-padding { padding: 1.5rem 0; }
    .section-margin { margin-top: 1.5rem; }
}

/* --- UNIVERSAL COMPONENT SYSTEM --- */

/* Buttons */
.btn,
.btn-v8,
.admin-btn,
.p-add-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.8rem 1.5rem;
    border-radius: 12px;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: none;
    font-size: 0.9rem;
    font-family: inherit;
    justify-content: center;
}

.btn:active { transform: scale(0.95); }

.btn-primary,
.btn-p,
.admin-btn,
.p-add-btn {
    background: var(--brand-primary);
    color: white !important;
    box-shadow: 0 10px 20px rgba(127, 63, 191, 0.15);
}

.btn-primary:hover,
.btn-p:hover,
.admin-btn:hover,
.p-add-btn:hover {
    background: #6d28d9;
    transform: translateY(-2px);
    box-shadow: 0 15px 30px rgba(127, 63, 191, 0.25);
}

.btn-secondary,
.btn-s {
    background: #f8fafc;
    color: var(--brand-dark) !important;
    border: 1px solid #e2e8f0;
}

.btn-secondary:hover,
.btn-s:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
}

/* Cards */
.card,
.card-v8,
.admin-card,
.admin-card-box,
.bento-card {
    background: #fff;
    border: 1px solid #f1f5f9;
    padding: 2rem;
    border-radius: 24px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.02);
}

/* Forms */
.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--brand-muted);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: 0.85rem 1rem;
    border: 1px solid var(--brand-border);
    border-radius: 8px;
    font-family: inherit;
    font-size: 0.95rem;
    transition: border-color 0.2s;
    background: #fff;
}

.form-input:focus {
    border-color: var(--brand-primary);
    outline: none;
}

/* --- 3DCIM HEADER SYSTEM --- */
.top-announcement {
    background: linear-gradient(90deg, #0f172a 0%, #1e293b 100%);
    color: rgba(255, 255, 255, 0.9);
    padding: 10px 0;
    font-size: 0.7rem;
    font-weight: 800;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 2px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

/* --- PREMIUM V8 HEADER REFINEMENT --- */
.sticky-header {
    position: sticky;
    top: 0;
    z-index: 1100;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.03);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.header-row-v8 {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.6rem 0;
    gap: 1.5rem;
    position: relative;
}

.logo-3dcim {
    font-size: 1.75rem;
    font-weight: 1000;
    letter-spacing: -1.8px;
    text-decoration: none;
    color: #0f172a;
    transition: transform 0.3s;
}

.logo-3dcim span {
    color: var(--brand-primary);
}

.logo-3dcim:hover {
    transform: scale(1.02);
}

.search-form-v8 {
    display: flex;
    align-items: center;
    background: #fff;
    border-radius: 20px;
    padding: 6px;
    border: 1px solid #e2e8f0;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.02);
}

.search-form-v8:focus-within {
    border-color: var(--brand-primary);
    background: #fff;
    box-shadow: 0 15px 35px rgba(var(--brand-primary-rgb), 0.15);
    transform: translateY(-2px);
}

.search-form-v8 input {
    flex: 1;
    border: none;
    background: transparent;
    padding: 0.7rem 1.4rem;
    font-size: 0.9rem;
    font-weight: 600;
    color: #1e293b;
    outline: none;
}

.search-form-v8 button {
    background: var(--brand-primary);
    color: #fff;
    border: none;
    width: 42px;
    height: 42px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.action-btn-v8 {
    text-decoration: none;
    color: #1e293b;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.6rem 1rem;
    border-radius: 12px;
    font-weight: 800;
    font-size: 0.8rem;
    transition: all 0.2s;
}

.action-btn-v8:hover {
    background: #f1f5f9;
    color: var(--brand-primary);
}

.cart-btn-v8 {
    background: transparent !important;
    color: #1e293b !important;
    width: 44px !important;
    height: 44px !important;
    padding: 0 !important;
    border-radius: 50% !important;
    justify-content: center !important;
    align-items: center !important;
    display: inline-flex !important;
    box-shadow: none !important;
    transition: all 0.2s ease !important;
}

.cart-btn-v8:hover {
    background: #f1f5f9 !important;
    color: var(--brand-primary) !important;
    box-shadow: none !important;
    transform: none !important;
}

.cart-badge-v8 {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #ef4444;
    color: #fff;
    font-size: 0.65rem;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    align-items: center;
    justify-content: center;
    font-weight: 950;
    border: 2px solid #fff;
}

.suggestion-box {
    display: none;
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    right: 0;
    background: rgba(255,255,255,0.98);
    backdrop-filter: blur(10px);
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    z-index: 1000;
    padding: 0.5rem;
}

/* --- MOBILE HEADER PREMIUM REFINEMENT --- */
@media (max-width: 991px) {
    .header-row-v8 {
        padding: 0.4rem 0;
        gap: 0.5rem;
        height: 60px;
    }

    .logo-3dcim {
        position: absolute;
        left: 50%;
        transform: translateX(-50%);
        font-size: 1.35rem !important;
        letter-spacing: -1.2px;
    }

    .mobile-menu-btn {
        background: rgba(15, 23, 42, 0.04) !important;
        width: 42px !important;
        height: 42px !important;
        border-radius: 14px !important;
        display: flex !important;
        align-items: center;
        justify-content: center;
        color: #0f172a !important;
        border: none !important;
    }

    .action-btn-v8 {
        padding: 0.4rem;
        background: rgba(15, 23, 42, 0.04);
        border-radius: 14px;
        width: 42px;
        height: 42px;
        justify-content: center;
    }

    .cart-btn-v8 {
        background: rgba(15, 23, 42, 0.04) !important;
        color: #1e293b !important;
        border-radius: 14px !important;
        width: 42px !important;
        height: 42px !important;
        box-shadow: none !important;
    }

    .search-mobile-row {
        padding: 0.25rem 0 0.75rem;
    }

    .search-form-v8 {
        border-radius: 16px;
    }
}

.action-btn {
    text-decoration: none;
    font-weight: 800;
    font-size: 0.75rem;
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.7rem 1.25rem;
    border-radius: 10px;
    transition: all 0.2s;
    line-height: 1;
}

.btn-login {
    color: var(--brand-primary);
    border: 2px solid var(--brand-primary);
}

.btn-cart {
    background: var(--brand-primary);
    color: #fff !important;
}

.nav-bar {
    background: #fff;
    border-bottom: 1px solid var(--brand-border);
    padding: 1rem 0;
}

.nav-links {
    display: flex;
    gap: 2.5rem;
    list-style: none;
    justify-content: center;
    /* CENTERED */
    flex: 1;
}

.nav-link {
    text-decoration: none;
    color: #333;
    font-weight: 700;
    font-size: 0.9rem;
    text-transform: uppercase;
}

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

@media (max-width: 1024px) {
    .nav-bar { display: none; } /* Hide desktop nav bar on mobile */
}

.logo-3dcim {
    font-size: 1.8rem;
    font-weight: 900;
    color: var(--brand-dark);
    text-decoration: none;
    letter-spacing: -1.5px;
}

.logo-3dcim span {
    color: var(--brand-primary);
}

/* --- HERO & GRIDS --- */
.hero-v8 {
    padding: 3rem 0;
    text-align: center;
}

@media (max-width: 768px) {
    .hero-v8 { padding: 2rem 0; }
}

.hero-title {
    font-size: 3rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 1.25rem;
    letter-spacing: -2px;
    color: var(--brand-dark);
}

@media (max-width: 768px) {
    .hero-title { font-size: 2rem; }
}

.hero-subtitle {
    color: var(--brand-muted);
    font-size: 1rem;
    max-width: 700px;
    margin: 0 auto 2rem;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
    gap: 1.25rem;
    margin-top: 1.5rem;
}

@media (max-width: 768px) {
    .product-grid { grid-template-columns: repeat(2, 1fr); gap: 0.75rem; }
}

.card-v8 {
    border-radius: var(--radius-xl);
    overflow: hidden;
    background: #fff;
    border: 1px solid var(--brand-border);
    padding: 1rem;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
}

.card-v8:hover {
    border-color: var(--brand-primary);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.06);
    transform: translateY(-5px);
}

.profile-wrapper-v8 {
    background: #f8fafc;
    padding: 4rem 0;
    min-height: 80vh;
    overflow-x: hidden; /* PROTECT AGAINST HORIZONTAL SCROLL */
}

.img-box {
    background: #fff;
    aspect-ratio: 1;
    height: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    margin-bottom: 1rem;
    overflow: hidden;
    position: relative;
    border: 1px solid #f1f5f9;
}

/* Product Detail Responsive */
.product-detail-grid {
    display: grid;
    grid-template-columns: 1fr 1.1fr;
    gap: 4rem;
    align-items: start;
}

@media (max-width: 992px) {
    .product-detail-grid { grid-template-columns: 1fr; gap: 2.5rem; }
    .product-detail-grid > div:first-child { margin-bottom: 0; }
}

@media (max-width: 768px) {
    .product-detail-grid { gap: 1.5rem; }
}

.variant-card {
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.variant-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

.variant-card.active {
    border-color: var(--brand-primary) !important;
    border-width: 2px !important;
    box-shadow: 0 8px 20px rgba(127, 63, 191, 0.15);
}

@media (max-width: 768px) {
    .desc-grid-v8 { 
        grid-template-columns: 1fr !important; 
        gap: 2rem !important; 
        padding: 1.5rem !important;
    }
    .desc-grid-v8 img {
        max-width: 150px !important;
        margin: 0 auto;
    }
}

.img-box img {
    max-width: 85%;
    max-height: 85%;
    object-fit: contain;
    transition: all 0.5s ease;
    position: absolute;
}

.img-box .img-main {
    opacity: 1;
    z-index: 1;
}

.img-box .img-hover {
    opacity: 0;
    z-index: 0;
    transform: scale(1.1);
}

.card-v8:hover .img-main {
    opacity: 0;
    transform: scale(0.9);
}

.card-v8:hover .img-hover {
    opacity: 1;
    z-index: 2;
    transform: scale(1);
}

.p-name {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--brand-secondary);
    margin-bottom: 1.5rem;
    text-decoration: none;
    display: block;
    letter-spacing: -0.5px;
}

/* --- ADMIN DASHBOARD --- */
.admin-page {
    display: flex;
    min-height: 100vh;
    background: #fff;
}

.admin-side {
    width: 280px;
    border-right: 1px solid var(--brand-border);
    padding: 2.5rem;
    position: sticky;
    top: 0;
    height: 100vh;
}

.admin-content {
    flex: 1;
    padding: 4rem;
}

.side-title {
    font-weight: 800;
    font-size: 1.25rem;
    margin-bottom: 3rem;
    color: var(--brand-secondary);
    letter-spacing: -1px;
}

.side-menu {
    list-style: none;
}

.side-link {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.85rem 1.25rem;
    border-radius: 12px;
    color: var(--brand-muted);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    margin-bottom: 0.5rem;
}

.side-link:hover,
.side-link.active {
    background: #f8fafc;
    color: var(--brand-primary);
}

.side-link.active {
    color: var(--brand-primary);
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4rem;
}

.admin-h1 {
    font-size: 2.25rem;
    font-weight: 800;
    letter-spacing: -1.5px;
    color: var(--brand-secondary);
}

.admin-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.admin-stat-card {
    background: #fff;
    border: 1px solid var(--brand-border);
    padding: 1.75rem;
    border-radius: 12px;
}

.admin-stat-label {
    font-size: 0.7rem;
    font-weight: 800;
    color: var(--brand-muted);
    text-transform: uppercase;
    margin-bottom: 0.75rem;
}

.admin-stat-val {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--brand-secondary);
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 2rem;
    border: 1px solid var(--brand-border);
    border-radius: 8px;
    overflow: hidden;
}

.admin-table th {
    text-align: left;
    padding: 1.25rem;
    background: #f8fafc;
    border-bottom: 1px solid var(--brand-border);
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    color: var(--brand-muted);
}

.admin-table td {
    padding: 1.25rem;
    border-bottom: 1px solid var(--brand-border);
    font-size: 0.95rem;
    color: var(--brand-text);
}

/* --- MISC --- */
.badge {
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
}

.badge-success {
    background: #eff6ff;
    color: var(--brand-primary);
}

.site-footer {
    padding: 3rem 0 2rem;
    border-top: 1px solid var(--brand-border);
    margin-top: 3rem;
    background: #fff;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1.2fr;
    gap: 3rem;
    margin-bottom: 3rem;
}

@media (max-width: 991px) {
    .footer-grid { grid-template-columns: 1fr; gap: 2.5rem; text-align: center; }
}

.footer-title {
    font-size: 0.9rem;
    font-weight: 800;
    color: var(--brand-secondary);
    margin-bottom: 2rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 1rem;
}

.footer-links a,
.footer-btn-link {
    background: none;
    border: none;
    padding: 0;
    margin: 0;
    font: inherit;
    color: var(--brand-muted);
    text-decoration: none;
    font-size: 0.95rem;
    transition: color 0.2s;
    cursor: pointer;
    display: inline;
    text-align: left;
}

.footer-links a:hover,
.footer-btn-link:hover {
    color: var(--brand-primary);
}

.footer-bottom {
    border-top: 1px solid var(--brand-border);
    padding-top: 3rem;
    text-align: center;
    color: var(--brand-muted);
    font-size: 0.85rem;
    font-weight: 500;
}

/* --- EXECUTIVE ADMIN SYSTEM (Professionalized) --- */
.admin-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    min-height: 100vh;
    background: #f1f5f9;
}

.admin-sidebar {
    background: #0f172a;
    color: #fff;
    padding: 2.5rem 1.5rem;
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 0;
    height: 100vh;
    box-shadow: 10px 0 30px rgba(0,0,0,0.05);
}

.admin-side-logo {
    font-size: 1.5rem;
    font-weight: 950;
    color: #fff;
    text-decoration: none;
    margin-bottom: 3.5rem;
    padding: 0 1rem;
    display: block;
    letter-spacing: -1px;
}

.admin-side-logo span {
    color: var(--brand-primary);
}

.admin-nav {
    list-style: none;
    flex-grow: 1;
}

.admin-nav-item {
    margin-bottom: 0.75rem;
}

.admin-nav-link {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.5rem;
    border-radius: 14px;
    color: #94a3b8;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.9rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.admin-nav-link:hover {
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
    transform: translateX(5px);
}

.admin-nav-link.active {
    background: linear-gradient(135deg, var(--brand-primary) 0%, #6d28d9 100%);
    color: #fff;
    box-shadow: 0 10px 25px rgba(127, 63, 191, 0.4);
}

.admin-main {
    padding: 3rem 4rem;
    overflow-y: auto;
}

.admin-top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4rem;
}

.admin-title {
    font-size: 2.25rem;
    font-weight: 950;
    letter-spacing: -2px;
    color: #0f172a;
}

.admin-card-glass {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    border: 1px solid #e2e8f0;
    border-radius: 28px;
    padding: 3rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.05);
}

.admin-stat-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    margin-bottom: 4rem;
}

.admin-stat-box {
    background: #fff;
    border: 1px solid #e2e8f0;
    padding: 2rem;
    border-radius: 24px;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.02);
}

.admin-stat-box:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.05);
    border-color: var(--brand-primary);
}

.admin-stat-box .stat-label {
    font-size: 0.75rem;
    font-weight: 800;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 0.75rem;
    display: block;
}

.admin-stat-box .stat-val {
    font-size: 2rem;
    font-weight: 950;
    color: #0f172a;
}

.admin-stat-box i {
    position: absolute;
    right: -10px;
    bottom: -10px;
    opacity: 0.05;
    transform: scale(2);
    color: var(--brand-primary);
}

.admin-table-v8 {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 0.75rem;
}

.admin-table-v8 th {
    text-align: left;
    padding: 1rem 1.5rem;
    color: #94a3b8;
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.admin-table-v8 td {
    padding: 1.5rem;
    background: #fff;
    border-top: 1px solid #f1f5f9;
    border-bottom: 1px solid #f1f5f9;
    font-size: 0.95rem;
    font-weight: 600;
}

.admin-table-v8 td:first-child {
    border-left: 1px solid #f1f5f9;
    border-top-left-radius: 16px;
    border-bottom-left-radius: 16px;
}

.admin-table-v8 td:last-child {
    border-right: 1px solid #f1f5f9;
    border-top-right-radius: 16px;
    border-bottom-right-radius: 16px;
}

.status-badge {
    padding: 6px 14px;
    border-radius: 100px;
    font-size: 10px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-active { background: #f0fdf4; color: #16a34a; border: 1px solid #bbf7d0; }
.status-featured { background: #fff7ed; color: #ea580c; border: 1px solid #fed7aa; }

.admin-search-input {
    background: #fff;
    border: 1px solid #e2e8f0;
    padding: 0.8rem 1.5rem 0.8rem 3rem;
    border-radius: 14px;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.3s;
}

.admin-search-input:focus {
    border-color: var(--brand-primary);
    box-shadow: 0 0 0 4px rgba(127, 63, 191, 0.1);
    outline: none;
}

.admin-search-icon {
    position: absolute;
    left: 1.25rem;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
}

/* --- PRODUCT DETAIL PREMIUM ELEMENTS --- */
.btn-add-cart {
    background: linear-gradient(135deg, var(--brand-primary) 0%, #6d28d9 100%);
    color: #fff;
    border: none;
    border-radius: 16px;
    font-weight: 900;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    box-shadow: 0 10px 25px rgba(127, 63, 191, 0.3);
    position: relative;
    overflow: hidden;
}

.btn-add-cart:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 15px 35px rgba(127, 63, 191, 0.4);
}

.btn-add-cart:active {
    transform: translateY(1px);
}

.btn-add-cart::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: rgba(255,255,255,0.1);
    transform: rotate(45deg) translateY(-100%);
    transition: all 0.6s;
}

.btn-add-cart:hover::after {
    transform: rotate(45deg) translateY(100%);
}

/* --- NAV BAR REFINEMENT --- */
.nav-bar {
    background: #fff;
    border-bottom: 1px solid #f1f5f9;
    padding: 0.5rem 0;
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 3rem;
    justify-content: center;
}

.nav-link {
    text-decoration: none;
    color: #1e293b;
    font-size: 0.85rem;
    font-weight: 850;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 0.5rem 0;
    position: relative;
}

.nav-link:hover {
    color: var(--brand-primary);
    transform: translateY(-1px);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--brand-primary);
    transition: width 0.3s ease;
    border-radius: 2px;
}

.nav-link:hover::after {
    width: 100%;
}

/* --- EXECUTIVE PRODUCT DETAIL SYSTEM --- */
.product-detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: start;
}

.product-gallery-v8 {
    position: sticky;
    top: 6rem;
}

.main-image-container {
    background: #fff;
    border: 1px solid #f1f5f9;
    border-radius: 32px;
    padding: 2rem;
    box-shadow: 0 10px 40px rgba(0,0,0,0.03);
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
}

.main-image-container img {
    max-width: 100%;
    height: auto;
    max-height: 480px; /* REFINED SIZE */
    object-fit: contain;
}

/* --- PROFILE V8 SYSTEM --- */
.profile-layout-v8 {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 2.5rem;
    align-items: start;
}

.profile-sidebar-v8 {
    background: #fff;
    border: 1px solid #f1f5f9;
    border-radius: 28px;
    padding: 2rem;
    box-shadow: 0 10px 30px rgba(0,0,0,0.02);
}

.profile-user-card {
    text-align: center;
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid #f8fafc;
}

.user-avatar {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--brand-primary) 0%, #a855f7 100%);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    font-size: 2rem;
    font-weight: 1000;
    box-shadow: 0 10px 20px rgba(var(--brand-primary-rgb), 0.2);
}

.profile-nav-v8 {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.profile-nav-v8 a {
    text-decoration: none;
    padding: 1rem 1.5rem;
    border-radius: 16px;
    color: #64748b;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: all 0.3s;
}

.profile-nav-v8 a.active {
    background: #f1f5f9;
    color: var(--brand-primary);
}

.profile-nav-v8 a:hover:not(.active) {
    background: #f8fafc;
    color: #1e293b;
    transform: translateX(5px);
}

.profile-main-v8 {
    background: #fff;
    padding: 2.5rem;
    border-radius: 28px;
    border: 1px solid #f1f5f9;
    box-shadow: 0 10px 30px rgba(0,0,0,0.02);
    min-height: 500px;
}

.wish-grid-v8 {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2.5rem;
}

.profile-info-grid-v8 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
}

.section-title-v8 {
    font-size: 1rem;
    font-weight: 850;
    color: #1e293b;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.form-group-v8 {
    margin-bottom: 1.5rem;
}

.form-label-v8 {
    display: block;
    font-size: 0.85rem;
    font-weight: 700;
    color: #64748b;
    margin-bottom: 0.5rem;
}

.form-input-v8 {
    width: 100%;
    padding: 0.8rem 1rem;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    font-size: 0.95rem;
    font-weight: 600;
    color: #1e293b;
    transition: all 0.3s;
}

.form-input-v8:focus {
    outline: none;
    border-color: var(--brand-primary);
    background: #fff;
    box-shadow: 0 0 0 4px rgba(var(--brand-primary-rgb), 0.1);
}

.form-help-v8 {
    display: block;
    color: #94a3b8;
    font-size: 0.75rem;
    margin-top: 0.4rem;
    font-weight: 500;
}

.wish-card-v8 {
    background: #fff;
    border: 1px solid #edf2f7;
    border-radius: 32px;
    overflow: hidden;
    transition: all 0.5s cubic-bezier(0.23, 1, 0.32, 1);
    position: relative;
    display: flex;
    flex-direction: column;
}

.wish-card-v8:hover {
    transform: translateY(-12px);
    box-shadow: 0 40px 80px -15px rgba(0, 0, 0, 0.1);
    border-color: #e2e8f0;
}

.wish-card-v8:hover img {
    transform: scale(1.1);
}

.wish-card-v8:hover .go-btn {
    background: var(--brand-primary);
    transform: translateX(5px);
}

.remove-wish-btn:hover {
    background: #ef4444 !important;
    color: #fff !important;
    transform: scale(1.1) rotate(15deg);
}

.remove-wish-btn:hover i {
    fill: #fff !important;
}

.orders-list-v8 {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* --- ORDER CARD V8 SYSTEM --- */
.order-card-v8 {
    background: #fff;
    border-radius: 24px;
    padding: 1.5rem;
    border: 1px solid #f1f5f9;
    box-shadow: 0 4px 15px rgba(0,0,0,0.02);
    margin-bottom: 1.5rem;
}

.order-header-v8 {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #f8fafc;
}

.order-id-group-v8 {
    display: flex;
    gap: 2rem;
}

.order-label-v8 {
    font-size: 0.7rem;
    color: #94a3b8;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.2rem;
}

.order-value-v8 {
    font-size: 0.95rem;
    font-weight: 900;
    color: #1e293b;
}

.order-status-v8 {
    font-size: 0.8rem;
    font-weight: 900;
    padding: 4px 12px;
    border-radius: 100px;
    text-transform: uppercase;
}

.order-status-v8.status-delivered { background: #f0fdf4; color: #10b981; }
.order-status-v8.status-pending { background: #fff7ed; color: #f27a1a; }

.order-total-v8 {
    font-size: 1.1rem;
    font-weight: 1000;
    color: var(--brand-primary);
}

.order-timeline-v8 {
    background: #f8fafc;
    padding: 1rem;
    border-radius: 16px;
}

.timeline-items-v8 {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.timeline-item-v8 {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.timeline-dot-v8 {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #e2e8f0;
    flex-shrink: 0;
}

.timeline-dot-v8.active { background: var(--brand-primary); }
.timeline-dot-v8.now { box-shadow: 0 0 0 4px rgba(242, 122, 26, 0.2); }

.timeline-label-v8 {
    font-size: 0.75rem;
    font-weight: 600;
    color: #cbd5e1;
}

.timeline-label-v8.active { color: #64748b; }
.timeline-label-v8.now { color: #1e293b; font-weight: 800; }

.order-content-v8 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

@media (max-width: 768px) {
    .order-header-v8 {
        flex-direction: column;
        align-items: flex-start;
        gap: 1.5rem;
    }
    
    .order-id-group-v8 {
        gap: 1.5rem;
    }

    .order-total-group-v8 {
        text-align: left;
    }

    .order-content-v8 {
        grid-template-columns: 1fr !important;
        gap: 1.5rem;
    }
}

/* --- AGGRESSIVE MOBILE OVERHAUL (V8 EXECUTIVE) --- */
@media (max-width: 991px) {
    /* Global Container Fixes */
    .container {
        padding: 0 0.75rem !important; /* Tighter padding for more space */
        width: 100% !important;
        max-width: 100% !important;
        overflow-x: hidden;
    }

    body {
        font-size: 14px !important;
        overflow-x: hidden;
        width: 100% !important;
    }

    /* Header & Navigation Fixes */
    .header-row-v8 {
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
        padding: 0.5rem 0 !important;
        gap: 0.5rem !important;
        overflow: visible !important; /* Allow suggestions to show */
    }

    .main-header, .sticky-header {
        overflow: visible !important;
    }

    .search-mobile-row {
        overflow: visible !important;
    }

    .logo-3dcim {
        font-size: 1.4rem !important;
    }

    .header-actions {
        gap: 0.4rem !important;
    }

    .nav-bar {
        display: none !important;
    }

    .action-btn-v8 {
        padding: 0.5rem !important;
        width: 40px !important;
        height: 40px !important;
    }
    
    .action-btn-v8 i {
        width: 20px !important;
        height: 20px !important;
    }

    /* Profile Page Aggressive Fixes */
    .profile-wrapper-v8 {
        padding: 1rem 0 !important;
    }

    .profile-layout-v8 {
        display: flex !important;
        flex-direction: column !important;
        gap: 1.25rem !important;
        width: 100% !important;
    }

    .profile-sidebar-v8, .profile-main-v8 {
        width: 100% !important;
        min-width: 0 !important;
        padding: 1.25rem !important;
        border-radius: 20px !important;
        margin: 0 !important;
    }

    .profile-nav-v8 {
        display: flex !important;
        flex-direction: row !important;
        overflow-x: auto !important;
        white-space: nowrap !important;
        gap: 0.5rem !important;
        padding: 1rem 0 !important;
        margin: 0 -0.5rem !important;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        border-bottom: 1px solid #f1f5f9;
    }

    .profile-nav-v8::-webkit-scrollbar { display: none; }

    .profile-nav-v8 a {
        padding: 0.6rem 0.8rem !important;
        font-size: 0.75rem !important;
        background: transparent !important;
        color: #64748b !important;
        border-radius: 0 !important;
        flex-shrink: 0;
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 0.4rem !important;
        border-bottom: 2px solid transparent;
        transition: all 0.2s;
    }

    .profile-nav-v8 a.active {
        color: var(--brand-primary) !important;
        border-bottom-color: var(--brand-primary);
    }

    .profile-nav-v8 a i {
        width: 18px !important;
        height: 18px !important;
        opacity: 0.8;
    }

    .profile-user-card {
        margin-bottom: 1.5rem !important;
        padding-bottom: 1.5rem !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        text-align: center !important;
    }

    /* Tab Content Grid Fixes */
    .wish-grid-v8, .profile-info-grid-v8, .order-content-v8 {
        grid-template-columns: 1fr !important;
        gap: 1.25rem !important;
    }

    .order-header-v8 {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 1rem !important;
    }

    .order-id-group-v8 {
        flex-direction: row !important;
        gap: 1rem !important;
        width: 100%;
        justify-content: space-between;
    }

    .review-card-v8 {
        flex-direction: column !important;
        gap: 1.25rem !important;
        align-items: flex-start !important;
    }

    .review-image-v8 {
        width: 60px !important;
        height: 60px !important;
    }

    .review-header-v8 {
        flex-direction: column !important;
        gap: 0.5rem !important;
        width: 100%;
    }

    /* Product Page Fixes */
    .product-detail-grid {
        grid-template-columns: 1fr !important;
        gap: 2rem !important;
    }

    .main-image-container img {
        max-height: 280px !important;
    }

    /* About Page Fixes */
    .mission-grid-v8 {
        grid-template-columns: 1fr !important;
    }

    .stats-grid-v8 {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 1.5rem !important;
    }

    .stats-grid-v8 div div:first-child { font-size: 2rem !important; }

    .cta-v8 { padding: 4rem 0 !important; }
    .cta-v8 > .container > div { padding: 2.5rem 1.5rem !important; border-radius: 24px !important; }

    .cta-btns-v8 {
        flex-direction: column !important;
        width: 100%;
    }

    .cta-btns-v8 a {
        width: 100% !important;
        text-align: center;
    }

    h1 { font-size: 2.2rem !important; }
    h2 { font-size: 1.8rem !important; }
}

.reviews-list-v8 {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.review-card-v8 {
    border: 1px solid #f1f5f9;
    border-radius: 20px;
    padding: 1.5rem;
    background: #fff;
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
}

.review-image-v8 {
    width: 80px;
    height: 80px;
    flex-shrink: 0;
    border: 1px solid #f1f5f9;
    border-radius: 12px;
    overflow: hidden;
    background: #fff;
}

.review-image-v8 img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.review-content-v8 {
    flex: 1;
}

.review-header-v8 {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.5rem;
}

.review-product-v8 {
    font-weight: 850;
    color: #1e293b;
    font-size: 1rem;
    margin-bottom: 0.25rem;
}

.review-stars-v8 {
    display: flex;
    color: #f59e0b;
}

.review-date-v8 {
    font-size: 0.75rem;
    color: #94a3b8;
    font-weight: 700;
}

.review-text-v8 {
    color: #64748b;
    font-size: 0.9rem;
    line-height: 1.6;
    font-weight: 500;
}

.review-link-v8 {
    display: inline-block;
    margin-top: 1rem;
    font-size: 0.8rem;
    font-weight: 800;
    color: var(--brand-primary);
    text-decoration: none;
    transition: all 0.2s;
}

.review-link-v8:hover {
    letter-spacing: 0.5px;
    opacity: 0.8;
}


/* --- ADMIN DASHBOARD V8 SYSTEM --- */
.admin-stat-grid-v8 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.admin-stat-box-v8 {
    background: #fff;
    border: 1px solid #f1f5f9;
    padding: 2rem;
    border-radius: 24px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.03);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.admin-stat-box-v8.total-revenue {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    color: #fff;
    border: none;
    box-shadow: 0 20px 40px -10px rgba(15, 23, 42, 0.2);
}

.admin-stat-box-v8.critical-stock {
    background: #fef2f2;
    border: 1px solid #fee2e2;
    box-shadow: 0 10px 30px rgba(239, 68, 68, 0.05);
}

.stat-label-v8 {
    color: #64748b;
    font-weight: 800;
    font-size: 0.75rem;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    margin-bottom: 0.5rem;
}

.total-revenue .stat-label-v8 { color: #94a3b8; }
.critical-stock .stat-label-v8 { color: #b91c1c; }

.stat-val-v8 {
    font-size: 1.85rem;
    color: #0f172a;
    font-weight: 1000;
    letter-spacing: -1px;
}

.total-revenue .stat-val-v8 { color: #fff; }
.critical-stock .stat-val-v8 { color: #ef4444; }

.stat-icon-v8 {
    width: 60px;
    height: 60px;
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.total-revenue .stat-icon-v8 { background: rgba(56, 189, 248, 0.15); color: #38bdf8; }
.stat-icon-v8.icon-blue { background: #eef2ff; color: #6366f1; }
.stat-icon-v8.icon-green { background: #ecfdf5; color: #10b981; }
.stat-icon-v8.icon-red { background: #fff; color: #ef4444; box-shadow: 0 4px 12px rgba(239, 68, 68, 0.1); }

.admin-main-grid-v8 {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.admin-card-v8 {
    padding: 2rem;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 24px;
    position: relative;
    overflow: hidden;
}

.admin-card-v8.dark-card {
    background: #0f172a;
    color: #fff;
}

.card-header-v8 {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.card-title-v8 { font-size: 1.1rem; font-weight: 900; color: #0f172a; margin: 0; }
.card-title-white-v8 { font-size: 1.25rem; font-weight: 900; margin: 0 0 0.5rem 0; color: #fff; }
.card-subtitle-v8 { font-size: 0.8rem; color: #64748b; margin-top: 4px; }
.card-desc-v8 { font-size: 0.8rem; color: #64748b; line-height: 1.6; margin-bottom: 2rem; }

.card-badge-v8 {
    background: #f8fafc;
    padding: 6px 12px;
    border-radius: 10px;
    font-size: 0.7rem;
    font-weight: 800;
    color: #64748b;
    border: 1px solid #e2e8f0;
}

.chart-container-v8 { height: 300px; }

.status-indicator-v8 {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 1.5rem;
}

.status-dot-v8 {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.status-dot-v8.status-warning { background: #f59e0b; box-shadow: 0 0 12px #f59e0b; }
.status-dot-v8.status-online { background: #22c55e; box-shadow: 0 0 12px #22c55e; }
.status-label-v8 { font-weight: 800; font-size: 0.65rem; letter-spacing: 1.5px; text-transform: uppercase; color: #94a3b8; }

.btn-maintenance-v8 {
    width: 100%;
    padding: 1rem;
    border: none;
    border-radius: 14px;
    font-weight: 900;
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    color: #fff;
}

.btn-maintenance-v8.btn-green { background: #22c55e; }
.btn-maintenance-v8.btn-orange { background: #f59e0b; }
.btn-maintenance-v8.btn-red { background: #ef4444; }
.card-bg-icon-v8 { position: absolute; bottom: -20px; right: -20px; opacity: 0.03; transform: rotate(-15deg); color: #fff; }

@media (max-width: 1200px) {
    .admin-stat-grid-v8 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 991px) {
    .admin-main-grid-v8 { grid-template-columns: 1fr; }
}

@media (max-width: 576px) {
    .admin-stat-grid-v8 { grid-template-columns: 1fr; }
}



/* --- SEARCH SUGGESTIONS V8 --- */
.suggestion-box {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    margin-top: 10px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    z-index: 9999;
    max-height: 400px;
    overflow-y: auto;
    display: none;
    animation: slideDown 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.search-mobile-row {
    margin-top: 1rem;
    position: relative;
    z-index: 100;
}

#searchSuggestionsMobile {
    border-radius: 20px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}


/* FORCED VISIBILITY FIX FOR MOBILE SUGGESTIONS */
@media (max-width: 991px) {
    .suggestion-box {
        width: 100% !important;
        position: absolute !important;
        top: 100% !important;
        left: 0 !important;
        background: #fff !important;
        box-shadow: 0 15px 35px rgba(0,0,0,0.2) !important;
        z-index: 99999 !important;
        visibility: visible !important;
        opacity: 1 !important;
    }
}


/* ULTRA FIXED POSITIONING FOR MOBILE SEARCH RESULTS */
@media (max-width: 991px) {
    #searchSuggestionsMobile {
        position: fixed !important;
        top: 140px !important; /* Adjusted for sticky header height */
        left: 10px !important;
        right: 10px !important;
        width: calc(100% - 20px) !important;
        max-height: 60vh !important;
        background: #ffffff !important;
        border: 1px solid #7F3FBF !important;
        border-radius: 16px !important;
        box-shadow: 0 30px 60px rgba(0,0,0,0.3) !important;
        z-index: 999999 !important;
        display: none;
        overflow-y: auto !important;
    }
}


.spin {
    animation: spin-v8 1s linear infinite;
    display: inline-block;
}
@keyframes spin-v8 {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}



/* --- PRODUCT CARD FOOTER V8 --- */
.product-card-footer-v8 {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem;
}

.stock-info-v8 {
    font-size: 0.7rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 4px;
}

.stock-info-v8.in-stock { color: #16a34a; }
.stock-info-v8.out-of-stock { color: #ef4444; }

.card-action-btn-v8 {
    padding: 0.4rem 1rem !important;
    font-size: 0.7rem !important;
    background: #1e293b !important;
    color: #fff !important;
    border-radius: 6px !important;
    font-weight: 800 !important;
    letter-spacing: 0.5px !important;
    transition: background-color 0.2s ease !important;
    border: none !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
}

/* Hover effects when parent product card is hovered */
.product-item-3dcim:hover .card-action-btn-v8 {
    background: var(--brand-primary) !important;
}

/* Direct hover on the button itself */
.card-action-btn-v8:hover {
    background: #6d28d9 !important;
}

@media (max-width: 576px) {
    .product-card-footer-v8 {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }
    
    .card-action-btn-v8 {
        width: 100% !important;
        justify-content: center !important;
    }
}

/* --- PRODUCT DETAIL PAGE MOBILE OPTIMIZATION --- */
@media (max-width: 991px) {
    .product-detail-grid {
        grid-template-columns: 1fr !important;
        gap: 2rem !important;
    }
    
    .product-gallery-v8 {
        padding: 0 !important;
    }
    
    .main-image-container {
        border-radius: 20px !important;
        margin: 0 -1rem !important;
        width: calc(100% + 2rem) !important;
    }

    .main-image-container img {
        max-height: 400px !important;
    }

    .price-container-v8 {
        min-height: auto !important;
        padding: 1.5rem 0 !important;
    }

    .main-price-v8 {
        font-size: 2.2rem !important;
    }
}



/* --- PRODUCT ACTIONS V8 --- */
.product-actions-v8 {
    display: grid;
    grid-template-columns: 1fr 1fr auto;
    gap: 12px;
    margin-bottom: 2rem;
}

.btn-buy-v8 {
    background: #fff;
    border: 2px solid var(--brand-primary);
    color: var(--brand-primary);
    padding: 1rem;
    border-radius: 12px;
    font-weight: 850;
    cursor: pointer;
    font-size: 0.95rem;
    width: 100%;
    transition: all 0.2s;
}

.btn-add-v8 {
    width: 100%;
    background: var(--brand-primary);
    color: #fff;
    border: none;
    padding: 1rem;
    border-radius: 12px;
    font-weight: 850;
    cursor: pointer;
    font-size: 0.95rem;
    box-shadow: 0 8px 20px rgba(var(--brand-primary-rgb), 0.2);
    transition: all 0.2s;
}

.heart-btn-v8 {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 54px;
    height: 54px;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s;
    background: #f8fafc;
    color: #94a3b8;
}

.heart-btn-v8.active-heart {
    color: #ef4444;
    background: #fef2f2;
    border-color: #fee2e2;
}

@media (max-width: 768px) {
    .product-actions-v8 {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .btn-buy-v8, .btn-add-v8 {
        padding: 1.2rem;
        font-size: 1rem;
    }

    .heart-btn-v8 {
        width: 100%;
        height: 50px;
    }
}

/* --- PRODUCT DETAIL DESCRIPTION GRID --- */
.desc-grid-v8 {
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 4rem;
    align-items: center;
}

@media (max-width: 991px) {
    .desc-grid-v8 {
        grid-template-columns: 1fr !important;
        gap: 2.5rem !important;
        text-align: center;
        padding: 2.5rem 1.5rem !important;
    }
}


/* REFINING DESC GRID STYLES */
.desc-grid-v8 {
    background: #fff;
    border: 1px solid #f1f5f9;
    border-radius: 24px;
    padding: 2.5rem;
    box-shadow: 0 4px 25px rgba(0,0,0,0.03);
}



/* --- REVIEW MODAL V8 --- */
.modal-overlay-v8 {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.8);
    z-index: 10000;
    backdrop-filter: blur(8px);
}

.review-modal-content-v8 {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 95%;
    max-width: 1100px;
    height: 90vh;
    background: #fff;
    border-radius: 24px;
    display: grid;
    grid-template-columns: 1fr 380px;
    overflow: hidden;
    box-shadow: 0 40px 100px rgba(0,0,0,0.3);
}

.review-list-area-v8 {
    padding: 3rem;
    overflow-y: auto;
    border-right: 1px solid #f1f5f9;
    background: #fcfcfd;
}

.review-form-area-v8 {
    padding: 3rem;
    background: #fff;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

.modal-header-v8 {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.modal-title-v8 { font-size: 1.5rem; font-weight: 900; color: #1e293b; margin: 0; }
.review-count-badge-v8 { background: #f1f5f9; padding: 0.2rem 0.8rem; border-radius: 20px; font-size: 0.8rem; font-weight: 800; color: #64748b; }

.modal-close-btn-v8 {
    background: #f1f5f9;
    border: none;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

@media (max-width: 991px) {
    .review-modal-content-v8 {
        grid-template-columns: 1fr;
        height: 100vh;
        width: 100%;
        border-radius: 0;
        top: 0;
        left: 0;
        transform: none;
    }
    
    .review-list-area-v8 {
        padding: 1.5rem;
        border-right: none;
        height: 60vh;
    }
    
    .review-form-area-v8 {
        padding: 1.5rem;
        height: 40vh;
        border-top: 1px solid #f1f5f9;
    }
    
    .modal-header-v8 {
        position: sticky;
        top: 0;
        background: #fcfcfd;
        z-index: 10;
        padding-bottom: 1rem;
    }
}

/* --- PRODUCT DETAIL FIXES --- */
@media (max-width: 991px) {
    /* Ensure gallery and details dont overlap */
    .product-detail-grid {
        display: flex !important;
        flex-direction: column !important;
    }
    
    #thumbContainer {
        margin-bottom: 2rem !important;
    }
    
    /* Correct alignment in provided image */
    .product-gallery-v8 {
        margin-bottom: 1.5rem;
    }
}


@media (max-width: 991px) {
    .product-gallery-v8 + div {
        margin-top: 1rem !important;
        padding-top: 1rem !important;
    }
}



/* --- REFINED PRODUCT GALLERY V8 --- */
.main-image-container {
    width: 100%;
    aspect-ratio: 1 / 1;
    background: #fff;
    border: 1px solid #f1f5f9;
    border-radius: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
    padding: 1.5rem;
}

.main-image-container img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.thumb-box {
    border: 2px solid transparent;
    transition: all 0.2s;
    background: #fff;
    flex-shrink: 0;
}

.thumb-box.active {
    border-color: var(--brand-primary) !important;
    box-shadow: 0 4px 12px rgba(127, 63, 191, 0.15);
}

@media (max-width: 991px) {
    .main-image-container {
        padding: 1rem;
        border-radius: 20px;
        margin-bottom: 0.5rem;
    }
    
    .product-gallery-v8 {
        margin-bottom: 1rem !important;
    }
}



/* --- PREMIUM REVIEW CARDS IN MODAL --- */
.review-modal-content-v8 .review-item-v8 {
    background: #fff;
    border: 1px solid #f1f5f9;
    border-radius: 20px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    transition: transform 0.2s;
}

@media (max-width: 768px) {
    .review-modal-content-v8 .review-item-v8 {
        padding: 1.25rem;
        border-radius: 16px;
    }
    
    .modal-title-v8 {
        font-size: 1.25rem !important;
    }
    
    .review-form-area-v8 h4 {
        font-size: 1rem !important;
        margin-bottom: 1rem !important;
    }
}



/* --- CUSTOM IMAGE UPLOAD V8 --- */
.image-upload-group-v8 {
    margin-bottom: 2rem;
}

.upload-label-v8 {
    display: block;
    font-size: 0.85rem;
    font-weight: 800;
    color: #475569;
    margin-bottom: 1rem;
}

.upload-controls-v8 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.custom-file-v8 {
    position: relative;
}

.custom-file-v8 input[type=" file\] {
 position: absolute;
 width: 1px;
 height: 1px;
 padding: 0;
 margin: -1px;
 overflow: hidden;
 clip: rect(0,0,0,0);
 border: 0;
}

.custom-file-v8 label {
 display: flex;
 flex-direction: column;
 align-items: center;
 justify-content: center;
 gap: 0.5rem;
 padding: 1rem 0.5rem;
 background: #f8fafc;
 border: 2px dashed #e2e8f0;
 border-radius: 12px;
 cursor: pointer;
 transition: all 0.2s;
 text-align: center;
}

.custom-file-v8 label i {
 color: var(--brand-primary);
 width: 20px;
 height: 20px;
}

.custom-file-v8 label span {
 font-size: 0.7rem;
 font-weight: 800;
 color: #64748b;
 white-space: nowrap;
 overflow: hidden;
 text-overflow: ellipsis;
 max-width: 100%;
}

.custom-file-v8 label:hover {
 border-color: var(--brand-primary);
 background: #f1f5f9;
}

@media (max-width: 576px) {
 .upload-controls-v8 {
 grid-template-columns: 1fr;
 }
 
 .custom-file-v8 label {
 flex-direction: row;
 justify-content: flex-start;
 padding: 0.75rem 1.25rem;
 }
}



/* --- ADMIN IMAGE UPLOAD V8 --- */
.admin-layout .media-placeholder-v8 {
    width: 60px;
    height: 60px;
    background: #f1f5f9;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #94a3b8;
}

.admin-layout .custom-admin-file-v8 {
    position: relative;
    margin: 5px 0;
}

.admin-layout .custom-admin-file-v8 input[type=" file\] {
 position: absolute;
 width: 1px;
 height: 1px;
 padding: 0;
 margin: -1px;
 overflow: hidden;
 clip: rect(0,0,0,0);
 border: 0;
}

.admin-layout .custom-admin-file-v8 label {
 display: inline-flex;
 align-items: center;
 gap: 8px;
 padding: 8px 16px;
 background: #fff;
 border: 1px solid #e2e8f0;
 border-radius: 8px;
 cursor: pointer;
 font-size: 12px;
 font-weight: 700;
 color: #475569;
 transition: all 0.2s;
}

.admin-layout .custom-admin-file-v8 label:hover {
 background: #f8fafc;
 border-color: var(--brand-primary);
 color: var(--brand-primary);
}

.admin-layout .delete-media-btn-v8 {
 background: #fef2f2;
 border: none;
 color: #ef4444;
 width: 40px;
 height: 40px;
 border-radius: 10px;
 cursor: pointer;
 transition: all 0.2s;
}

.admin-layout .delete-media-btn-v8:hover {
 background: #ef4444;
 color: #fff;
}



/* --- EXECUTIVE DROPZONE V8 --- */
.image-upload-system-v8 {
    margin-bottom: 2rem;
}

.dropzone-grid-v8 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.dropzone-v8 {
    aspect-ratio: 1 / 1;
    border: 2px dashed #cbd5e1;
    border-radius: 20px;
    background: #f8fafc;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    padding: 1rem;
}

.dropzone-v8:hover {
    border-color: var(--brand-primary);
    background: #f1f5f9;
    transform: translateY(-2px);
}

.dropzone-content-v8 {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.5rem;
    pointer-events: none;
}

.dz-icon-v8 {
    color: var(--brand-primary);
    width: 32px;
    height: 32px;
    margin-bottom: 0.25rem;
}

.dz-text-v8 {
    font-size: 0.85rem;
    font-weight: 850;
    color: #1e293b;
}

.dz-subtext-v8 {
    font-size: 0.65rem;
    font-weight: 600;
    color: #94a3b8;
}

.dz-preview-v8 {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 18px;
    animation: fadeIn 0.4s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

@media (max-width: 576px) {
    .dropzone-grid-v8 {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .dropzone-v8 {
        aspect-ratio: 2 / 1;
    }
}



/* --- ADMIN EXECUTIVE DROPZONE --- */
.admin-layout .media-item-v8 {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 1rem;
    background: #fff;
    border: 1px solid #f1f5f9;
    border-radius: 16px;
    margin-bottom: 1rem;
}

.admin-layout .admin-dropzone-v8 {
    width: 80px;
    height: 80px;
    border: 2px dashed #e2e8f0;
    border-radius: 14px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    background: #f8fafc;
    position: relative;
    overflow: hidden;
}

.admin-layout .admin-dropzone-v8:hover {
    border-color: var(--brand-primary);
    background: #f1f5f9;
}

.admin-layout .admin-dropzone-v8.has-image {
    border: 2px solid var(--brand-primary);
}

.admin-layout .dz-preview-v8 {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.admin-layout .dz-content-v8 span {
    font-size: 10px;
    font-weight: 800;
    color: #94a3b8;
}
}
}

