/* ==========================================
   CSS Variables & Root Styles
   ========================================== */
:root {
    --primary-color: #d32f2f;
    --secondary-color: #1976d2;
    --dark-color: #212121;
    --light-color: #f5f5f5;
    --white-color: #ffffff;
    --text-color: #333333;
    --border-color: #e0e0e0;
    --success-color: #4caf50;
    --warning-color: #ff9800;

    --font-primary: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    --transition: all 0.3s ease;

    --header-height: 80px;
    --topbar-height: 40px;
}

/* ==========================================
   Global Styles
   ========================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-primary);
    color: var(--text-color);
    line-height: 1.6;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* ==========================================
   Top Bar
   ========================================== */
.top-bar {
    background: var(--dark-color);
    color: var(--white-color);
    padding: 10px 0;
    font-size: 14px;
}

.top-bar-left,
.top-bar-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.top-bar-right {
    justify-content: flex-end;
}

.top-bar a {
    color: var(--white-color);
    display: flex;
    align-items: center;
    gap: 8px;
}

.top-bar a:hover {
    color: var(--primary-color);
}

.b2b-login {
    background: var(--primary-color);
    padding: 5px 15px;
    border-radius: 4px;
    font-weight: 600;
}

.b2b-login:hover {
    background: #b71c1c;
    color: var(--white-color) !important;
}

.social-links {
    display: flex;
    gap: 10px;
}

.social-links a {
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
}

.social-links a:hover {
    background: var(--primary-color);
    color: var(--white-color) !important;
}

/* ==========================================
   Main Header
   ========================================== */
.main-header {
    background: var(--white-color);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 15px 0;
}

.logo-text {
    font-size: 28px;
    font-weight: 800;
    color: var(--primary-color);
    letter-spacing: 1px;
    margin: 0;
}

.logo-text:hover {
    color: var(--secondary-color);
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 24px;
    color: var(--dark-color);
    cursor: pointer;
    float: right;
}

/* Navigation */
.main-nav {
    display: flex;
    justify-content: flex-end;
}

.nav-menu {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 30px;
    margin: 0;
    padding: 0;
}

.nav-menu > li {
    position: relative;
}

.nav-menu > li > a {
    color: var(--dark-color);
    font-weight: 600;
    font-size: 15px;
    text-transform: uppercase;
    padding: 10px 0;
    display: flex;
    align-items: center;
    gap: 5px;
}

.nav-menu > li > a:hover,
.nav-menu > li > a.active {
    color: var(--primary-color);
}

/* Dropdown Menu */
.has-dropdown {
    position: relative;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--white-color);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
    min-width: 220px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: var(--transition);
    list-style: none;
    padding: 10px 0;
    margin: 0;
    border-radius: 4px;
}

.has-dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-menu li {
    border-bottom: 1px solid var(--border-color);
}

.dropdown-menu li:last-child {
    border-bottom: none;
}

.dropdown-menu a {
    display: block;
    padding: 12px 20px;
    color: var(--text-color);
    font-size: 14px;
}

.dropdown-menu a:hover {
    background: var(--light-color);
    color: var(--primary-color);
    padding-left: 25px;
}

/* ==========================================
   Hero Slider
   ========================================== */
.hero-slider {
    position: relative;
    height: 600px;
    overflow: hidden;
}

.hero-slide {
    position: relative;
    height: 600px;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
}

.hero-slide::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(211, 47, 47, 0.8), rgba(25, 118, 210, 0.6));
}

.hero-content {
    position: relative;
    z-index: 2;
    color: var(--white-color);
    max-width: 700px;
}

.hero-content h1 {
    font-size: 56px;
    font-weight: 800;
    margin-bottom: 20px;
    line-height: 1.2;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.hero-content p {
    font-size: 20px;
    margin-bottom: 30px;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

.btn-hero {
    display: inline-block;
    padding: 15px 40px;
    background: var(--white-color);
    color: var(--primary-color);
    font-weight: 700;
    font-size: 16px;
    border-radius: 50px;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.btn-hero:hover {
    background: var(--primary-color);
    color: var(--white-color);
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

/* ==========================================
   Sections
   ========================================== */
.section {
    padding: 80px 0;
}

.section-title {
    text-align: center;
    margin-bottom: 60px;
}

.section-title h2 {
    font-size: 42px;
    font-weight: 800;
    color: var(--dark-color);
    margin-bottom: 15px;
    position: relative;
    display: inline-block;
}

.section-title h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
}

.section-title p {
    font-size: 18px;
    color: #666;
    max-width: 700px;
    margin: 20px auto 0;
}

/* ==========================================
   Features Section
   ========================================== */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.feature-card {
    background: var(--white-color);
    padding: 40px 30px;
    border-radius: 10px;
    text-align: center;
    transition: var(--transition);
    box-shadow: 0 3px 15px rgba(0, 0, 0, 0.08);
}

.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.feature-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 25px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white-color);
    font-size: 36px;
}

.feature-card h3 {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 15px;
    color: var(--dark-color);
}

.feature-card p {
    color: #666;
    line-height: 1.8;
}

/* ==========================================
   Products Section
   ========================================== */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
}

.product-card {
    background: var(--white-color);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 3px 15px rgba(0, 0, 0, 0.08);
    transition: var(--transition);
}

.product-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.product-image {
    position: relative;
    overflow: hidden;
    height: 250px;
    background: var(--light-color);
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.product-card:hover .product-image img {
    transform: scale(1.1);
}

.product-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: var(--primary-color);
    color: var(--white-color);
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
}

.product-info {
    padding: 25px;
}

.product-category {
    font-size: 12px;
    text-transform: uppercase;
    color: var(--primary-color);
    font-weight: 700;
    letter-spacing: 1px;
    margin-bottom: 10px;
}

.product-info h3 {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 10px;
    color: var(--dark-color);
}

.product-info p {
    color: #666;
    font-size: 14px;
    margin-bottom: 20px;
    line-height: 1.6;
}

.btn-product {
    display: block;
    width: 100%;
    padding: 12px;
    background: var(--dark-color);
    color: var(--white-color);
    text-align: center;
    font-weight: 600;
    border-radius: 5px;
    transition: var(--transition);
}

.btn-product:hover {
    background: var(--primary-color);
    color: var(--white-color);
}

/* ==========================================
   About Section
   ========================================== */
.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.about-image {
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
}

.about-text h2 {
    font-size: 36px;
    font-weight: 800;
    color: var(--dark-color);
    margin-bottom: 20px;
}

.about-text p {
    font-size: 16px;
    color: #666;
    line-height: 1.8;
    margin-bottom: 20px;
}

.about-features {
    list-style: none;
    margin: 30px 0;
}

.about-features li {
    padding: 12px 0;
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 16px;
}

.about-features li i {
    color: var(--success-color);
    font-size: 20px;
}

.btn-primary {
    display: inline-block;
    padding: 15px 40px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: var(--white-color);
    font-weight: 700;
    border-radius: 50px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
    color: var(--white-color);
}

/* ==========================================
   Stats Section
   ========================================== */
.stats-section {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: var(--white-color);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
}

.stat-item {
    text-align: center;
}

.stat-number {
    font-size: 48px;
    font-weight: 800;
    margin-bottom: 10px;
}

.stat-label {
    font-size: 18px;
    opacity: 0.9;
}

/* ==========================================
   Footer
   ========================================== */
.main-footer {
    background: var(--dark-color);
    color: var(--white-color);
}

.footer-top {
    padding: 60px 0 40px;
}

.footer-widget {
    margin-bottom: 30px;
}

.widget-title {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 25px;
    position: relative;
    padding-bottom: 15px;
}

.widget-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 3px;
    background: var(--primary-color);
}

.footer-desc {
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.8;
    margin-bottom: 20px;
}

.footer-social {
    display: flex;
    gap: 10px;
}

.footer-social a {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.footer-social a:hover {
    background: var(--primary-color);
    transform: translateY(-3px);
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 12px;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.7);
    transition: var(--transition);
}

.footer-links a:hover {
    color: var(--white-color);
    padding-left: 5px;
}

.footer-contact {
    list-style: none;
}

.footer-contact li {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
    color: rgba(255, 255, 255, 0.7);
}

.footer-contact li i {
    color: var(--primary-color);
    font-size: 18px;
    width: 20px;
    flex-shrink: 0;
}

.footer-bottom {
    background: rgba(0, 0, 0, 0.2);
    padding: 20px 0;
}

.copyright {
    margin: 0;
    color: rgba(255, 255, 255, 0.7);
}

.footer-bottom-links {
    display: flex;
    justify-content: flex-end;
    gap: 20px;
}

.footer-bottom-links a {
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
}

.footer-bottom-links a:hover {
    color: var(--white-color);
}

/* ==========================================
   Scroll to Top
   ========================================== */
.scroll-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--primary-color);
    color: var(--white-color);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    transition: var(--transition);
    z-index: 999;
}

.scroll-to-top:hover {
    background: var(--secondary-color);
    transform: translateY(-5px);
}

.scroll-to-top.show {
    display: flex;
}

/* ==========================================
   Responsive Design
   ========================================== */
@media (max-width: 991px) {
    .mobile-menu-toggle {
        display: block;
    }

    .main-nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: 300px;
        height: 100vh;
        background: var(--white-color);
        box-shadow: -5px 0 20px rgba(0, 0, 0, 0.1);
        transition: var(--transition);
        z-index: 9999;
        padding: 80px 30px 30px;
    }

    .main-nav.active {
        right: 0;
    }

    .nav-menu {
        flex-direction: column;
        align-items: flex-start;
        gap: 0;
    }

    .nav-menu > li {
        width: 100%;
        border-bottom: 1px solid var(--border-color);
    }

    .nav-menu > li > a {
        padding: 15px 0;
        width: 100%;
    }

    .dropdown-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        padding-left: 20px;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
    }

    .has-dropdown.active .dropdown-menu {
        max-height: 500px;
    }

    .about-content {
        grid-template-columns: 1fr;
        gap: 40px;
    }
}

@media (max-width: 768px) {
    .top-bar-left,
    .top-bar-right {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .top-bar-right {
        align-items: flex-start;
    }

    .hero-content h1 {
        font-size: 36px;
    }

    .hero-content p {
        font-size: 16px;
    }

    .section {
        padding: 50px 0;
    }

    .section-title h2 {
        font-size: 32px;
    }

    .footer-bottom-links {
        justify-content: flex-start;
        margin-top: 15px;
    }
}

@media (max-width: 576px) {
    .hero-slider,
    .hero-slide {
        height: 400px;
    }

    .hero-content h1 {
        font-size: 28px;
    }

    .section-title h2 {
        font-size: 28px;
    }

    .stat-number {
        font-size: 36px;
    }
}
