
/* ========================================
   KINE NIN E-COMMERCE - Main Stylesheet
   www.kynenen.com | Phone: 01632-511239
   ======================================== */

:root {
    --primary: #1a5f7a;
    --primary-dark: #134b61;
    --secondary: #f97316;
    --secondary-dark: #ea580c;
    --accent: #7c3aed;
    --success: #22c55e;
    --danger: #ef4444;
    --warning: #f59e0b;
    --dark: #1e293b;
    --light: #f8fafc;
    --gray: #64748b;
    --gray-light: #e2e8f0;
    --white: #ffffff;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
    --radius: 12px;
    --radius-sm: 8px;
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Hind Siliguri', 'Noto Sans Bengali', 'Segoe UI', sans-serif;
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 50%, #f0fdf4 100%);
    color: var(--dark);
    min-height: 100vh;
    line-height: 1.6;
}

/* ===== Scrollbar ===== */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--gray-light); }
::-webkit-scrollbar-thumb { background: var(--primary); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--primary-dark); }

/* ===== Animations ===== */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes slideIn {
    from { transform: translateX(-100%); }
    to { transform: translateX(0); }
}
@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}
@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}
@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}
@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

.animate-fadeIn { animation: fadeIn 0.6s ease forwards; }
.animate-float { animation: float 3s ease-in-out infinite; }
.animate-bounce { animation: bounce 2s ease-in-out infinite; }

/* ===== Header ===== */
.header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: var(--white);
    padding: 12px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow-lg);
}

.header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    flex-wrap: wrap;
    gap: 10px;
}

.logo-section {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
}

.logo-section img {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--secondary);
    transition: var(--transition);
}

.logo-section:hover img {
    transform: rotate(10deg) scale(1.1);
}

.logo-text h1 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--white);
    text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
}

.logo-text span {
    font-size: 0.75rem;
    color: #cbd5e1;
    display: block;
}

.search-bar {
    flex: 1;
    max-width: 500px;
    position: relative;
}

.search-bar input {
    width: 100%;
    padding: 12px 45px 12px 20px;
    border: none;
    border-radius: 30px;
    font-size: 1rem;
    background: rgba(255,255,255,0.15);
    color: var(--white);
    backdrop-filter: blur(10px);
    transition: var(--transition);
}

.search-bar input::placeholder { color: rgba(255,255,255,0.6); }
.search-bar input:focus {
    background: rgba(255,255,255,0.25);
    outline: none;
    box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.3);
}

.search-bar button {
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    background: var(--secondary);
    border: none;
    padding: 8px 15px;
    border-radius: 20px;
    color: var(--white);
    cursor: pointer;
    transition: var(--transition);
}

.search-bar button:hover { background: var(--secondary-dark); transform: translateY(-50%) scale(1.05); }

.header-actions {
    display: flex;
    gap: 15px;
    align-items: center;
}

.header-btn {
    background: rgba(255,255,255,0.15);
    border: 1px solid rgba(255,255,255,0.2);
    color: var(--white);
    padding: 10px 18px;
    border-radius: 25px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    transition: var(--transition);
    backdrop-filter: blur(10px);
    text-decoration: none;
}

.header-btn:hover {
    background: var(--secondary);
    border-color: var(--secondary);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(249, 115, 22, 0.3);
}

.header-btn .badge {
    background: var(--danger);
    color: var(--white);
    font-size: 0.7rem;
    padding: 2px 6px;
    border-radius: 10px;
    font-weight: bold;
}

/* ===== Navigation ===== */
.nav-bar {
    background: linear-gradient(135deg, var(--primary-dark) 0%, #0f3a4d 100%);
    padding: 10px 0;
    border-top: 1px solid rgba(255,255,255,0.1);
}

.nav-links {
    display: flex;
    justify-content: center;
    gap: 30px;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    list-style: none;
    flex-wrap: wrap;
}

.nav-links a {
    color: rgba(255,255,255,0.85);
    text-decoration: none;
    font-weight: 500;
    padding: 8px 16px;
    border-radius: 20px;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 6px;
}

.nav-links a:hover, .nav-links a.active {
    color: var(--white);
    background: var(--secondary);
    box-shadow: 0 4px 12px rgba(249, 115, 22, 0.3);
}

/* ===== Hero Section ===== */
.hero {
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 50%, var(--secondary) 100%);
    padding: 60px 20px;
    text-align: center;
    color: var(--white);
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 1px, transparent 1px);
    background-size: 30px 30px;
    animation: shimmer 20s linear infinite;
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
    margin: 0 auto;
}

.hero h2 {
    font-size: 2.5rem;
    margin-bottom: 15px;
    text-shadow: 2px 2px 8px rgba(0,0,0,0.3);
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 30px;
    opacity: 0.9;
}

.hero-btns {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.btn {
    padding: 14px 32px;
    border-radius: 30px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--secondary) 0%, var(--secondary-dark) 100%);
    color: var(--white);
    box-shadow: 0 4px 15px rgba(249, 115, 22, 0.4);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(249, 115, 22, 0.5);
}

.btn-secondary {
    background: rgba(255,255,255,0.2);
    color: var(--white);
    border: 2px solid rgba(255,255,255,0.3);
    backdrop-filter: blur(10px);
}

.btn-secondary:hover {
    background: rgba(255,255,255,0.3);
    transform: translateY(-3px);
}

/* ===== Features Bar ===== */
.features-bar {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    max-width: 1200px;
    margin: -30px auto 40px;
    padding: 0 20px;
    position: relative;
    z-index: 2;
}

.feature-card {
    background: var(--white);
    padding: 25px 20px;
    border-radius: var(--radius);
    text-align: center;
    box-shadow: var(--shadow-lg);
    transition: var(--transition);
    border: 1px solid var(--gray-light);
}

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

.feature-card .icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 15px;
    font-size: 1.5rem;
    color: var(--white);
}

.feature-card:nth-child(1) .icon { background: linear-gradient(135deg, #f59e0b, #d97706); }
.feature-card:nth-child(2) .icon { background: linear-gradient(135deg, #22c55e, #16a34a); }
.feature-card:nth-child(3) .icon { background: linear-gradient(135deg, #3b82f6, #2563eb); }
.feature-card:nth-child(4) .icon { background: linear-gradient(135deg, #ec4899, #db2777); }
.feature-card:nth-child(5) .icon { background: linear-gradient(135deg, #8b5cf6, #7c3aed); }

.feature-card h4 {
    font-size: 1rem;
    color: var(--dark);
    margin-bottom: 5px;
}

.feature-card p {
    font-size: 0.85rem;
    color: var(--gray);
}

/* ===== Section Titles ===== */
.section-title {
    text-align: center;
    margin: 50px 0 30px;
}

.section-title h2 {
    font-size: 2rem;
    color: var(--dark);
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.section-title h2::after, .section-title h2::before {
    content: '';
    display: block;
    width: 50px;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    border-radius: 2px;
}

.section-title p {
    color: var(--gray);
    margin-top: 8px;
}

/* ===== Products Grid ===== */
.products-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
    margin-bottom: 50px;
}

.product-card {
    background: var(--white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    border: 1px solid var(--gray-light);
    position: relative;
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.12);
}

.product-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    background: linear-gradient(135deg, var(--danger), #dc2626);
    color: var(--white);
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    z-index: 2;
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.3);
}

.product-image {
    position: relative;
    height: 220px;
    overflow: hidden;
    background: linear-gradient(135deg, #f1f5f9, #e2e8f0);
}

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

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

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

.product-wishlist:hover {
    background: var(--danger);
    color: var(--white);
    transform: scale(1.1);
}

.product-info {
    padding: 20px;
}

.product-category {
    font-size: 0.75rem;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
    margin-bottom: 8px;
}

.product-name {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 8px;
    line-height: 1.4;
    height: 2.8em;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.product-rating {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-bottom: 12px;
}

.stars {
    color: #fbbf24;
    font-size: 0.9rem;
}

.rating-count {
    font-size: 0.8rem;
    color: var(--gray);
}

.product-price {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
}

.price-current {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--primary);
}

.price-original {
    font-size: 1rem;
    color: var(--gray);
    text-decoration: line-through;
}

.product-actions {
    display: flex;
    gap: 10px;
}

.btn-add-cart {
    flex: 1;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: var(--white);
    border: none;
    padding: 12px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.btn-add-cart:hover {
    background: linear-gradient(135deg, var(--secondary) 0%, var(--secondary-dark) 100%);
    transform: scale(1.02);
    box-shadow: 0 4px 12px rgba(249, 115, 22, 0.3);
}

.btn-buy-now {
    flex: 1;
    background: linear-gradient(135deg, var(--secondary) 0%, var(--secondary-dark) 100%);
    color: var(--white);
    border: none;
    padding: 12px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.btn-buy-now:hover {
    transform: scale(1.02);
    box-shadow: 0 4px 12px rgba(249, 115, 22, 0.4);
}

/* ===== Categories Section ===== */
.categories-section {
    max-width: 1200px;
    margin: 0 auto 50px;
    padding: 0 20px;
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
}

.category-item {
    background: var(--white);
    border-radius: var(--radius);
    padding: 25px 15px;
    text-align: center;
    box-shadow: var(--shadow);
    transition: var(--transition);
    cursor: pointer;
    border: 2px solid transparent;
}

.category-item:hover {
    transform: translateY(-5px);
    border-color: var(--secondary);
    box-shadow: 0 10px 30px rgba(249, 115, 22, 0.15);
}

.category-item .cat-icon {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 15px;
    font-size: 1.8rem;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: var(--white);
}

.category-item h4 {
    font-size: 1rem;
    color: var(--dark);
}

/* ===== Footer ===== */
.footer {
    background: linear-gradient(135deg, var(--dark) 0%, #0f172a 100%);
    color: var(--white);
    padding: 50px 20px 20px;
    margin-top: 60px;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
}

.footer-section h3 {
    font-size: 1.2rem;
    margin-bottom: 20px;
    color: var(--secondary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.footer-section p, .footer-section a {
    color: #94a3b8;
    text-decoration: none;
    line-height: 2;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 8px;
}

.footer-section a:hover {
    color: var(--secondary);
    padding-left: 5px;
}

.footer-bottom {
    max-width: 1200px;
    margin: 40px auto 0;
    padding-top: 20px;
    border-top: 1px solid rgba(255,255,255,0.1);
    text-align: center;
    color: #64748b;
    font-size: 0.9rem;
}

/* ===== Modal / Popup ===== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal {
    background: var(--white);
    border-radius: var(--radius);
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    padding: 35px;
    position: relative;
    transform: scale(0.9);
    transition: var(--transition);
    box-shadow: 0 25px 50px rgba(0,0,0,0.2);
}

.modal-overlay.active .modal {
    transform: scale(1);
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: var(--gray-light);
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.modal-close:hover {
    background: var(--danger);
    color: var(--white);
}

.modal h2 {
    text-align: center;
    margin-bottom: 25px;
    color: var(--dark);
    font-size: 1.5rem;
}

.modal-logo {
    text-align: center;
    margin-bottom: 20px;
}

.modal-logo img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: 3px solid var(--secondary);
}

/* ===== Forms ===== */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--dark);
    font-size: 0.9rem;
}

.form-group input, .form-group select, .form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--gray-light);
    border-radius: var(--radius-sm);
    font-size: 1rem;
    transition: var(--transition);
    font-family: inherit;
}

.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
    border-color: var(--primary);
    outline: none;
    box-shadow: 0 0 0 3px rgba(26, 95, 122, 0.1);
}

.form-group input.error {
    border-color: var(--danger);
}

.btn-full {
    width: 100%;
    justify-content: center;
}

.form-footer {
    text-align: center;
    margin-top: 20px;
    color: var(--gray);
    font-size: 0.9rem;
}

.form-footer a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
}

.form-footer a:hover { text-decoration: underline; }

/* ===== OTP Section ===== */
.otp-section {
    display: none;
}

.otp-section.active {
    display: block;
}

.otp-inputs {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin: 20px 0;
}

.otp-inputs input {
    width: 50px;
    height: 55px;
    text-align: center;
    font-size: 1.5rem;
    font-weight: bold;
    border: 2px solid var(--gray-light);
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

.otp-inputs input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(26, 95, 122, 0.1);
    outline: none;
}

.otp-timer {
    text-align: center;
    color: var(--gray);
    font-size: 0.9rem;
    margin-bottom: 15px;
}

.otp-timer span {
    color: var(--danger);
    font-weight: bold;
}

/* ===== Toast Notifications ===== */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 3000;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast {
    background: var(--white);
    border-radius: var(--radius-sm);
    padding: 15px 20px;
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 300px;
    animation: slideInRight 0.4s ease;
    border-left: 4px solid var(--primary);
}

.toast.success { border-left-color: var(--success); }
.toast.error { border-left-color: var(--danger); }
.toast.warning { border-left-color: var(--warning); }

@keyframes slideInRight {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

.toast-icon {
    font-size: 1.3rem;
}

.toast.success .toast-icon { color: var(--success); }
.toast.error .toast-icon { color: var(--danger); }
.toast.warning .toast-icon { color: var(--warning); }

/* ===== Cart Sidebar ===== */
.cart-sidebar {
    position: fixed;
    top: 0;
    right: -400px;
    width: 400px;
    max-width: 100%;
    height: 100%;
    background: var(--white);
    z-index: 2000;
    box-shadow: -5px 0 25px rgba(0,0,0,0.1);
    transition: right 0.4s ease;
    display: flex;
    flex-direction: column;
}

.cart-sidebar.active { right: 0; }

.cart-header {
    padding: 20px;
    border-bottom: 1px solid var(--gray-light);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cart-header h3 {
    display: flex;
    align-items: center;
    gap: 10px;
}

.cart-items {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

.cart-item {
    display: flex;
    gap: 15px;
    padding: 15px 0;
    border-bottom: 1px solid var(--gray-light);
}

.cart-item img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: var(--radius-sm);
}

.cart-item-info {
    flex: 1;
}

.cart-item-info h4 {
    font-size: 0.95rem;
    margin-bottom: 5px;
}

.cart-item-info .price {
    color: var(--primary);
    font-weight: 700;
}

.cart-item-qty {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
}

.cart-item-qty button {
    width: 28px;
    height: 28px;
    border: 1px solid var(--gray-light);
    background: var(--white);
    border-radius: 50%;
    cursor: pointer;
    transition: var(--transition);
}

.cart-item-qty button:hover {
    background: var(--primary);
    color: var(--white);
    border-color: var(--primary);
}

.cart-item-qty span {
    font-weight: 600;
    min-width: 20px;
    text-align: center;
}

.cart-footer {
    padding: 20px;
    border-top: 1px solid var(--gray-light);
    background: #f8fafc;
}

.cart-total {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
    font-size: 1.1rem;
}

.cart-total .amount {
    font-weight: 700;
    color: var(--primary);
    font-size: 1.3rem;
}

/* ===== Admin Panel ===== */
.admin-layout {
    display: flex;
    min-height: 100vh;
}

.admin-sidebar {
    width: 260px;
    background: linear-gradient(180deg, var(--dark) 0%, #0f172a 100%);
    color: var(--white);
    padding: 20px 0;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
}

.admin-logo {
    text-align: center;
    padding: 0 20px 20px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    margin-bottom: 20px;
}

.admin-logo img {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: 3px solid var(--secondary);
    margin-bottom: 10px;
}

.admin-logo h3 {
    font-size: 1.1rem;
}

.admin-logo p {
    font-size: 0.8rem;
    color: var(--gray);
}

.admin-nav {
    list-style: none;
    padding: 0 10px;
}

.admin-nav li {
    margin-bottom: 5px;
}

.admin-nav a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 15px;
    color: #94a3b8;
    text-decoration: none;
    border-radius: var(--radius-sm);
    transition: var(--transition);
    font-size: 0.95rem;
}

.admin-nav a:hover, .admin-nav a.active {
    background: var(--primary);
    color: var(--white);
}

.admin-nav a .badge {
    margin-left: auto;
    background: var(--secondary);
    color: var(--white);
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.75rem;
}

.admin-main {
    margin-left: 260px;
    flex: 1;
    padding: 30px;
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 50%, #f0fdf4 100%);
    min-height: 100vh;
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--gray-light);
}

.admin-header h2 {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--dark);
}

.admin-user {
    display: flex;
    align-items: center;
    gap: 10px;
}

.admin-user img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid var(--secondary);
}

/* ===== Stats Cards ===== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 25px;
    box-shadow: var(--shadow);
    border-left: 4px solid var(--primary);
    transition: var(--transition);
}

.stat-card:hover { transform: translateY(-3px); }

.stat-card:nth-child(2) { border-left-color: var(--secondary); }
.stat-card:nth-child(3) { border-left-color: var(--success); }
.stat-card:nth-child(4) { border-left-color: var(--accent); }
.stat-card:nth-child(5) { border-left-color: var(--warning); }

.stat-card h4 {
    font-size: 0.85rem;
    color: var(--gray);
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.stat-card .value {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--dark);
}

.stat-card .change {
    font-size: 0.85rem;
    margin-top: 5px;
}

.stat-card .change.up { color: var(--success); }
.stat-card .change.down { color: var(--danger); }

/* ===== Data Tables ===== */
.data-table {
    width: 100%;
    background: var(--white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    margin-bottom: 30px;
}

.data-table-header {
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--gray-light);
}

.data-table-header h3 {
    display: flex;
    align-items: center;
    gap: 8px;
}

.table-search {
    display: flex;
    gap: 10px;
}

.table-search input {
    padding: 8px 15px;
    border: 1px solid var(--gray-light);
    border-radius: 20px;
    font-size: 0.9rem;
}

table {
    width: 100%;
    border-collapse: collapse;
}

thead {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: var(--white);
}

th, td {
    padding: 15px;
    text-align: left;
    font-size: 0.9rem;
}

tbody tr {
    border-bottom: 1px solid var(--gray-light);
    transition: var(--transition);
}

tbody tr:hover { background: #f8fafc; }

.status-badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

.status-pending { background: #fef3c7; color: #92400e; }
.status-processing { background: #dbeafe; color: #1e40af; }
.status-completed { background: #d1fae5; color: #065f46; }
.status-cancelled { background: #fee2e2; color: #991b1b; }

.action-btns {
    display: flex;
    gap: 5px;
}

.action-btn {
    padding: 6px 12px;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 0.8rem;
    transition: var(--transition);
}

.action-btn.view { background: #dbeafe; color: #1e40af; }
.action-btn.edit { background: #fef3c7; color: #92400e; }
.action-btn.delete { background: #fee2e2; color: #991b1b; }

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

/* ===== Customer Dashboard ===== */
.dashboard-layout {
    display: flex;
    min-height: 100vh;
}

.dashboard-sidebar {
    width: 250px;
    background: var(--white);
    border-right: 1px solid var(--gray-light);
    padding: 20px 0;
    position: fixed;
    height: 100vh;
}

.dashboard-sidebar .user-profile {
    text-align: center;
    padding: 0 20px 20px;
    border-bottom: 1px solid var(--gray-light);
    margin-bottom: 20px;
}

.user-profile img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: 3px solid var(--primary);
    margin-bottom: 10px;
}

.user-profile h4 {
    font-size: 1rem;
    color: var(--dark);
}

.user-profile p {
    font-size: 0.85rem;
    color: var(--gray);
}

.dashboard-nav {
    list-style: none;
    padding: 0 10px;
}

.dashboard-nav li { margin-bottom: 5px; }

.dashboard-nav a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 15px;
    color: var(--gray);
    text-decoration: none;
    border-radius: var(--radius-sm);
    transition: var(--transition);
    font-size: 0.9rem;
}

.dashboard-nav a:hover, .dashboard-nav a.active {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: var(--white);
}

.dashboard-main {
    margin-left: 250px;
    flex: 1;
    padding: 30px;
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 50%, #f0fdf4 100%);
    min-height: 100vh;
}

.dashboard-card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 25px;
    box-shadow: var(--shadow);
    margin-bottom: 25px;
}

.dashboard-card h3 {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--gray-light);
    display: flex;
    align-items: center;
    gap: 10px;
}

.order-card {
    border: 1px solid var(--gray-light);
    border-radius: var(--radius-sm);
    padding: 20px;
    margin-bottom: 15px;
    transition: var(--transition);
}

.order-card:hover {
    box-shadow: var(--shadow);
    border-color: var(--primary);
}

.order-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.order-header .order-id {
    font-weight: 700;
    color: var(--primary);
}

.order-items {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.order-item-thumb {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    background: #f8fafc;
    border-radius: var(--radius-sm);
}

.order-item-thumb img {
    width: 40px;
    height: 40px;
    object-fit: cover;
    border-radius: 4px;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
    .header-top { flex-direction: column; }
    .search-bar { max-width: 100%; width: 100%; }
    .hero h2 { font-size: 1.8rem; }
    .products-grid { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
    .admin-sidebar { width: 200px; }
    .admin-main { margin-left: 200px; padding: 15px; }
    .dashboard-sidebar { width: 200px; }
    .dashboard-main { margin-left: 200px; padding: 15px; }
    .cart-sidebar { width: 100%; }
}

@media (max-width: 576px) {
    .products-grid { grid-template-columns: 1fr; }
    .admin-layout { flex-direction: column; }
    .admin-sidebar { width: 100%; position: relative; height: auto; }
    .admin-main { margin-left: 0; }
    .dashboard-layout { flex-direction: column; }
    .dashboard-sidebar { width: 100%; position: relative; height: auto; }
    .dashboard-main { margin-left: 0; }
}

/* ===== Loading Spinner ===== */
.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--gray-light);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 20px auto;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ===== Cover Banner ===== */
.cover-banner {
    width: 100%;
    max-height: 400px;
    overflow: hidden;
    border-radius: 0 0 var(--radius) var(--radius);
    position: relative;
}

.cover-banner img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ===== Product Detail Modal ===== */
.product-detail {
    display: flex;
    gap: 30px;
}

.product-detail-image {
    flex: 1;
    max-width: 300px;
}

.product-detail-image img {
    width: 100%;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.product-detail-info {
    flex: 1;
}

.product-detail-info h2 {
    font-size: 1.5rem;
    margin-bottom: 10px;
}

.product-detail-info .price {
    font-size: 1.8rem;
    color: var(--primary);
    font-weight: 700;
    margin: 15px 0;
}

.product-detail-info .description {
    color: var(--gray);
    line-height: 1.8;
    margin-bottom: 20px;
}

.quantity-selector {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 20px 0;
}

.quantity-selector button {
    width: 36px;
    height: 36px;
    border: 2px solid var(--gray-light);
    background: var(--white);
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2rem;
    transition: var(--transition);
}

.quantity-selector button:hover {
    background: var(--primary);
    color: var(--white);
    border-color: var(--primary);
}

.quantity-selector input {
    width: 60px;
    text-align: center;
    padding: 8px;
    border: 2px solid var(--gray-light);
    border-radius: var(--radius-sm);
    font-weight: 600;
}

/* ===== Checkout Page ===== */
.checkout-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 30px 20px;
}

.checkout-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

@media (max-width: 768px) {
    .checkout-grid { grid-template-columns: 1fr; }
    .product-detail { flex-direction: column; }
}

/* ===== Order Success ===== */
.order-success {
    text-align: center;
    padding: 50px 20px;
}

.order-success .icon {
    width: 100px;
    height: 100px;
    background: linear-gradient(135deg, var(--success), #16a34a);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 25px;
    font-size: 3rem;
    color: var(--white);
    animation: pulse 2s ease-in-out infinite;
}

.order-success h2 {
    font-size: 2rem;
    color: var(--dark);
    margin-bottom: 15px;
}

.order-success p {
    color: var(--gray);
    margin-bottom: 25px;
    font-size: 1.1rem;
}

.order-details-box {
    background: #f8fafc;
    border-radius: var(--radius);
    padding: 25px;
    max-width: 500px;
    margin: 0 auto 25px;
    text-align: left;
}

.order-details-box .detail-row {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid var(--gray-light);
}

.order-details-box .detail-row:last-child {
    border-bottom: none;
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--primary);
}

/* ===== Admin Login ===== */
.admin-login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 50%, var(--secondary) 100%);
    padding: 20px;
}

.admin-login-box {
    background: var(--white);
    border-radius: var(--radius);
    padding: 40px;
    width: 100%;
    max-width: 420px;
    box-shadow: 0 25px 50px rgba(0,0,0,0.2);
}

.admin-login-box .logo {
    text-align: center;
    margin-bottom: 30px;
}

.admin-login-box .logo img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: 3px solid var(--secondary);
    margin-bottom: 15px;
}

.admin-login-box h2 {
    text-align: center;
    color: var(--dark);
    margin-bottom: 5px;
}

.admin-login-box p {
    text-align: center;
    color: var(--gray);
    margin-bottom: 25px;
    font-size: 0.9rem;
}
