/* DigiMart — Mobile-First Responsive CSS */

:root {
    --primary: #6C5CE7;
    --primary-dark: #5A4BD1;
    --secondary: #00CEC9;
    --accent: #FD79A8;
    --dark: #2D3436;
    --darker: #1E272E;
    --light: #F8F9FA;
    --gray: #636E72;
    --light-gray: #B2BEC3;
    --white: #FFFFFF;
    --gradient-1: linear-gradient(135deg, #6C5CE7 0%, #A29BFE 100%);
    --gradient-2: linear-gradient(135deg, #00CEC9 0%, #81ECEC 100%);
    --gradient-3: linear-gradient(135deg, #FD79A8 0%, #FDCB6E 100%);
    --shadow-sm: 0 2px 10px rgba(0,0,0,0.08);
    --shadow-md: 0 5px 25px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 50px rgba(0,0,0,0.15);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-xl: 30px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ==================== BASE ==================== */
*, *::before, *::after { box-sizing: border-box; }

body {
    font-family: 'Inter', sans-serif;
    color: var(--dark);
    background-color: var(--light);
    line-height: 1.6;
    overflow-x: hidden;
}

a { text-decoration: none; color: inherit; transition: var(--transition); }
a:hover { color: var(--primary); }

img { max-width: 100%; height: auto; }

/* ==================== NAVBAR ==================== */
.navbar {
    padding: 12px 0;
    transition: var(--transition);
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-sm);
}

.navbar.scrolled {
    background: rgba(255,255,255,0.98);
    box-shadow: var(--shadow-md);
    padding: 8px 0;
}

.navbar-brand {
    font-weight: 800;
    font-size: 1.5rem;
    color: var(--primary) !important;
}

.navbar-brand span { color: var(--secondary); }

.nav-link {
    font-weight: 500;
    color: var(--dark) !important;
    padding: 8px 14px !important;
}

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

/* Mobile navbar background */
.navbar-collapse {
    background: white;
    border-radius: var(--radius-md);
    padding: 0;
}

@media (max-width: 991.98px) {
    .navbar-collapse.show,
    .navbar-collapse.collapsing {
        padding: 12px;
        margin-top: 8px;
        box-shadow: var(--shadow-md);
        border-radius: var(--radius-md);
    }
    .nav-link { padding: 10px 12px !important; border-radius: var(--radius-sm); }
    .navbar-brand { font-size: 1.4rem; }
    .navbar .d-flex { flex-wrap: wrap; gap: 8px !important; }
}

/* Cart Badge */
.cart-badge {
    position: absolute;
    top: -5px;
    right: -10px;
    background: var(--accent);
    color: var(--white);
    font-size: 0.65rem;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
}

/* ==================== BUTTONS ==================== */
.btn-primary-custom {
    background: var(--gradient-1);
    color: var(--white) !important;
    border: none;
    padding: 10px 24px;
    border-radius: var(--radius-xl);
    font-weight: 600;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-primary-custom:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(108,92,231,0.4);
}

.btn-secondary-custom {
    background: var(--white);
    color: var(--primary);
    border: 2px solid var(--primary);
    padding: 8px 22px;
    border-radius: var(--radius-xl);
    font-weight: 600;
    transition: var(--transition);
}

.btn-secondary-custom:hover {
    background: var(--primary);
    color: white;
}

/* ==================== HERO SECTION ==================== */
.hero-section {
    padding: 100px 0 70px;
    background: linear-gradient(135deg, #F8F9FA 0%, #E8E4FF 50%, #F0F9FF 100%);
}

.hero-title {
    font-size: 2.2rem;
    font-weight: 900;
    color: var(--darker);
    line-height: 1.2;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(108,92,231,0.1);
    color: var(--primary);
    padding: 6px 14px;
    border-radius: var(--radius-xl);
    font-weight: 600;
    font-size: 0.82rem;
    margin-bottom: 16px;
}

/* Small phones */
@media (max-width: 575.98px) {
    .hero-section { padding: 90px 0 50px; }
    .hero-title { font-size: 1.8rem; }
    .hero-section .d-flex.gap-3 { gap: 10px !important; }
    .hero-section .btn { width: 100%; justify-content: center; }
    .hero-section .d-flex.gap-4 { gap: 20px !important; }
}

/* Tablets */
@media (min-width: 576px) and (max-width: 991.98px) {
    .hero-title { font-size: 2.4rem; }
    .hero-section { padding: 110px 0 70px; }
}

/* Desktop */
@media (min-width: 992px) {
    .hero-title { font-size: 3.2rem; }
    .hero-section { padding: 140px 0 100px; }
}

/* ==================== SECTION HEADER ==================== */
.section-header {
    text-align: center;
    margin-bottom: 40px;
}

.section-title {
    font-size: 1.8rem;
    font-weight: 800;
}

.section-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(108,92,231,0.1);
    color: var(--primary);
    padding: 6px 16px;
    border-radius: var(--radius-xl);
    font-weight: 600;
    font-size: 0.85rem;
    margin-bottom: 12px;
}

@media (min-width: 768px) {
    .section-title { font-size: 2.2rem; }
    .section-header { margin-bottom: 50px; }
}

@media (min-width: 992px) {
    .section-title { font-size: 2.5rem; }
    .section-header { margin-bottom: 60px; }
}

/* ==================== PRODUCT CARD ==================== */
.product-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: var(--transition);
    border: 1px solid rgba(0,0,0,0.05);
    height: 100%;
}

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

.product-image {
    position: relative;
    overflow: hidden;
    height: 190px;
}

@media (min-width: 768px) {
    .product-image { height: 210px; }
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.product-image:hover img { transform: scale(1.05); }

.product-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    padding: 3px 10px;
    border-radius: var(--radius-xl);
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--white);
    z-index: 2;
}

.badge-new { background: var(--secondary); }
.badge-hot { background: var(--accent); }

.product-wishlist {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 34px;
    height: 34px;
    background: var(--white);
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
    z-index: 2;
}

.product-wishlist:hover { background: var(--accent); color: white; }

.product-info { padding: 16px; }

@media (min-width: 768px) {
    .product-info { padding: 20px; }
}

.product-category { font-size: 0.75rem; color: var(--primary); font-weight: 600; text-transform: uppercase; }
.product-title { font-size: 1rem; font-weight: 700; margin: 6px 0; line-height: 1.4; }
.product-price { font-size: 1.2rem; font-weight: 800; color: var(--primary); }

/* ==================== SEARCH FORM ==================== */
.search-form { position: relative; }

.search-form input {
    border: 2px solid var(--light-gray);
    border-radius: var(--radius-xl);
    padding: 8px 48px 8px 18px;
    width: 100%;
    max-width: 280px;
    transition: var(--transition);
    font-size: 0.9rem;
}

.search-form input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(108,92,231,0.15);
}

.search-form button {
    position: absolute;
    right: 4px;
    top: 50%;
    transform: translateY(-50%);
    background: var(--gradient-1);
    color: var(--white);
    border: none;
    border-radius: 50%;
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

/* ==================== FOOTER ==================== */
.footer {
    background: var(--darker);
    color: rgba(255,255,255,0.7);
    padding: 60px 0 30px;
    margin-top: 60px;
}

@media (min-width: 768px) {
    .footer { padding: 80px 0 30px; margin-top: 80px; }
}

.footer h5, .footer h4, .footer h6 { color: var(--white); font-weight: 700; margin-bottom: 16px; }

.footer-links { list-style: none; padding: 0; }
.footer-links li { margin-bottom: 8px; }
.footer-links a { color: rgba(255,255,255,0.6); transition: var(--transition); }
.footer-links a:hover { color: var(--secondary); padding-left: 5px; }

/* ==================== UTILITY ==================== */
.hover-primary:hover { color: var(--primary) !important; }

/* Pagination — make it touch-friendly */
.pagination .page-link { min-width: 40px; min-height: 40px; display: flex; align-items: center; justify-content: center; }

/* Mobile table helper */
@media (max-width: 767.98px) {
    .table-xs-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
}

/* ==================== FLOATING BUTTONS ==================== */
.floating-btn {
    position: fixed;
    right: 20px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1030;
    text-decoration: none;
    border: none;
}

.floating-btn:hover {
    transform: translateY(-5px) scale(1.05);
    color: white;
}

.whatsapp-btn {
    bottom: 20px;
    background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
}
.whatsapp-btn:hover {
    box-shadow: 0 8px 25px rgba(37,211,102,0.4);
}

.back-to-top {
    bottom: 85px;
    background: linear-gradient(135deg, var(--primary) 0%, #a29bfe 100%);
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
}
.back-to-top.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.back-to-top:hover {
    box-shadow: 0 8px 25px rgba(108,92,231,0.4);
}

@media (max-width: 575.98px) {
    .floating-btn { width: 45px; height: 45px; font-size: 1.3rem; right: 15px; }
    .whatsapp-btn { bottom: 15px; }
    .back-to-top { bottom: 75px; }
}
