/* ==========================================================================
   CentavoCerto - Premium UI/UX System
   ========================================================================== */

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

:root {
    --bg-light: #f4f7fe;
    --card-bg: #ffffff;
    --text-main: #1b254b;
    --text-muted: #a3aed1;
    --border-color: #e2e8f0;
    
    /* Shadows */
    --shadow-soft: 0 4px 15px rgba(0, 0, 0, 0.05);
    --shadow-hover: 0 10px 25px rgba(0, 0, 0, 0.1);
    --shadow-glass: 0 8px 32px 0 rgba(31, 38, 135, 0.1);
    
    /* Radii */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    
    /* Gradients */
    --gradient-hero: linear-gradient(135deg, #f5f7fa 0%, #e0eafc 100%);
    --gradient-admin: linear-gradient(135deg, #2b32b2 0%, #1488cc 100%);
    
    /* Transitions */
    --transition-fast: 0.2s ease-in-out;
    --transition-base: 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* ==========================================================================
   Base
   ========================================================================== */
body {
    font-family: 'Inter', sans-serif;
    color: var(--text-main);
    background-color: var(--bg-light);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ==========================================================================
   Components
   ========================================================================== */

/* Cards General */
.premium-card {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    border: 1px solid rgba(255, 255, 255, 0.4);
    box-shadow: var(--shadow-soft);
    transition: all var(--transition-base);
}

.premium-card:hover {
    box-shadow: var(--shadow-hover);
    transform: translateY(-4px);
}

/* Custom Buttons */
.btn-premium {
    border-radius: var(--radius-sm);
    font-weight: 500;
    transition: all var(--transition-base);
    padding: 0.5rem 1.25rem;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.btn-premium-primary {
    background-color: var(--primary-color, #4318FF) !important;
    color: #ffffff !important;
    border: none;
    box-shadow: 0 4px 14px 0 rgba(0, 0, 0, 0.15);
}

.btn-premium-primary:hover,
.btn-premium-primary:focus,
.btn-premium-primary:active {
    background-color: var(--primary-color, #4318FF) !important;
    color: #ffffff !important;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.23) !important;
    transform: translateY(-2px);
    opacity: 0.95;
}

/* Global Fix for all Primary Buttons (Admin and Public) */
.btn-primary {
    background-color: var(--primary-color, #4318FF) !important;
    border-color: var(--primary-color, #4318FF) !important;
    color: #ffffff !important;
}

.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active {
    background-color: var(--primary-color, #4318FF) !important;
    border-color: var(--primary-color, #4318FF) !important;
    color: #ffffff !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2) !important;
    transform: translateY(-2px);
    opacity: 0.95;
}

.btn-glass {
    background: rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 255, 255, 0.18);
    color: var(--text-main);
}
.btn-glass:hover {
    background: rgba(255, 255, 255, 0.4);
}

/* Hero Section Refinements */
.hero-section-premium {
    background: var(--gradient-hero);
    padding: 100px 0;
    position: relative;
    overflow: hidden;
}

/* Add a subtle mesh glow behind the hero */
.hero-section-premium::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -10%;
    width: 60%;
    height: 150%;
    background: radial-gradient(circle, rgba(255,255,255,0.8) 0%, rgba(255,255,255,0) 70%);
    pointer-events: none;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    letter-spacing: -1px;
    background: -webkit-linear-gradient(45deg, #1b254b, var(--primary-color));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 24px;
}

/* Search Box Premium */
.search-box-premium .input-group {
    background: white;
    border-radius: var(--radius-xl);
    padding: 6px;
    box-shadow: var(--shadow-soft);
    transition: var(--transition-base);
}
.search-box-premium .input-group:focus-within {
    box-shadow: var(--shadow-hover);
    transform: scale(1.02);
}
.search-box-premium input {
    border: none !important;
    background: transparent !important;
    box-shadow: none !important;
    font-size: 1.1rem;
    padding-left: 20px;
}
.search-box-premium .btn {
    border-radius: var(--radius-xl) !important;
    padding: 12px 30px;
    font-weight: 600;
}

/* Category Filters */
.category-filter-premium {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    padding: 20px 0;
    position: sticky;
    top: 70px; /* Adjust based on navbar height */
    z-index: 99;
    box-shadow: 0 2px 10px rgba(0,0,0,0.02);
}

.category-filter-premium .btn-category {
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: 8px 24px;
    margin: 5px;
    color: var(--text-main);
    background: white;
    font-weight: 500;
    transition: var(--transition-fast);
}

.category-filter-premium .btn-category:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    background: #f8fbff;
}

.category-filter-premium .btn-category.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}

/* Product Cards Premium */
.product-card-premium {
    border: none;
    border-radius: var(--radius-lg);
    background: var(--card-bg);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.04);
    transition: all var(--transition-base);
    height: 100%;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.product-card-premium:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
}

.product-card-premium .product-image-wrapper {
    position: relative;
    padding: 15px;
    background: #f8f9fc;
}

.product-card-premium .product-image {
    width: 100%;
    height: 220px;
    object-fit: contain;
    border-radius: var(--radius-md);
    transition: transform var(--transition-base);
}

.product-card-premium:hover .product-image {
    transform: scale(1.03);
}

.product-card-premium .product-badge {
    position: absolute;
    top: 25px;
    right: 25px;
    background: rgba(255,255,255,0.9);
    backdrop-filter: blur(5px);
    color: #f59e0b; /* Amber/Gold */
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 700;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
    z-index: 2;
}

.product-card-premium .card-body {
    padding: 24px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.product-card-premium .card-title {
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--text-main);
    line-height: 1.4;
}

.product-card-premium .price-tag {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-main);
}

/* Tables Admin */
.premium-table-container {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-soft);
    padding: 20px;
    border: 1px solid var(--border-color);
}

.table-premium {
    margin-bottom: 0;
}

.table-premium th {
    background-color: transparent;
    border-bottom: 2px solid var(--border-color);
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
    padding: 16px;
}

.table-premium td {
    padding: 16px;
    vertical-align: middle;
    border-bottom: 1px solid #f0f2f5;
    color: var(--text-main);
    font-weight: 500;
}

.table-premium tbody tr {
    transition: var(--transition-fast);
}

.table-premium tbody tr:hover {
    background-color: #f8fbff;
}

/* Admin Sidebar */
.sidebar-premium {
    background: var(--text-main); /* Dark sleek */
    min-height: 100vh;
    box-shadow: 4px 0 20px rgba(0,0,0,0.05);
}

.sidebar-premium .sidebar-header {
    padding: 30px 24px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.sidebar-premium .sidebar-header h4 {
    color: white;
    font-weight: 700;
    font-size: 1.25rem;
    margin-bottom: 4px;
}

.sidebar-premium .nav-link {
    color: rgba(255,255,255,0.6);
    padding: 14px 24px;
    font-weight: 500;
    transition: var(--transition-base);
    border-radius: 0 20px 20px 0;
    margin-right: 16px;
    margin-top: 4px;
}

.sidebar-premium .nav-link:hover,
.sidebar-premium .nav-link.active {
    color: white;
    background: rgba(255,255,255,0.1);
    backdrop-filter: blur(10px);
}

.sidebar-premium .nav-link i {
    font-size: 1.1rem;
    margin-right: 12px;
}

/* Dashboard Stats */
.stat-card-premium {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    padding: 24px;
    display: flex;
    align-items: center;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-soft);
    transition: var(--transition-base);
}

.stat-card-premium:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.stat-card-premium .icon-wrapper {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    margin-right: 20px;
}

.stat-icon-primary { background: rgba(67, 24, 255, 0.1); color: #4318FF; }
.stat-icon-success { background: rgba(5, 205, 153, 0.1); color: #05CD99; }
.stat-icon-warning { background: rgba(255, 181, 71, 0.1); color: #FFB547; }
.stat-icon-info { background: rgba(57, 184, 255, 0.1); color: #39B8FF; }

.stat-content h6 {
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 8px;
    text-transform: uppercase;
}

.stat-content h2 {
    color: var(--text-main);
    font-size: 2rem;
    font-weight: 700;
    margin: 0;
}

/* Form Controls Premium */
.form-control-premium {
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
    padding: 12px 16px;
    font-size: 1rem;
    color: var(--text-main);
    background: #f8f9fc;
    transition: var(--transition-base);
}

.form-control-premium:focus {
    background: white;
    border-color: var(--primary-color, #4318FF);
    box-shadow: 0 0 0 4px rgba(67, 24, 255, 0.1);
    outline: none;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in-up {
    animation: fadeInUp 0.6s ease-out forwards;
}

/* Staggered items */
.stagger-1 { animation-delay: 0.1s; }
.stagger-2 { animation-delay: 0.2s; }
.stagger-3 { animation-delay: 0.3s; }
.stagger-4 { animation-delay: 0.4s; }

/* WhatsApp Floating Button */
.whatsapp-float {
    position: fixed;
    width: 60px;
    height: 60px;
    bottom: 40px;
    right: 40px;
    background-color: #25d366;
    color: #FFF !important;
    border-radius: 50px;
    text-align: center;
    font-size: 30px;
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.4);
    z-index: 1000;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.whatsapp-float:hover {
    transform: translateY(-5px) scale(1.05);
    background-color: #128C7E;
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.6);
}

@media screen and (max-width: 767px) {
    .whatsapp-float {
        width: 50px;
        height: 50px;
        bottom: 20px;
        right: 20px;
        font-size: 26px;
    }
}
