/* ==========================================
   VELVET Platform - Premium Design System
   ========================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Playfair+Display:ital,wght@0,400;0,600;0,700;1,400&display=swap');

:root {
    --primary: #0a848f; /* Deep brand teal */
    --primary-dark: #055a62;
    --primary-light: #0d9488;
    --primary-gradient: linear-gradient(135deg, #0a848f 0%, #0d9488 100%);
    --bg-gradient: linear-gradient(180deg, #fafaf9 0%, #f3f7f8 100%);
    --dark-accent: #112a2e; /* Deep dark botanical charcoal */
    --light-accent: #f2f8f8; /* Soft teal tint */
    --muted-text: #4a6064; /* Slate-teal-muted */
    --accent-gold: #c5a880; /* Warm champagne gold */
    --accent-gold-hover: #b3946b;
    --card-bg: rgba(255, 255, 255, 0.9);
    --border-color: rgba(10, 132, 143, 0.1);
    
    --card-shadow: 0 10px 25px -5px rgba(17, 42, 46, 0.04), 0 8px 16px -6px rgba(17, 42, 46, 0.03);
    --card-shadow-hover: 0 20px 35px -5px rgba(10, 132, 143, 0.12), 0 10px 20px -6px rgba(10, 132, 143, 0.08);
    
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    
    --font-heading: 'Playfair Display', 'Marcellus', Georgia, serif;
    --font-body: 'Inter', 'Jost', sans-serif;
    
    --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Base Body Styles */
body {
    font-family: var(--font-body);
    background: var(--bg-gradient);
    color: var(--dark-accent);
    min-height: 100vh;
    margin: 0;
    padding: 0;
    line-height: 1.6;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 600;
    letter-spacing: -0.02em;
    color: var(--dark-accent);
}

.Marcellus {
    font-family: var(--font-heading) !important;
    letter-spacing: 0.05em;
}

/* Buttons */
.btn-primary {
    background: var(--primary-gradient) !important;
    border: none !important;
    box-shadow: 0 4px 14px rgba(10, 132, 143, 0.35);
    transition: var(--transition-smooth) !important;
    font-weight: 500;
    padding: 10px 24px;
    border-radius: var(--radius-sm);
    color: white !important;
}

.btn-primary:hover, .btn-primary:focus {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(10, 132, 143, 0.5);
    filter: brightness(1.05);
}

.btn-outline-primary {
    border: 2px solid var(--primary) !important;
    color: var(--primary) !important;
    background: transparent !important;
    transition: var(--transition-smooth) !important;
    font-weight: 500;
    padding: 8px 22px;
    border-radius: var(--radius-sm);
}

.btn-outline-primary:hover {
    background: var(--primary-gradient) !important;
    color: white !important;
    border-color: transparent !important;
    transform: translateY(-2px);
}

/* Inputs & Form Styling */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
select,
textarea {
    width: 100%;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.9);
    border: 1.5px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-family: var(--font-body);
    font-size: 0.95rem;
    transition: var(--transition-smooth);
    color: var(--dark-accent);
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
input[type="number"]:focus,
select:focus,
textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(10, 132, 143, 0.15);
    background: white;
    outline: none;
}

/* Glassmorphism Header */
header.main-header {
    background: rgba(17, 42, 46, 0.9); /* Dark semi-transparent brand charcoal */
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: var(--transition-smooth);
}

/* Navigation Links */
.links_list a {
    position: relative;
    font-weight: 500;
    padding: 6px 0;
}

.links_list a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-gradient);
    transition: var(--transition-smooth);
}

.links_list a:hover::after,
.links_list a.active::after {
    width: 100%;
}

/* Global Container Cards */
.card, .container-card {
    background: var(--card-bg);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: var(--card-shadow);
    transition: var(--transition-smooth);
    overflow: hidden;
}

.card:hover {
    box-shadow: var(--card-shadow-hover);
}

.card-header {
    background: var(--primary-gradient) !important;
    border-bottom: 1px solid var(--border-color);
    color: white !important;
    font-family: var(--font-heading);
    letter-spacing: 0.05em;
}

/* Aspect Ratio Image Wrapper for Uniform Grids */
.card-img-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1; /* Square Ratio */
    overflow: hidden;
    background: var(--light-accent);
}

.card-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.product-card:hover .card-img-wrapper img {
    transform: scale(1.06);
}

/* Price Tag Styling */
.price {
    font-family: var(--font-body);
    color: var(--primary-dark) !important;
    font-size: 1.3rem;
}

/* Dashboard & Metric Card Styling */
.metric-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: var(--card-shadow);
    padding: 24px;
    transition: var(--transition-smooth);
}

.metric-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--card-shadow-hover);
}

.metric-value {
    font-size: 2.25rem;
    font-weight: 700;
    color: var(--dark-accent);
    line-height: 1.2;
}

.metric-label {
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--muted-text);
}

.metric-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(10, 132, 143, 0.08);
    color: var(--primary);
    transition: var(--transition-smooth);
}

.metric-card:hover .metric-icon {
    background: var(--primary);
    color: white;
    transform: scale(1.1);
}

/* Footer Section */
footer.main-footer {
    background: var(--dark-accent);
    color: var(--muted-text);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding: 30px 0;
    margin-top: 60px;
}

/* Micro-animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.fade-in-element {
    animation: fadeIn 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.product-card {
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.product-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--card-shadow-hover) !important;
}

.btn-whatsapp-outline {
    border: 2px solid #25d366 !important;
    color: #25d366 !important;
    background: transparent !important;
    font-weight: 500;
    transition: var(--transition-smooth) !important;
    border-radius: var(--radius-sm);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-whatsapp-outline:hover {
    background: #25d366 !important;
    color: white !important;
    border-color: transparent !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 14px rgba(37, 211, 102, 0.3);
}

/* Mobile Bottom Navigation Styles */
.mobile-bottom-nav .mobile-nav-item {
    transition: var(--transition-smooth);
}

.mobile-bottom-nav .mobile-nav-item:hover,
.mobile-bottom-nav .mobile-nav-item:focus {
    color: var(--accent-gold) !important;
}

.mobile-bottom-nav .active-mobile-nav {
    color: var(--accent-gold) !important;
}

/* Offcanvas Drawer link styles */
.offcanvas .links_list a {
    transition: var(--transition-smooth);
    padding: 10px 0;
}

.offcanvas .links_list a:hover {
    color: var(--accent-gold) !important;
    padding-left: 5px;
}

.offcanvas .links_list a.active {
    color: var(--accent-gold) !important;
    font-weight: 700;
}

/* Avoid text decoration line for active drawer items */
.offcanvas .links_list a::after {
    display: none;
}

/* Adjust page padding on mobile to avoid fixed sticky bottom nav overlap */
@media (max-width: 767.98px) {
    body {
        padding-bottom: 64px !important;
    }
    
    footer.main-footer {
        padding-bottom: 80px !important;
    }
}

/* Clickable card title styles */
.product-title-link {
    color: var(--dark-accent);
    text-decoration: none;
    transition: var(--transition-smooth);
}
.product-title-link:hover {
    color: var(--primary);
}

/* Responsive card styling */
@media (max-width: 575.98px) {
    /* Tighten grid gap on mobile */
    #product-grid, #product-list, .row.g-4 {
        --bs-gutter-x: 0.5rem !important;
        --bs-gutter-y: 0.5rem !important;
    }
    
    .product-card .card-body {
        padding: 12px !important;
    }
    
    .product-card .card-title {
        font-size: 0.95rem !important;
        margin-bottom: 6px !important;
        line-height: 1.3;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
        height: 2.6em; /* Align cards with uniform height */
    }
    
    .product-card .card-text {
        display: none !important; /* Hide description on mobile for compact layout */
    }
    
    /* Scale down price and details */
    .product-card .text-primary.fs-4,
    .product-card .price {
        font-size: 1.05rem !important;
    }
    
    .product-card .text-muted.fs-6,
    .product-card .text-danger.fs-6 {
        font-size: 0.75rem !important;
    }
    
    .product-card .d-flex.align-items-center.justify-content-between.mb-3 {
        margin-bottom: 8px !important;
    }
    
    /* Scale down stock badge */
    .product-card .badge {
        font-size: 0.65rem !important;
        padding: 4px 8px !important;
    }
    .product-card .card-img-wrapper > div {
        top: 8px !important;
        right: 8px !important;
    }
    
    /* Quantity input wrapper for inline forms */
    .product-card .quantity-input-wrapper {
        width: 55px !important;
    }
    .product-card .quantity-input-wrapper input {
        padding: 6px 4px !important;
        font-size: 0.85rem !important;
        height: 36px !important;
        text-align: center;
    }
    
    /* Compact buttons on mobile */
    .product-card .btn {
        padding: 6px 8px !important;
        font-size: 0.8rem !important;
        height: 36px !important;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }
    
    /* Metric ledger cards adjustment */
    .metric-card {
        padding: 16px !important;
    }
    .metric-value {
        font-size: 1.75rem !important;
    }
    .metric-label {
        font-size: 0.75rem !important;
    }
    
    /* Product selector cards in B2B Quote Builder */
    .product-select-card h6 {
        font-size: 0.85rem !important;
        max-width: 130px !important;
    }
}

/* Inline actions style for both desktop and mobile */
.product-card .quantity-input-wrapper {
    width: 70px;
    flex-shrink: 0;
}
.product-card .quantity-input-wrapper input {
    text-align: center;
    padding: 10px 8px;
    height: 44px;
}
.product-card .product-form-actions button.btn-primary {
    height: 44px;
}
@media (max-width: 575.98px) {
    .product-card .product-form-actions button.btn-primary {
        height: 36px;
    }
}

