/* ==========================================
   🌐 DG ECOMMERCE — AGENCY PREMIUM UI SYSTEM
   Final Production CSS
========================================== */


/* =========================
   🌍 GLOBAL RESET + BASE
========================= */
* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    padding: 0;
    background: linear-gradient(180deg, #f8f9fa 0%, #ffffff 100%);
    font-family: 'Segoe UI', sans-serif;
    color: #212529;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

img {
    max-width: 100%;
    display: block;
}

a {
    text-decoration: none;
}


/* =========================
   🧭 NAVBAR SYSTEM
========================= */
.navbar {
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    backdrop-filter: blur(12px);
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.03);
    padding: 14px 0;
}

.navbar-brand {
    font-weight: 800;
    font-size: 1.55rem;
    letter-spacing: -0.5px;
    color: #111;
}

.navbar-brand:hover {
    color: #000;
}

.nav-link {
    font-weight: 500;
    color: #212529 !important;
    position: relative;
    transition: all 0.3s ease;
    margin: 0 8px;
}

.nav-link:hover {
    color: #000 !important;
}

.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    left: 0;
    bottom: -3px;
    background: #212529;
    transition: width 0.3s ease;
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

/* =========================
   🃏 GLOBAL CARD SYSTEM
========================= */
.card {
    border: none;
    border-radius: 22px;
    overflow: hidden;
    background: #ffffff;
    transition: all 0.35s ease;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.07);
}

.card:hover {
    transform: translateY(-10px);
    box-shadow: 0 22px 50px rgba(0, 0, 0, 0.14);
}


/* =========================
   ✨ HOVER UTILITY
========================= */
.hover-card {
    transition: all 0.3s ease;
}

.hover-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.12);
}


/* =========================
   🛍️ PRODUCT CARD SYSTEM
========================= */
.product-card {
    position: relative;
    border-radius: 24px;
}

.product-img {
    width: 100%;
    height: 270px;
    object-fit: cover;
    background: linear-gradient(180deg, #f8f9fa 0%, #ffffff 100%);
    padding: 18px;
    transition: transform 0.4s ease;
}

.product-card:hover .product-img {
    transform: scale(1.04);
}

.sale-badge {
    position: absolute;
    top: 16px;
    left: 16px;
    background: linear-gradient(135deg, #dc3545, #ff4d6d);
    color: #fff;
    padding: 7px 15px;
    border-radius: 50px;
    font-size: 12px;
    font-weight: 700;
    z-index: 5;
    box-shadow: 0 8px 18px rgba(220, 53, 69, 0.28);
}

.product-title {
    font-size: 1.08rem;
    font-weight: 700;
    min-height: 58px;
    line-height: 1.45;
    color: #111;
}

.product-title a {
    color: inherit;
    transition: color 0.3s ease;
}

.product-title a:hover {
    color: #000;
}

.product-price {
    font-size: 1.25rem;
    font-weight: 700;
    color: #198754;
}

.sale-price {
    color: #dc3545;
    font-weight: 600;
}

.old-price {
    color: #6c757d;
    text-decoration: line-through;
}


/* =========================
   🔘 BUTTON SYSTEM
========================= */
.btn {
    transition: all 0.3s ease;
    font-weight: 600;
    border-radius: 14px;
}

.btn-dark {
    background: linear-gradient(135deg, #212529, #000000);
    border: none;
    padding: 12px 18px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

.btn-dark:hover {
    transform: translateY(-2px);
}

.btn-outline-dark:hover,
.btn-outline-primary:hover,
.btn-outline-success:hover,
.btn-outline-secondary:hover {
    transform: translateY(-2px);
}

.add-cart-btn {
    padding: 13px;
    letter-spacing: 0.2px;
}


/* =========================
   📦 ADMIN PANEL CARDS
========================= */
.admin-card {
    border: none;
    border-radius: 22px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.07);
    transition: all 0.35s ease;
    background: #ffffff;
}

.admin-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.13);
}


/* =========================
   📋 TABLE SYSTEM
========================= */
.table {
    vertical-align: middle;
}

.table thead th {
    font-weight: 700;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.table-hover tbody tr:hover {
    background: rgba(0, 0, 0, 0.02);
}


/* =========================
   🏷️ BADGES
========================= */
.badge {
    font-weight: 600;
    letter-spacing: 0.3px;
}


/* =========================
   📄 FORM SYSTEM
========================= */
.form-control,
.form-select {
    border-radius: 14px;
    padding: 12px 14px;
    border: 1px solid #dee2e6;
    box-shadow: none;
}

.form-control:focus,
.form-select:focus {
    border-color: #212529;
    box-shadow: 0 0 0 0.15rem rgba(33, 37, 41, 0.08);
}


/* =========================
   📢 ALERTS
========================= */
.alert {
    border-radius: 18px;
    border: none;
}


/* =========================
   📌 PAGINATION
========================= */
.pagination .page-link {
    border: none;
    color: #212529;
    border-radius: 50px !important;
    margin: 0 4px;
    transition: all 0.3s ease;
}

.pagination .page-item.active .page-link {
    background: #212529;
    color: #fff;
}

.pagination .page-link:hover {
    transform: translateY(-2px);
}


/* =========================
   🦶 FOOTER
========================= */
footer {
    border-top: 1px solid rgba(0, 0, 0, 0.06);
    background: #ffffff;
}


/* =========================
   📱 RESPONSIVE SYSTEM
========================= */
@media (max-width: 1199px) {
    .product-img {
        height: 250px;
    }
}

@media (max-width: 991px) {
    .navbar-brand {
        font-size: 1.4rem;
    }

    .product-img {
        height: 235px;
    }
}

@media (max-width: 767px) {
    body {
        font-size: 15px;
    }

    .navbar {
        padding: 12px 0;
    }

    .navbar-brand {
        font-size: 1.3rem;
    }

    .product-img {
        height: 220px;
    }

    .product-title {
        min-height: auto;
        font-size: 1rem;
    }

    .btn-dark {
        padding: 11px 16px;
    }

    .card {
        border-radius: 18px;
    }
}

@media (max-width: 575px) {
    .product-img {
        height: 210px;
    }

    .sale-badge {
        font-size: 11px;
        padding: 6px 12px;
    }
}

#salesChart {
    height: 220px !important;
}