/* ============================================================
   NEW DEV ENTERPRISES - Production CSS Stylesheet
   Modern, Clean, Responsive & Premium Electronics Visual Identity
   ============================================================ */

:root {
    --primary-navy: #0f172a;
    --secondary-navy: #1e293b;
    --accent-blue: #2563eb;
    --accent-blue-hover: #1d4ed8;
    --accent-cyan: #06b6d4;
    --accent-green: #10b981;
    --whatsapp-green: #25d366;
    --whatsapp-hover: #128c7e;
    --light-bg: #f8fafc;
    --card-bg: #ffffff;
    --text-main: #1e293b;
    --text-muted: #64748b;
    --border-color: #e2e8f0;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 18px;
    --shadow-sm: 0 2px 4px rgba(15, 23, 42, 0.04);
    --shadow-md: 0 10px 25px -5px rgba(15, 23, 42, 0.08), 0 8px 10px -6px rgba(15, 23, 42, 0.04);
    --shadow-lg: 0 20px 35px -10px rgba(15, 23, 42, 0.12);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

body {
    font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--light-bg);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Outfit', 'Inter', sans-serif;
    font-weight: 700;
    color: var(--primary-navy);
}

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

a:hover {
    color: var(--accent-blue-hover);
}

/* --- Announcement Bar --- */
.top-announcement-bar {
    background: linear-gradient(90deg, var(--primary-navy) 0%, var(--secondary-navy) 100%);
    color: #e2e8f0;
    font-size: 0.85rem;
    padding: 7px 0;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.top-announcement-bar i {
    color: var(--accent-cyan);
}

/* --- Header / Navigation --- */
.main-header {
    background-color: #ffffff;
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 1030;
    transition: var(--transition);
}

.brand-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--primary-navy);
    letter-spacing: -0.5px;
}

.brand-logo i {
    font-size: 1.6rem;
    color: var(--accent-blue);
    background: linear-gradient(135deg, var(--accent-blue), var(--accent-cyan));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.brand-logo span.highlight {
    color: var(--accent-blue);
}

.header-search-form {
    position: relative;
    width: 100%;
    max-width: 450px;
    transition: var(--transition);
}

.header-search-form .form-control {
    border-radius: 50px;
    padding-left: 20px;
    padding-right: 52px;
    height: 48px;
    border: 1.5px solid var(--border-color);
    background-color: #f8fafc;
    font-size: 0.9rem;
    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.04);
}

.header-search-form .form-control:focus {
    background-color: #ffffff;
    border-color: var(--accent-blue);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.15), 0 4px 12px rgba(37, 99, 235, 0.08);
}

.header-search-form .btn-search {
    position: absolute;
    right: 4px;
    top: 50%;
    transform: translateY(-50%);
    border: none;
    background: linear-gradient(135deg, var(--accent-blue), var(--accent-blue-hover));
    color: #fff;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.3);
    transition: var(--transition);
}

.header-search-form .btn-search:hover {
    transform: translateY(-50%) scale(1.05);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.4);
}

.search-results-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #ffffff;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    z-index: 1080;
    max-height: 360px;
    overflow-y: auto;
    display: none;
    margin-top: 6px;
    border: 1px solid var(--border-color);
}

.search-result-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-main);
    transition: var(--transition);
}

.search-result-item:last-child {
    border-bottom: none;
}

.search-result-item:hover {
    background-color: #f1f5f9;
}

.search-result-item img {
    width: 44px;
    height: 44px;
    object-fit: cover;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
}

/* Mobile Specific Header & Search Styling */
@media (max-width: 991.98px) {
    .header-search-form {
        max-width: 100% !important;
        margin-top: 10px !important;
        margin-bottom: 4px !important;
    }

    .header-search-form .form-control {
        height: 48px;
        font-size: 0.92rem;
        background-color: #ffffff;
        border-color: #cbd5e1;
        padding-left: 18px;
    }

    .header-search-form .btn-search {
        width: 44px;
        height: 44px;
        right: 2px;
    }

    .brand-logo {
        font-size: 1.15rem;
    }

    .brand-logo img {
        max-height: 34px !important;
    }
}

/* --- Hero Banner --- */
.hero-section {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 60%, #1e40af 100%);
    color: #ffffff;
    padding: 80px 0;
    position: relative;
    overflow: hidden;
}

.hero-section::after {
    content: '';
    position: absolute;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(6,182,212,0.15) 0%, rgba(0,0,0,0) 70%);
    top: -100px;
    right: -100px;
    border-radius: 50%;
}

.hero-badge {
    display: inline-block;
    background: rgba(37, 99, 235, 0.2);
    border: 1px solid rgba(6, 182, 212, 0.4);
    color: var(--accent-cyan);
    padding: 6px 16px;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 20px;
}

.hero-title {
    font-size: 2.8rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 15px;
    color: #ffffff;
}

.hero-subtitle {
    font-size: 1.15rem;
    color: #94a3b8;
    margin-bottom: 30px;
    max-width: 600px;
}

.btn-hero-primary {
    background: linear-gradient(135deg, var(--accent-blue), #1d4ed8);
    color: #ffffff;
    padding: 12px 28px;
    border-radius: 50px;
    font-weight: 600;
    border: none;
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.4);
}

.btn-hero-primary:hover {
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(37, 99, 235, 0.5);
}

.btn-hero-whatsapp {
    background: var(--whatsapp-green);
    color: #ffffff;
    padding: 12px 28px;
    border-radius: 50px;
    font-weight: 600;
    border: none;
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.3);
}

.btn-hero-whatsapp:hover {
    color: #ffffff;
    background: var(--whatsapp-hover);
    transform: translateY(-2px);
}

/* --- Section Titles --- */
.section-title-wrap {
    margin-bottom: 40px;
    text-align: center;
}

.section-title {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 10px;
}

.section-subtitle {
    color: var(--text-muted);
    font-size: 1rem;
}

/* --- Category Cards --- */
.category-card {
    background: #ffffff;
    border-radius: var(--radius-md);
    padding: 25px 20px;
    text-align: center;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
    border-color: var(--accent-blue);
}

.category-icon-box {
    width: 65px;
    height: 65px;
    border-radius: 50%;
    background: rgba(37, 99, 235, 0.08);
    color: var(--accent-blue);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    margin-bottom: 15px;
    transition: var(--transition);
}

.category-card:hover .category-icon-box {
    background: var(--accent-blue);
    color: #ffffff;
}

.category-card h5 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 5px;
}

/* --- Product Cards --- */
.product-card {
    background: #ffffff;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    transition: var(--transition);
    height: 100%;
    display: flex;
    flex-direction: column;
    position: relative;
}

.product-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
    border-color: rgba(37, 99, 235, 0.3);
}

.product-card-img-wrap {
    position: relative;
    width: 100%;
    padding-top: 80%; /* 4:3 Aspect ratio */
    overflow: hidden;
    background-color: #f1f5f9;
}

.product-card-img-wrap img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

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

.badge-featured {
    position: absolute;
    top: 12px;
    left: 12px;
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: #fff;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    z-index: 2;
}

.badge-stock {
    position: absolute;
    top: 12px;
    right: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 4px;
    z-index: 2;
}

.badge-in-stock {
    background: #dcfce7;
    color: #15803d;
}

.badge-out-stock {
    background: #fee2e2;
    color: #b91c1c;
}

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

.product-category-name {
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--accent-blue);
    margin-bottom: 6px;
}

.product-title {
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 8px;
    line-height: 1.4;
    color: var(--primary-navy);

    /* Clamp text to 2 lines */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-short-desc {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 15px;
    line-height: 1.4;

    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-price-wrap {
    margin-top: auto;
    margin-bottom: 15px;
    display: flex;
    align-items: baseline;
    gap: 8px;
}

.current-price {
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--primary-navy);
}

.original-price {
    font-size: 0.9rem;
    color: #475569;
    text-decoration: line-through;
}

.discount-badge {
    font-size: 0.75rem;
    font-weight: 700;
    color: #16a34a;
    background: #dcfce7;
    padding: 2px 6px;
    border-radius: 4px;
}

.product-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.btn-details {
    background: #f1f5f9;
    color: var(--primary-navy);
    font-size: 0.85rem;
    font-weight: 600;
    border-radius: var(--radius-sm);
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    border: 1px solid var(--border-color);
}

.btn-details:hover {
    background: var(--primary-navy);
    color: #ffffff;
}

.btn-whatsapp-sm {
    background: var(--whatsapp-green);
    color: #ffffff;
    font-size: 0.85rem;
    font-weight: 600;
    border-radius: var(--radius-sm);
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    border: none;
}

.btn-whatsapp-sm:hover {
    background: var(--whatsapp-hover);
    color: #ffffff;
}

/* --- Features Banner / Why Choose Us --- */
.why-us-card {
    background: #ffffff;
    border-radius: var(--radius-md);
    padding: 30px 20px;
    text-align: center;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    height: 100%;
}

.why-us-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 20px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(37,99,235,0.1), rgba(6,182,212,0.1));
    color: var(--accent-blue);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
}

/* --- Floating WhatsApp Button --- */
.whatsapp-float {
    position: fixed;
    bottom: 30px;
    left: 30px;
    width: 58px;
    height: 58px;
    background-color: var(--whatsapp-green);
    color: #ffffff;
    border-radius: 50px;
    text-align: center;
    font-size: 30px;
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.4);
    z-index: 1040;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    animation: pulse-whatsapp 2s infinite;
}

.whatsapp-float:hover {
    color: #ffffff;
    transform: scale(1.1);
    background-color: var(--whatsapp-hover);
}

@keyframes pulse-whatsapp {
    0% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.7); }
    70% { box-shadow: 0 0 0 15px rgba(37, 211, 102, 0); }
    100% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0); }
}

/* --- Floating Live Chat Widget --- */
.chat-float-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 58px;
    height: 58px;
    background: linear-gradient(135deg, var(--accent-blue), var(--accent-cyan));
    color: #ffffff;
    border-radius: 50px;
    border: none;
    font-size: 24px;
    box-shadow: 0 4px 18px rgba(37, 99, 235, 0.4);
    z-index: 1040;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.chat-float-btn:hover {
    transform: scale(1.08);
}

.chatbox-window {
    position: fixed;
    bottom: 100px;
    right: 30px;
    width: 360px;
    max-width: calc(100vw - 40px);
    background: #ffffff;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-color);
    z-index: 1050;
    display: none;
    flex-direction: column;
    overflow: hidden;
    transition: var(--transition);
}

.chatbox-header {
    background: linear-gradient(135deg, var(--primary-navy), var(--secondary-navy));
    color: #ffffff;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.chatbox-header-title {
    display: flex;
    align-items: center;
    gap: 10px;
}

.chatbox-header-title h6 {
    color: #ffffff;
    margin: 0;
    font-size: 0.95rem;
}

.chatbox-header-title small {
    color: var(--accent-cyan);
    font-size: 0.75rem;
}

.chatbox-close {
    background: transparent;
    border: none;
    color: #94a3b8;
    font-size: 1.2rem;
    cursor: pointer;
    min-width: 44px;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
}

.chatbox-close:hover {
    color: #ffffff;
}

.chatbox-body {
    padding: 20px;
    max-height: 380px;
    overflow-y: auto;
}

.chat-msg-received {
    background: var(--light-bg);
    border: 1px solid var(--border-color);
    padding: 12px 15px;
    border-radius: 14px 14px 14px 2px;
    font-size: 0.88rem;
    margin-bottom: 15px;
    color: var(--text-main);
}

.chat-form .form-group {
    margin-bottom: 12px;
}

.chat-form .form-control {
    font-size: 0.88rem;
    border-radius: var(--radius-sm);
}

.btn-chat-send {
    background: var(--accent-blue);
    color: #ffffff;
    width: 100%;
    padding: 10px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.9rem;
    border: none;
}

.btn-chat-send:hover {
    background: var(--accent-blue-hover);
}

/* --- Product Details Page --- */
.product-gallery-main {
    width: 100%;
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 1px solid var(--border-color);
    background: #ffffff;
}

.product-gallery-main img {
    width: 100%;
    max-height: 480px;
    object-fit: contain;
}

.product-gallery-thumbs {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.thumb-img {
    width: 75px;
    height: 75px;
    border-radius: var(--radius-sm);
    border: 2px solid var(--border-color);
    object-fit: cover;
    cursor: pointer;
    transition: var(--transition);
}

.thumb-img.active, .thumb-img:hover {
    border-color: var(--accent-blue);
}

.specs-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
}

.specs-table th, .specs-table td {
    padding: 10px 15px;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.9rem;
}

.specs-table th {
    width: 35%;
    background-color: var(--light-bg);
    color: var(--text-muted);
    font-weight: 600;
}

/* --- Admin Panel Aesthetics --- */
.admin-sidebar {
    min-height: 100vh;
    background: var(--primary-navy);
    color: #94a3b8;
}

.admin-sidebar .nav-link {
    color: #94a3b8;
    padding: 12px 20px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 12px;
    border-left: 4px solid transparent;
    transition: var(--transition);
}

.admin-sidebar .nav-link:hover, .admin-sidebar .nav-link.active {
    color: #ffffff;
    background: rgba(255,255,255,0.05);
    border-left-color: var(--accent-blue);
}

.admin-sidebar .nav-link i {
    width: 20px;
    font-size: 1.1rem;
}

.stat-card {
    background: #ffffff;
    border-radius: var(--radius-md);
    padding: 24px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.stat-card-icon {
    width: 55px;
    height: 55px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

/* --- Footer --- */
.main-footer {
    background: var(--primary-navy);
    color: #94a3b8;
    padding-top: 60px;
    padding-bottom: 25px;
    margin-top: 60px;
}

.footer-title {
    color: #ffffff;
    font-size: 1.1rem;
    margin-bottom: 20px;
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: 10px;
}

.footer-links a {
    color: #94a3b8;
    font-size: 0.9rem;
}

.footer-links a:hover {
    color: var(--accent-cyan);
    padding-left: 5px;
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    margin-top: 40px;
    padding-top: 20px;
    font-size: 0.85rem;
    text-align: center;
}

/* --- Responsive Adjustments --- */
@media (max-width: 991.98px) {
    .hero-title {
        font-size: 2.2rem;
    }
    
    .header-search-form {
        max-width: 100%;
        margin-top: 10px;
    }
}

@media (max-width: 575.98px) {
    .hero-title {
        font-size: 1.8rem;
    }

    .hero-section {
        padding: 50px 0;
    }

    .whatsapp-float {
        bottom: 20px;
        left: 20px;
        width: 50px;
        height: 50px;
        font-size: 25px;
    }

    .chat-float-btn {
        bottom: 20px;
        right: 20px;
        width: 50px;
        height: 50px;
        font-size: 22px;
    }

    .chatbox-window {
        bottom: 80px;
        right: 15px;
        left: 15px;
        width: auto;
    }
}
