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

/* ============================================================
   ROOT VARIABLES
============================================================ */
:root {
    /* These will be inherited from the dynamic :root in header.php */
    --primary-dark: #1d4ed8;
    --success: #16a34a;
    --danger: #dc2626;
    --warning: #d97706;
    --light: #f8fafc;
    --dark: #1e293b;
    --border: #e2e8f0;
    --text-muted: #94a3b8;

    --font-primary: 'Jost', sans-serif;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, .1);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, .1);
    --shadow-lg: 0 10px 25px -3px rgba(0, 0, 0, .1);
    --shadow-xl: 0 20px 50px rgba(0, 0, 0, .15);

    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-full: 9999px;

    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ============================================================
   GLOBAL RESET
============================================================ */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-primary);
    color: var(--dark);
    line-height: 1.6;
    font-weight: 300;
}

h1,
h2,
h3,
h4,
h5,
h6,
.section-title {
    font-family: var(--font-primary);
    font-weight: 400 !important;
    letter-spacing: 0.5px;
}

.navbar-nav .nav-link {
    font-family: var(--font-primary);
    font-weight: 600 !important;
}

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

a {
    text-decoration: none;
    transition: var(--transition);
}

.announcementSwiper {
    height: 36px;
    line-height: 36px;
    overflow: hidden;
}

.hover-zoom:hover {
    transform: scale(1.05);
}

/* ============================================================
   PRODUCT CARD
============================================================ */
.product-card {
    background: #fff;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    border: 1px solid var(--border);
    position: relative;
    height: 100%;
    display: flex;
    flex-direction: column;
}

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

.product-card .card-img-wrapper {
    overflow: hidden;
    position: relative;
    aspect-ratio: 1/1;
    background: #f8fafc;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-card .card-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    padding: 0;
    transition: transform 0.6s ease, opacity 0.5s ease;
}

.product-card .card-img-wrapper .hover-img {
    position: absolute;
    top: 0;
    left: 0;
    opacity: 0;
}

.product-card.has-hover:hover .card-img-wrapper .main-img {
    opacity: 0;
}

.product-card.has-hover:hover .card-img-wrapper .hover-img {
    opacity: 1;
}

.product-card:hover .card-img-wrapper img {
    transform: scale(1.1);
}

.product-actions {
    position: absolute;
    top: 15px;
    right: 15px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    opacity: 0;
    transform: translateX(20px);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 10;
}

.product-card:hover .product-actions {
    opacity: 1;
    transform: translateX(0);
}

.btn-wishlist,
.btn-quickview {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #fff;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-md);
    color: var(--dark);
    cursor: pointer;
    transition: var(--transition);
    font-size: 16px;
}

.btn-wishlist:hover {
    color: #ef4444;
    background: #fff;
}

.btn-wishlist.active i {
    color: #ef4444 !important;
}

.btn-quickview:hover {
    background: var(--primary);
    color: #fff;
}

.product-card .card-body {
    padding: 15px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    text-align: left;
}

.product-card .product-category {
    font-size: 9px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 700;
    margin-bottom: 4px;
}

.product-card .product-name {
    font-size: 13px;
    font-weight: 500;
    color: var(--dark);
    margin: 0;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: var(--transition);
}

.product-card .product-name:hover {
    color: var(--primary);
}

.product-card .star-rating {
    color: #f59e0b;
    font-size: 10px;
    display: flex;
    align-items: center;
    gap: 1px;
}

.product-card .price-group {
    margin-top: auto;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.product-card .price-current {
    font-size: 16px;
    font-weight: 700;
    color: var(--dark);
}

.product-card .price-old {
    font-size: 13px;
    text-decoration: line-through;
    color: var(--text-muted);
    font-weight: 400;
}

/* ============================================================
   BUTTONS
============================================================ */
.btn-primary {
    background: var(--primary);
    border-color: var(--primary);
    font-weight: 600;
    padding: 10px 24px;
    border-radius: var(--radius-md);
    transition: var(--transition);
}

.btn-primary:hover {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
    transform: translateY(-2px);
}

.btn-add-cart {
    width: 100%;
    padding: 10px;
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: var(--radius-md);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-add-cart:hover {
    background: var(--primary-dark);
}

.btn-add-cart.loading {
    opacity: 0.7;
    cursor: not-allowed;
}

/* ============================================================
   NAVBAR ICONS
============================================================ */
.nav-icon-btn {
    position: relative;
    color: var(--dark);
    transition: var(--transition);
    display: flex;
    align-items: center;
}

.nav-icon-btn:hover {
    color: var(--primary);
}

.badge-count {
    position: absolute;
    top: -8px;
    right: -8px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--primary);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ============================================================
   HERO SLIDER
============================================================ */
.hero-section {
    background: transparent !important;
}

.hero-section .heroSwiper,
.hero-section .swiper,
.hero-section .swiper-wrapper,
.hero-section .swiper-slide {
    background: transparent;
}

.hero-slider {
    position: relative;
    overflow: hidden;
}

.hero-slide {
    height: 450px;
    display: flex;
    align-items: center;
    background-size: 100% 100%;
    background-position: center;
    background-color: transparent !important;
    position: relative;
}

.hero-slide::before,
.hero-slide::after {
    display: none !important;
    content: none !important;
}

.hero-content {
    position: relative;
    z-index: 2;
}

.hero-title {
    font-size: clamp(2rem, 5vw, 4rem);
    font-weight: 800;
    line-height: 1.1;
}

.hero-subtitle {
    font-size: clamp(1rem, 2vw, 1.3rem);
    opacity: 0.9;
}

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

.section-tag {
    display: inline-block;
    background: rgba(37, 99, 235, 0.1);
    color: var(--primary);
    padding: 6px 16px;
    border-radius: var(--radius-full);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-bottom: 12px;
}

.section-title {
    font-size: clamp(1.8rem, 4vw, 2.8rem);
    font-weight: 800;
    color: var(--dark);
}

.section-divider {
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), #60a5fa);
    border-radius: var(--radius-full);
    margin: 16px auto 0;
}

/* ============================================================
   ADMIN SIDEBAR
============================================================ */
.admin-sidebar {
    width: 260px;
    min-height: 100vh;
    background: linear-gradient(180deg, #1e293b 0%, #0f172a 100%);
    position: fixed;
    left: 0;
    top: 0;
    z-index: 1000;
    transition: var(--transition);
    overflow-y: auto;
}

.admin-sidebar .sidebar-brand {
    padding: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.admin-sidebar .nav-link {
    color: rgba(255, 255, 255, 0.7);
    padding: 12px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 500;
    border-left: 3px solid transparent;
    transition: var(--transition);
}

.admin-sidebar .nav-link:hover,
.admin-sidebar .nav-link.active {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
    border-left-color: var(--primary);
}

.admin-sidebar .nav-link i {
    width: 20px;
    text-align: center;
    font-size: 16px;
}

.admin-content {
    margin-left: 260px;
    min-height: 100vh;
    background: #f1f5f9;
    transition: var(--transition);
}

.admin-topbar {
    background: #fff;
    padding: 15px 25px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 100;
}

.admin-page {
    padding: 25px;
}

/* ============================================================
   STAT CARDS (Admin Dashboard)
============================================================ */
.stat-card {
    background: #fff;
    border-radius: 12px;
    padding: 15px;
    border: 1px solid #f1f5f9;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    height: 100%;
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.05);
}

.stat-card .stat-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    margin-bottom: 12px;
}

.stat-card .stat-value {
    font-size: 20px;
    font-weight: 800;
    color: #1e293b;
    margin-bottom: 2px;
}

.stat-card .stat-label {
    font-size: 12px;
    color: #64748b;
    font-weight: 500;
    margin-bottom: 0 !important;
}

.stat-card .stat-trend {
    font-size: 12px;
    font-weight: 600;
}

.trend-up {
    color: var(--success);
}

.trend-down {
    color: var(--danger);
}

/* ============================================================
   FOOTER ENHANCEMENTS
============================================================ */
.social-btn {
    width: 35px;
    height: 35px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: #fff !important;
    transition: var(--transition);
    text-decoration: none !important;
}

.social-btn.fb {
    background: #1877F2;
}

.social-btn.ig {
    background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
}

.social-btn.tk {
    background: #000000;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.social-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    opacity: 0.9;
}

.payment-methods img {
    height: 25px !important;
    width: auto;
    object-fit: contain;
    background: #fff;
    padding: 2px 5px;
    border-radius: 3px;
    transition: var(--transition);
}

.payment-methods img:hover {
    transform: scale(1.1);
}

.payment-badge {
    padding: 0 8px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    display: inline-flex;
    align-items: center;
    height: 25px;
    letter-spacing: 0.5px;
}

.payment-badge.jc {
    background: #f00;
    color: #fff;
    border: 1px solid #ff0;
}

/* JazzCash style */
.social-btn.wa {
    background: #25D366;
}

.social-btn-small {
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: #fff !important;
    font-size: 12px;
    transition: var(--transition);
    text-decoration: none !important;
}

.social-btn-small.fb {
    background-color: #1877F2 !important;
}

.social-btn-small.ig {
    background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%) !important;
}

.social-btn-small.tk {
    background-color: #000000 !important;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.social-btn-small.wa {
    background-color: #25D366 !important;
}

.social-btn-small:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    opacity: 0.9;
}

/* Scrollbar Hide Utility */
.custom-scrollbar-hide::-webkit-scrollbar {
    display: none;
}

.custom-scrollbar-hide {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

/* Footer Link Hover Effect */
.hover-primary {
    transition: all 0.3s ease !important;
}

.hover-primary:hover {
    color: #0d6efd !important;
    padding-left: 8px !important;
}

/* Floating WhatsApp Button */
.wa-float-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 44px;
    height: 44px;
    background-color: #25D366;
    color: #fff !important;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    z-index: 999;
    transition: all 0.3s ease;
    text-decoration: none !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.wa-float-btn:hover {
    transform: scale(1.1);
    background-color: #20BA5A;
}

/* Pulsing effect */
.wa-float-btn::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 2px solid #25D366;
    animation: wa-pulse 2s infinite;
}

@keyframes wa-pulse {
    0% {
        transform: scale(1);
        opacity: 1;
    }

    100% {
        transform: scale(1.6);
        opacity: 0;
    }
}

@media (max-width: 576px) {
    .wa-float-btn {
        bottom: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
        font-size: 24px;
    }
}

/* Cart Dropdown Hover */
.cart-dropdown:hover .dropdown-menu {
    display: block;
    animation: fadeInUp 0.3s ease-out;
}

.cart-dropdown .dropdown-menu::before {
    content: '';
    position: absolute;
    top: -20px;
    left: 0;
    width: 100%;
    height: 20px;
    background: transparent;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.cart-items-list::-webkit-scrollbar {
    width: 4px;
}

.cart-items-list::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.cart-items-list::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 10px;
}

/* Header Dropdown Hover */
@media (min-width: 992px) {
    .navbar .nav-item.dropdown:hover .dropdown-menu {
        display: block;
        animation: fadeInUp 0.3s ease-out;
    }

    .navbar .nav-item.dropdown .dropdown-menu {
        margin-top: 0;
    }
}