/* 
   Gletra Design System - Color Palette
*/
:root {
    /* Main Branding */
    --primary-main: #7c0663;
    --primary-soft: #8d11be;
    --primary-glow: rgba(79, 70, 229, 0.15);

    --secondary-main: #ada806;
    --secondary-soft: #ada806;

    /* Semantic Colors */
    --success: #10b981;
    --success-bg: #ecfdf5;
    --warning: #f59e0b;
    --warning-bg: #fffbeb;
    --danger: #ef4444;
    --danger-bg: #fef2f2;
    --info: #3b82f6;
    --info-bg: #eff6ff;

    /* Neutrals & Grays */
    --neutral-50: #f8fafc;
    --neutral-100: #f1f5f9;
    --neutral-200: #e2e8f0;
    --neutral-300: #cbd5e1;
    --neutral-400: #94a3b8;
    --neutral-500: #64748b;
    --neutral-600: #475569;
    --neutral-700: #334155;
    --neutral-800: #1e293b;
    --neutral-900: #0f172a;

    /* Application Defaults (Fallback) */
    --app-bg: #f8fafc;
    --card-bg: #ffffff;
    --text-main: #1e293b;
    --text-muted: #64748b;
    --border-soft: rgba(0, 0, 0, 0.05);

    /* Glassmorphism & Effects */
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(255, 255, 255, 0.4);
    
    --shadow-xs: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-sm: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
    --shadow-2xl: 0 25px 50px -12px rgb(0 0 0 / 0.25);
    
    /* Component Specific Tokens */
    --nav-height: 72px;
    --nav-bg: #ffffff;
    --footer-bg: #0f172a;
    --card-radius: 16px;
    --input-radius: 8px;
    --btn-radius: 8px;
    
    /* Gradients */
    --grad-primary: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    --grad-sunset: linear-gradient(135deg, #fb923c 0%, #db2777 100%);
    --grad-ocean: linear-gradient(135deg, #0ea5e9 0%, #2563eb 100%);
    --grad-dark: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    --grad-surface: linear-gradient(180deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0) 100%);
}

/* --- BASE & VARIABLES --- */
body {
    font-family: var(--main-font, 'Inter', sans-serif);
    background-color: var(--app-bg);
    color: var(--text-main);
}

/* Typography Enhancements */
h1,
h2,
h3,
h4,
h5,
h6 {
    color: var(--neutral-900);
    font-weight: 700;
}

.text-muted {
    color: var(--text-muted) !important;
}

.text-success {
    color: var(--success) !important;
}

.text-warning {
    color: var(--warning) !important;
}

.text-danger {
    color: var(--danger) !important;
}

.text-info {
    color: var(--info) !important;
}

.bg-success-soft {
    background-color: var(--success-bg);
    color: var(--success);
}

.bg-warning-soft {
    background-color: var(--warning-bg);
    color: var(--warning);
}

.bg-danger-soft {
    background-color: var(--danger-bg);
    color: var(--danger);
}

.bg-info-soft {
    background-color: var(--info-bg);
    color: var(--info);
}

.btn {
    border-radius: var(--border-radius);
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-primary,
.bg-primary {
    background-color: var(--primary-color) !important;
    border-color: var(--primary-color) !important;
    color: white !important;
}

.btn-primary:hover {
    background-color: var(--primary-dark) !important;
    border-color: var(--primary-dark) !important;
}

.btn-outline-primary {
    color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-outline-primary:hover {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

.navbar-brand,
.text-primary {
    color: var(--primary-color) !important;
}

.card {
    border-radius: var(--border-radius);
    border: none;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* --- UTILITY CLASSES --- */
.fw-extrabold {
    font-weight: 800;
}

.cursor-pointer {
    cursor: pointer;
}

.transition-base {
    transition: all 0.3s ease;
}

.hover-lift {
    transition: all 0.3s ease;
}

.hover-lift:hover {
    transform: translateY(-5px);
    box-shadow: 0 .5rem 1rem rgba(0, 0, 0, .15) !important;
    border-color: var(--primary-color) !important;
}

.hover-scale {
    transition: transform 0.3s ease;
}

.hover-scale:hover {
    transform: translateY(-5px);
}

.hover-border:hover {
    border-color: var(--primary-color) !important;
    box-shadow: 0 0 0 2px var(--primary-light);
}

.no-scrollbar::-webkit-scrollbar {
    display: none;
}

.no-scrollbar {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.bg-primary-light {
    background-color: var(--primary-light);
}

.blur-bg {
    background: rgba(255, 255, 255, 0.7) !important;
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.btn-primary-custom {
    background-color: var(--primary-color);
    color: white;
    border: none;
    transition: all 0.3s ease;
}

.btn-primary-custom:hover {
    background-color: var(--primary-dark);
    color: white;
    transform: translateY(-2px);
}

.btn-secondary-custom {
    background-color: var(--secondary-color);
    color: white;
    border: none;
    transition: all 0.3s ease;
}

.btn-secondary-custom:hover {
    background-color: #be185d;
    color: white;
    transform: translateY(-2px);
}

.btn-white {
    background: #fff;
    color: #111;
    border: 1px solid #eee;
}

/* Scrollbar Utility (Modern) */
.custom-scrollbar::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

.custom-scrollbar::-webkit-scrollbar-track {
    background: var(--bg-color);
}

.custom-scrollbar::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 10px;
    opacity: 0.5;
}

.custom-scrollbar::-webkit-scrollbar-thumb:hover {
    background: var(--border-color);
}

/* --- HEADER STYLES --- */
.font-outfit {
    font-family: var(--main-font);
}

.nav-link:hover {
    color: #fff !important;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
}

.bg-primary-dark {
    background-color: rgba(0, 0, 0, 0.1) !important;
}

.header-icon-btn:hover {
    background: rgba(255, 255, 255, 0.25) !important;
}

/* --- HOME PAGE STYLES --- */
.detailed-card {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* --- PRODUCT PAGE STYLES --- */
.image-box {
    position: relative;
    background: #fff;
    border-radius: 12px;
    padding: 10px;
}

.slider {
    position: relative;
    overflow: hidden;
    touch-action: pan-y;
}

.slide {
    width: 100%;
    display: none;
    border-radius: 12px;
    aspect-ratio: 1/1;
    object-fit: contain;
}

.slide.active {
    display: block;
}

.dots {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-top: 12px;
}

.dot {
    width: 8px;
    height: 8px;
    background: #ccc;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.dot.active {
    background: #2874f0;
    width: 20px;
    border-radius: 4px;
}

.share-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(0, 0, 0, .6);
    color: #fff;
    border: none;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    z-index: 10;
    display: flex;
    align-items: center;
    gap: 5px;
    backdrop-filter: blur(4px);
    transition: background 0.3s;
}

.share-btn:hover {
    background: rgba(0, 0, 0, .8);
}

.slider-thumbs {
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.slider-thumbs::-webkit-scrollbar {
    display: none;
}

.thumb-item {
    width: 70px;
    height: 70px;
    flex-shrink: 0;
    cursor: pointer;
    border: 2px solid transparent;
    border-radius: 8px;
    padding: 2px;
    transition: all 0.2s ease;
}

.thumb-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.thumb-item.active {
    border-color: #2874f0;
    background: rgba(40, 116, 240, 0.05);
}

.hover-wishlist:hover {
    background-color: #fef2f2 !important;
    border-color: #ef4444 !important;
    color: #ef4444 !important;
}

.nav-tabs .nav-link.active {
    color: var(--primary-color) !important;
    border-bottom: 3px solid var(--primary-color) !important;
}

/* --- CUSTOMER DASHBOARD --- */
.profile-hero-card {
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
}

.stats-glass-card {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
}

.stats-hover {
    transition: all 0.3s ease;
}

.stats-hover:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1) !important;
}

.list-group-item:hover {
    background-color: #f9fafb;
}

/* --- CART PAGE --- */
.place-order-btn {
    background: linear-gradient(135deg, #fb641b 0%, #ff8c00 100%);
    color: white;
    border: none;
    padding: 15px 60px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 16px;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(251, 100, 27, 0.3);
    text-transform: uppercase;
    transition: all 0.3s ease;
}

.place-order-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(251, 100, 27, 0.4);
    filter: brightness(1.1);
}

.place-order-btn:active {
    transform: translateY(0);
}

.price-details-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    position: sticky;
    top: 100px;
    overflow: hidden;
    border: 1px solid rgba(0, 0, 0, 0.02);
}

.price-details-card .card-header {
    padding: 15px 20px;
    border-bottom: 1px solid #f0f0f0;
    color: #878787;
    font-weight: 700;
    font-size: 14px;
    text-transform: uppercase;
    background: #fafafa;
}

.price-details-card .card-body {
    padding: 20px;
}

.price-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
    font-size: 15px;
    color: #212121;
}

.total-row {
    display: flex;
    justify-content: space-between;
    margin-top: 10px;
    padding-top: 20px;
    border-top: 1px dashed #e0e0e0;
    font-size: 18px;
    font-weight: 800;
    color: #212121;
}

.text-success {
    color: #388e3c;
}

.savings-msg {
    margin-top: 15px;
    color: #388e3c;
    font-weight: 700;
    font-size: 14px;
    padding: 10px;
    background: rgba(56, 142, 60, 0.1);
    border-radius: 6px;
    text-align: center;
}

.security-msg {
    margin-top: 25px;
    display: flex;
    gap: 15px;
    color: #94a3b8;
    font-size: 13px;
    padding: 0 10px;
    align-items: center;
}

.security-msg i {
    font-size: 28px;
    color: #388e3c;
    opacity: 0.8;
}

.product-card-desktop {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid transparent;
}

.product-card-desktop:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.1) !important;
    border-color: rgba(var(--primary-rgb), 0.1);
}

/* --- CHAT SYSTEM --- */
:root {
    --chat-bg: #eceff1;
    --msg-incoming: #ffffff;
    --msg-outgoing: #2874f0;
    --msg-outgoing-text: #ffffff;
    --chat-header: #2874f0;
}

.chat-container {
    display: flex;
    flex-direction: column;
    height: 100vh;
    background: var(--chat-bg);
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px 15px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.message {
    max-width: 75%;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 14px;
    position: relative;
    box-shadow: 0 1px 1px rgba(0, 0, 0, 0.1);
}

.message.incoming {
    align-self: flex-start;
    background: var(--msg-incoming);
}

.message.outgoing {
    align-self: flex-end;
    background: var(--msg-outgoing);
    color: var(--msg-outgoing-text);
}

.message .time {
    font-size: 10px;
    margin-top: 4px;
    text-align: right;
    display: block;
    opacity: 0.7;
}

/* --- FOOTER & RESPONSIVE --- */
.gletra-footer {
    background: #172337;
    color: #9ca3af;
    padding-top: 80px;
    font-family: 'Outfit', sans-serif;
    position: relative;
    overflow: hidden;
}

.gletra-footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color), var(--accent-color));
}

.footer-heading {
    font-size: 13px;
    font-weight: 700;
    color: #abb2bf;
    margin-bottom: 25px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.footer-link {
    display: block;
    color: #fff;
    text-decoration: none;
    font-size: 14px;
    font-weight: 400;
    margin-bottom: 12px;
    transition: all 0.3s ease;
    opacity: 0.8;
}

.footer-link:hover {
    color: var(--primary-color);
    opacity: 1;
    transform: translateX(5px);
    text-decoration: none;
}

.footer-social-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
    border-radius: 12px;
    margin-right: 12px;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-social-btn:hover {
    background: var(--primary-color);
    color: #fff;
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(79, 70, 229, 0.3);
    border-color: transparent;
}

.footer-bottom {
    background-color: #0f172a;
    padding: 30px 0;
    margin-top: 60px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.payout-icon {
    font-size: 28px;
    color: #fff;
    opacity: 0.5;
    transition: opacity 0.3s;
}

.payout-icon:hover {
    opacity: 1;
}

.newsletter-input {
    background: rgba(255, 255, 255, 0.05) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    color: #fff !important;
    padding: 10px 15px !important;
    border-radius: 8px !important;
}

.newsletter-input:focus {
    background: rgba(255, 255, 255, 0.1) !important;
    border-color: var(--primary-color) !important;
    box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.1) !important;
}

@media (max-width: 991.98px) {
    .gletra-footer {
        padding-top: 60px;
        padding-bottom: 100px;
    }

    .gletra-footer .row>[class*="col-"] {
        flex: 0 0 50% !important;
        max-width: 50% !important;
    }

    .footer-bottom {
        padding-bottom: 120px;
    }

    #scrollToTopBtn {
        display: none !important;
    }

    .col-lg-2 {
        display: none !important;
    }

    .sidebar-card,
    .card {
        margin-bottom: 15px;
    }

    .dashboard-bottom-nav {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        background: rgba(255, 255, 255, 0.95);
        backdrop-filter: blur(10px);
        display: flex;
        justify-content: space-around;
        padding: 8px 0 env(safe-area-inset-bottom);
        box-shadow: 0 -5px 20px rgba(0, 0, 0, 0.08);
        z-index: 1040;
        border-top: 1px solid rgba(0, 0, 0, 0.05);
    }

    .dashboard-bottom-nav a {
        color: #94a3b8;
        text-decoration: none;
        display: flex;
        flex-direction: column;
        align-items: center;
        font-size: 10px;
        font-weight: 600;
        width: 20%;
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        position: relative;
    }

    .dashboard-bottom-nav a i {
        font-size: 22px;
        margin-bottom: 2px;
    }

    .dashboard-bottom-nav a.active {
        color: var(--primary-color);
    }

    .dashboard-bottom-nav a.active i {
        transform: translateY(-5px);
    }

    .center-fab {
        margin-top: -30px !important;
        z-index: 1050;
    }

    .fab-circle {
        width: 55px;
        height: 55px;
        background: var(--primary-color);
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        border: 4px solid #fff;
        transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    }

    .form-control,
    .form-select {
        border-radius: 12px !important;
        padding: 12px 16px !important;
        border: 1px solid #e2e8f0 !important;
        background-color: #f8fafc !important;
    }
}

/* Mobile 2-Column Grid */
@media (max-width: 767.98px) {
    .row.g-3.mb-4>[class*="col-"] {
        width: 50% !important;
        flex: 0 0 50% !important;
    }
}

/* Content Protection */
body {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

img {
    -webkit-user-drag: none;
    -khtml-user-drag: none;
    -moz-user-drag: none;
    -o-user-drag: none;
    pointer-events: none;
}