/* ===== 重庆擎动机电设备有限公司 - 主样式 ===== */
:root {
    --primary: #1a365d;
    --primary-dark: #0f2440;
    --primary-light: #2d5a8e;
    --accent: #e67e22;
    --accent-dark: #d35400;
    --accent-light: #f39c12;
    --gray-50: #f8f9fa;
    --gray-100: #f1f3f5;
    --gray-200: #e9ecef;
    --gray-300: #dee2e6;
    --gray-400: #ced4da;
    --gray-500: #adb5bd;
    --gray-600: #6c757d;
    --gray-700: #495057;
    --gray-800: #343a40;
    --gray-900: #212529;
    --shadow-sm: 0 1px 3px rgba(0,0,0,.1);
    --shadow: 0 4px 12px rgba(0,0,0,.1);
    --shadow-lg: 0 10px 30px rgba(0,0,0,.15);
    --radius: 8px;
    --radius-lg: 12px;
    --transition: all .3s ease;
}

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

body {
    font-family: 'Noto Sans SC', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: var(--gray-800);
    line-height: 1.7;
    background: var(--gray-50);
}

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

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

/* ===== Top Bar ===== */
.top-bar {
    background: var(--primary-dark);
    color: rgba(255,255,255,.85);
    font-size: .85rem;
    padding: 6px 0;
}
.top-bar a { color: rgba(255,255,255,.9); }
.top-bar a:hover { color: var(--accent); }
.top-bar i { margin-right: 4px; color: var(--accent); }

/* ===== Navbar ===== */
.navbar-main {
    background: var(--primary);
    padding: 0;
    box-shadow: var(--shadow);
}
.navbar-main .navbar-brand {
    color: #fff;
    font-size: 1.35rem;
    font-weight: 700;
    padding: 12px 0;
    letter-spacing: 1px;
}
.navbar-main .navbar-brand:hover { color: var(--accent-light); }
.navbar-main .nav-link {
    color: rgba(255,255,255,.9);
    font-weight: 500;
    padding: 16px 18px !important;
    transition: var(--transition);
    position: relative;
}
.navbar-main .nav-link:hover,
.navbar-main .nav-link.active {
    color: #fff;
    background: rgba(255,255,255,.1);
}
.navbar-main .nav-link::after {
    content: '';
    position: absolute;
    bottom: 0; left: 50%;
    width: 0; height: 3px;
    background: var(--accent);
    transition: var(--transition);
    transform: translateX(-50%);
}
.navbar-main .nav-link:hover::after,
.navbar-main .nav-link.active::after { width: 60%; }

/* Category Mega Menu */
.navbar-main .dropdown-menu {
    border: none;
    box-shadow: var(--shadow-lg);
    border-radius: 0 0 var(--radius) var(--radius);
    border-top: 3px solid var(--accent);
    padding: 12px 0;
    min-width: 240px;
    max-height: 450px;
    overflow-y: auto;
}
.navbar-main .dropdown-item {
    padding: 8px 20px;
    font-size: .9rem;
    color: var(--gray-700);
    transition: var(--transition);
}
.navbar-main .dropdown-item:hover {
    background: var(--primary);
    color: #fff;
    padding-left: 24px;
}
.navbar-main .dropdown-item::before {
    content: '›';
    margin-right: 6px;
    color: var(--accent);
    font-weight: 700;
}

/* Mobile nav */
.navbar-toggler { border-color: rgba(255,255,255,.3); }
.navbar-toggler-icon { filter: brightness(10); }

/* ===== Hero Banner ===== */
.hero-section {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: #fff;
    padding: 80px 0;
    position: relative;
    overflow: hidden;
}
.hero-section::before {
    content: '';
    position: absolute;
    top: -50%; right: -20%;
    width: 600px; height: 600px;
    background: radial-gradient(circle, rgba(230,126,34,.15) 0%, transparent 70%);
    border-radius: 50%;
}
.hero-section h1 {
    font-size: 2.8rem;
    font-weight: 700;
    margin-bottom: 20px;
}
.hero-section .lead {
    font-size: 1.2rem;
    opacity: .9;
    margin-bottom: 30px;
}
.btn-accent {
    background: var(--accent);
    color: #fff;
    border: none;
    padding: 12px 32px;
    border-radius: 50px;
    font-weight: 600;
    transition: var(--transition);
}
.btn-accent:hover { background: var(--accent-dark); color: #fff; transform: translateY(-2px); box-shadow: 0 6px 20px rgba(230,126,34,.4); }
.btn-outline-light:hover { color: var(--primary); }

/* ===== Section Titles ===== */
.section-title {
    text-align: center;
    margin-bottom: 40px;
    position: relative;
}
.section-title h2 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 10px;
}
.section-title p {
    color: var(--gray-600);
    font-size: 1.05rem;
}
.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background: var(--accent);
    margin: 12px auto 0;
    border-radius: 2px;
}

/* ===== Category Cards ===== */
.category-card {
    background: #fff;
    border-radius: var(--radius-lg);
    padding: 24px 16px;
    text-align: center;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    border: 2px solid transparent;
    cursor: pointer;
}
.category-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow);
    border-color: var(--accent);
}
.category-card .icon {
    width: 56px; height: 56px;
    background: linear-gradient(135deg, var(--primary-light), var(--primary));
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 12px;
    color: #fff;
    font-size: 1.3rem;
}
.category-card h5 { color: var(--primary); font-weight: 600; font-size: .95rem; margin: 0; }

/* ===== Product Cards ===== */
.product-card {
    background: #fff;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    height: 100%;
    display: flex;
    flex-direction: column;
}
.product-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow);
}
.product-card .img-wrap {
    height: 220px;
    overflow: hidden;
    background: var(--gray-100);
    display: flex;
    align-items: center;
    justify-content: center;
}
.product-card .img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}
.product-card:hover .img-wrap img { transform: scale(1.05); }
.product-card .img-wrap .no-img {
    color: var(--gray-400);
    font-size: 3rem;
}
.product-card .card-body {
    padding: 16px;
    flex: 1;
    display: flex;
    flex-direction: column;
}
.product-card h5 {
    font-size: .95rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--gray-800);
    line-height: 1.4;
}
.product-card h5 a { color: inherit; }
.product-card h5 a:hover { color: var(--accent); }
.product-card .part-num {
    color: var(--accent);
    font-weight: 600;
    font-size: .85rem;
    margin-bottom: 6px;
}
.product-card .card-footer {
    padding: 10px 16px;
    background: var(--gray-50);
    border-top: 1px solid var(--gray-200);
    font-size: .8rem;
    color: var(--gray-600);
}

/* ===== News Cards ===== */
.news-card {
    background: #fff;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}
.news-card:hover { box-shadow: var(--shadow); transform: translateY(-3px); }
.news-card .card-body { padding: 20px; }
.news-card .badge-type {
    background: var(--primary);
    color: #fff;
    font-size: .75rem;
    padding: 3px 10px;
    border-radius: 20px;
}
.news-card h5 { font-weight: 600; margin: 10px 0; }
.news-card h5 a { color: var(--gray-800); }
.news-card h5 a:hover { color: var(--accent); }
.news-card .summary { color: var(--gray-600); font-size: .9rem; line-height: 1.6; }
.news-card .meta { color: var(--gray-500); font-size: .8rem; }

/* ===== Stats Section ===== */
.stats-section {
    background: var(--primary);
    color: #fff;
    padding: 60px 0;
}
.stat-item { text-align: center; }
.stat-item .number {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--accent-light);
}
.stat-item .label {
    font-size: .9rem;
    opacity: .85;
    margin-top: 4px;
}

/* ===== Sidebar ===== */
.sidebar .widget {
    background: #fff;
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    margin-bottom: 20px;
    overflow: hidden;
}
.sidebar .widget-title {
    background: var(--primary);
    color: #fff;
    padding: 12px 16px;
    font-weight: 600;
    font-size: .95rem;
    margin: 0;
}
.sidebar .widget-body { padding: 16px; }
.sidebar .category-list a {
    display: block;
    padding: 8px 12px;
    color: var(--gray-700);
    border-bottom: 1px solid var(--gray-100);
    font-size: .9rem;
    transition: var(--transition);
}
.sidebar .category-list a:hover {
    background: var(--gray-50);
    color: var(--accent);
    padding-left: 18px;
}
.sidebar .category-list a .count {
    float: right;
    background: var(--gray-200);
    padding: 1px 8px;
    border-radius: 10px;
    font-size: .75rem;
    color: var(--gray-600);
}

/* ===== Breadcrumb ===== */
.breadcrumb-section {
    background: var(--gray-100);
    padding: 14px 0;
    border-bottom: 1px solid var(--gray-200);
}
.breadcrumb-section .breadcrumb {
    margin: 0;
    background: none;
    padding: 0;
    font-size: .85rem;
}

/* ===== Product Detail ===== */
.product-detail .main-image {
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: #fff;
    box-shadow: var(--shadow);
}
.product-detail .info-box {
    background: #fff;
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-sm);
}
.product-detail .info-box h1 {
    font-size: 1.6rem;
    color: var(--primary);
    margin-bottom: 12px;
}
.product-detail .spec-item {
    padding: 8px 0;
    border-bottom: 1px dashed var(--gray-200);
    font-size: .9rem;
}
.product-detail .spec-item label { font-weight: 600; color: var(--gray-600); min-width: 80px; }

/* ===== Contact Page ===== */
.contact-card {
    background: #fff;
    border-radius: var(--radius-lg);
    padding: 24px;
    text-align: center;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}
.contact-card:hover { box-shadow: var(--shadow); transform: translateY(-3px); }
.contact-card .icon-circle {
    width: 60px; height: 60px;
    background: linear-gradient(135deg, var(--primary-light), var(--primary));
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 16px;
    color: #fff;
    font-size: 1.4rem;
}
.contact-card .contact-value {
    font-size: .85rem;
    color: var(--gray-700);
    word-break: break-all;
    line-height: 1.4;
}
.contact-card h6 {
    color: var(--gray-800);
    font-weight: 600;
    margin-bottom: 4px;
}
a > .contact-card {
    color: inherit;
    transition: var(--transition);
}
a > .contact-card h6 {
    color: var(--gray-800);
}
a:hover > .contact-card {
    border-color: var(--primary);
    box-shadow: var(--shadow);
}
a:hover > .contact-card h6 {
    color: var(--primary);
}
a:hover > .contact-card .icon-circle {
    background: linear-gradient(135deg, var(--accent), var(--accent-dark));
}
a:hover > .contact-card .contact-value {
    color: var(--primary);
}

/* ===== Pagination ===== */
.pagination .page-link {
    color: var(--primary);
    border-color: var(--gray-300);
}
.pagination .page-item.active .page-link {
    background: var(--primary);
    border-color: var(--primary);
}

/* ===== Footer ===== */
.footer {
    background: var(--primary-dark);
    color: rgba(255,255,255,.75);
    padding: 48px 0 0;
    font-size: .9rem;
}
.footer h5 { color: #fff; font-weight: 600; margin-bottom: 16px; }
.footer a { color: rgba(255,255,255,.7); }
.footer a:hover { color: var(--accent-light); }
.footer .footer-bottom {
    margin-top: 32px;
    padding: 16px 0;
    border-top: 1px solid rgba(255,255,255,.1);
    font-size: .8rem;
}
.footer .contact-item i {
    color: var(--accent);
    margin-right: 8px;
    width: 16px;
}

/* Footer Contact List */
.footer-contact-list {
    list-style: none;
    padding: 0;
    margin: 0;
}
.footer-contact-list li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 10px;
}
.footer-contact-list li > i {
    color: var(--accent);
    font-size: .85rem;
    width: 16px;
    min-width: 16px;
    margin-top: 3px;
    text-align: center;
}
.footer-contact-list li > div {
    flex: 1;
    min-width: 0;
}
.footer-contact-list .contact-label {
    display: block;
    font-size: .7rem;
    color: rgba(255,255,255,.45);
    text-transform: uppercase;
    letter-spacing: .5px;
    margin-bottom: 1px;
    line-height: 1;
}
.footer-contact-list li > div a,
.footer-contact-list li > div span {
    color: rgba(255,255,255,.85);
    font-size: .85rem;
    line-height: 1.4;
    word-break: break-all;
}
.footer-contact-list li > div a:hover {
    color: var(--accent-light);
}
.footer-contact-list li > div span {
    color: rgba(255,255,255,.75);
}

/* Mobile Call Button */
.mobile-call-bar {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 9990;
    background: #fff;
    box-shadow: 0 -2px 12px rgba(0,0,0,.12);
    padding: 8px 12px;
    gap: 8px;
}
@media (max-width: 767.98px) {
    .mobile-call-bar { display: flex; }
    .footer { padding-bottom: 64px; }
    .back-to-top { bottom: 72px; }
    .footer-contact-list li > div a,
    .footer-contact-list li > div span {
        font-size: .8rem;
    }
    .footer-contact-list .contact-label {
        font-size: .65rem;
    }
}
.mobile-call-bar a {
    flex: 1;
    text-align: center;
    padding: 10px 0;
    border-radius: var(--radius);
    font-weight: 600;
    font-size: .9rem;
    text-decoration: none;
    transition: var(--transition);
}
.mobile-call-bar .btn-call {
    background: var(--accent);
    color: #fff;
}
.mobile-call-bar .btn-call:hover {
    background: var(--accent-dark);
}
.mobile-call-bar .btn-message {
    background: var(--primary);
    color: #fff;
}
.mobile-call-bar .btn-message:hover {
    background: var(--primary-dark);
}
.mobile-call-bar .btn-wechat {
    background: #07c160;
    color: #fff;
}
.mobile-call-bar .btn-wechat:hover {
    background: #06ad56;
}
.mobile-call-bar a i {
    margin-right: 4px;
}

/* ===== Back to Top ===== */
.back-to-top {
    position: fixed;
    bottom: 30px; right: 30px;
    width: 44px; height: 44px;
    background: var(--accent);
    color: #fff;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.1rem;
    box-shadow: var(--shadow);
    transition: var(--transition);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
}
.back-to-top.show { opacity: 1; visibility: visible; }
.back-to-top:hover { background: var(--accent-dark); transform: translateY(-3px); color: #fff; }

/* ===== Search Bar ===== */
.search-section {
    background: var(--gray-100);
    padding: 24px 0;
}
.search-box {
    background: #fff;
    border-radius: 50px;
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    display: flex;
}
.search-box input {
    border: none;
    padding: 14px 24px;
    flex: 1;
    font-size: 1rem;
    outline: none;
}
.search-box button {
    background: var(--accent);
    color: #fff;
    border: none;
    padding: 14px 28px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}
.search-box button:hover { background: var(--accent-dark); }

/* ===== Alerts ===== */
.alert-flash {
    position: fixed;
    top: 80px; right: 20px;
    z-index: 9999;
    min-width: 280px;
    animation: slideIn .3s ease;
}
@keyframes slideIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

/* ===== Responsive ===== */

/* Extra small devices (phones, < 576px) */
@media (max-width: 575.98px) {
    /* Top Bar */
    .top-bar { font-size: .75rem; padding: 4px 0; }
    .top-bar .me-3 { margin-right: .5rem !important; }

    /* Navbar */
    .navbar-main .navbar-brand { font-size: 1.05rem; padding: 10px 0; }
    .navbar-main .nav-link { padding: 10px 14px !important; font-size: .9rem; }
    .navbar-main .nav-link::after { display: none; }
    .navbar-main .dropdown-menu {
        border: none;
        box-shadow: none;
        border-radius: 0;
        border-top: none;
        padding: 0;
        max-height: none;
        overflow: visible;
        background: rgba(255,255,255,.05);
    }
    .navbar-main .dropdown-item {
        color: rgba(255,255,255,.85);
        padding: 10px 16px;
        font-size: .85rem;
    }
    .navbar-main .dropdown-item:hover {
        background: rgba(255,255,255,.1);
        color: #fff;
        padding-left: 20px;
    }
    .navbar-collapse { padding-bottom: 8px; }

    /* Hero */
    .hero-section { padding: 32px 0; }
    .hero-section h1 { font-size: 1.5rem; line-height: 1.3; margin-bottom: 12px; }
    .hero-section .lead { font-size: .95rem; margin-bottom: 20px; }
    .btn-accent { padding: 10px 22px; font-size: .9rem; }
    .btn-outline-light { padding: 10px 22px; font-size: .9rem; }
    .hero-section .mt-4.d-flex { flex-direction: column; gap: 10px !important; }
    .hero-section .mt-4.d-flex .btn { width: 100%; text-align: center; }

    /* Search */
    .search-section { padding: 16px 0; }
    .search-box { border-radius: 12px; }
    .search-box input { padding: 12px 16px; font-size: .9rem; }
    .search-box button { padding: 12px 18px; font-size: .9rem; }

    /* Section title */
    .section-title { margin-bottom: 28px; }
    .section-title h2 { font-size: 1.4rem; }
    .section-title p { font-size: .9rem; }

    /* Category cards */
    .category-card { padding: 14px 10px; }
    .category-card .icon { width: 44px; height: 44px; font-size: 1.1rem; margin-bottom: 8px; }
    .category-card h5 { font-size: .8rem; }

    /* Product cards */
    .product-card .img-wrap { height: 150px; }
    .product-card .card-body { padding: 10px 12px; }
    .product-card h5 { font-size: .85rem; line-height: 1.3; margin-bottom: 4px; }
    .product-card .part-num { font-size: .75rem; margin-bottom: 2px; }
    .product-card .card-footer { padding: 8px 12px; font-size: .7rem; }

    /* Stats */
    .stats-section { padding: 36px 0; }
    .stat-item { margin-bottom: 12px; }
    .stat-item .number { font-size: 1.6rem; }
    .stat-item .label { font-size: .8rem; }

    /* News cards */
    .news-card .card-body { padding: 14px; }
    .news-card h5 { font-size: .95rem; }
    .news-card .summary { font-size: .85rem; }
    .news-card .meta { font-size: .75rem; }
    .news-card .badge-type { font-size: .7rem; padding: 2px 8px; }

    /* Product detail */
    .product-detail .info-box { padding: 16px; }
    .product-detail .info-box h1 { font-size: 1.25rem; margin-bottom: 10px; }
    .product-detail .spec-item { padding: 6px 0; font-size: .85rem; }
    .product-detail .spec-item label { min-width: 70px; }
    .product-detail .main-image { min-height: 250px !important; }

    /* Contact */
    .contact-card { padding: 18px 12px; }
    .contact-card .icon-circle { width: 48px; height: 48px; font-size: 1.1rem; margin-bottom: 10px; }
    .contact-card h6 { font-size: .85rem; }

    /* Sidebar */
    .sidebar { margin-top: 24px; }
    .sidebar .widget-title { font-size: .9rem; padding: 10px 14px; }
    .sidebar .widget-body { padding: 12px; }
    .sidebar .category-list a { padding: 8px 12px; font-size: .85rem; }

    /* Breadcrumb */
    .breadcrumb-section { padding: 10px 0; }
    .breadcrumb-section .breadcrumb { font-size: .78rem; }

    /* Footer */
    .footer { padding: 32px 0 0; font-size: .85rem; }
    .footer h5 { font-size: .95rem; margin-bottom: 12px; }
    .footer-bottom { font-size: .75rem; }

    /* Back to top */
    .back-to-top { bottom: 20px; right: 16px; width: 40px; height: 40px; font-size: 1rem; }

    /* About page feature boxes */
    .about-feature-box { padding: 12px !important; }
    .about-feature-box i { font-size: 1.4rem !important; }

    /* Contact form */
    .contact-form-box { padding: 20px 16px !important; }
    .contact-info-box { padding: 20px 16px !important; }

    /* Nav tabs (news) */
    .nav-tabs .nav-link { font-size: .85rem; padding: 8px 12px; }

    /* Section padding */
    .py-5 { padding-top: 2rem !important; padding-bottom: 2rem !important; }

    /* Contact card text overflow */
    .contact-card p { font-size: .75rem !important; word-break: break-all; }
}
@media (min-width: 576px) and (max-width: 767.98px) {
    .search-box button { padding: 12px 20px; }
    .hero-section { padding: 36px 0; }
    .hero-section h1 { font-size: 1.8rem; }
    .hero-section .lead { font-size: 1rem; }
    .stat-item .number { font-size: 1.9rem; }
    .product-card .img-wrap { height: 170px; }
    .category-card { padding: 18px 12px; }
    .category-card .icon { width: 50px; height: 50px; font-size: 1.2rem; }
    .product-detail .info-box h1 { font-size: 1.4rem; }
    .product-detail .main-image { min-height: 300px !important; }
    .back-to-top { bottom: 24px; right: 20px; }
    .navbar-main .nav-link::after { display: none; }
    .navbar-main .dropdown-menu {
        box-shadow: none;
        background: rgba(255,255,255,.05);
    }
    .navbar-main .dropdown-item { color: rgba(255,255,255,.85); }
    .navbar-main .dropdown-item:hover { background: rgba(255,255,255,.1); color: #fff; }
}

/* Medium devices (tablets landscape, 768px - 991.98px) */
@media (min-width: 768px) and (max-width: 991.98px) {
    .hero-section h1 { font-size: 2.2rem; }
    .hero-section .lead { font-size: 1.1rem; }
    .product-card .img-wrap { height: 200px; }
    .category-card { padding: 20px 14px; }
    .stat-item .number { font-size: 2.2rem; }
    .section-title h2 { font-size: 1.7rem; }
    .navbar-main .nav-link { padding: 14px 12px !important; }
}

@media (max-width: 768px) {
    /* Top bar - hide email on mobile, show phone/mobile */
    .top-bar .d-md-inline { display: none !important; }

    /* Navbar dropdown on mobile */
    .navbar-main .dropdown-menu {
        border-top: none;
        border-radius: 0;
        box-shadow: none;
        max-height: none;
        background: rgba(255,255,255,.05);
    }
    .navbar-main .dropdown-item {
        color: rgba(255,255,255,.85);
    }
    .navbar-main .dropdown-item:hover {
        background: rgba(255,255,255,.1);
        color: #fff;
    }

    /* Product card grid - full width on very small, half on sm+ */
    .product-card .img-wrap { height: 160px; }

    /* Hide decorative hero element on mobile */
    .hero-section::after { display: none; }
    .hero-section::before { width: 300px; height: 300px; }

    /* Ensure mobile nav buttons are full width */
    .hero-section .mt-4 { display: flex; flex-direction: column; }
    .hero-section .mt-4 > * { width: 100%; text-align: center; }

    /* Better mobile card spacing */
    .row.g-4 { --bs-gutter-x: 12px; --bs-gutter-y: 12px; }
    .row.g-3 { --bs-gutter-x: 10px; --bs-gutter-y: 10px; }

    /* Contact page cards - 2 per row on mobile */
    .contact-card h6 { font-size: .9rem; }

    /* News on mobile - full width */
    .news-card h5 { font-size: 1rem; }
}

/* ===== Loading ===== */
.page-loading {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 3px;
    background: var(--accent);
    z-index: 9999;
    animation: loading 1.5s ease infinite;
}
@keyframes loading {
    0% { width: 0; }
    50% { width: 70%; }
    100% { width: 100%; }
}

/* ===== Page Transition & Loader ===== */
.page-loader {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: #fff;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity .4s ease, visibility .4s ease;
}
.page-loader.loaded {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}
.page-loader .spinner {
    width: 48px; height: 48px;
    border: 4px solid var(--gray-200);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin .8s linear infinite;
}
@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ===== Scroll Reveal Animations ===== */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity .6s ease, transform .6s ease;
}
.reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}
.reveal-delay-1 { transition-delay: .1s; }
.reveal-delay-2 { transition-delay: .2s; }
.reveal-delay-3 { transition-delay: .3s; }
.reveal-delay-4 { transition-delay: .4s; }

/* ===== Hero Enhancement ===== */
.hero-section {
    position: relative;
}
.hero-section::after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    pointer-events: none;
    z-index: 0;
}
.hero-section > .container {
    position: relative;
    z-index: 1;
}
.hero-section h1 {
    position: relative;
}
.hero-section .lead {
    position: relative;
}
.hero-pulse {
    display: inline-block;
    animation: pulse-glow 2s ease-in-out infinite;
}
@keyframes pulse-glow {
    0%, 100% { box-shadow: 0 0 0 0 rgba(230, 126, 34, 0.4); }
    50% { box-shadow: 0 0 20px 4px rgba(230, 126, 34, 0.2); }
}

/* ===== Product Card Enhancement ===== */
.product-card {
    position: relative;
    overflow: hidden;
}
.product-card::before {
    content: '';
    position: absolute;
    top: 0; left: -100%;
    width: 100%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,.1), transparent);
    z-index: 1;
    transition: left .6s ease;
}
.product-card:hover::before {
    left: 100%;
}
.product-card .card-body::before {
    content: '';
    position: absolute;
    bottom: 0; left: 50%;
    width: 0; height: 2px;
    background: var(--accent);
    transition: all .3s ease;
    transform: translateX(-50%);
}
.product-card:hover .card-body::before {
    width: 60%;
}

/* ===== Category Card Enhancement ===== */
.category-card .icon {
    transition: var(--transition);
}
.category-card:hover .icon {
    transform: scale(1.1) rotate(-5deg);
    box-shadow: 0 4px 15px rgba(26, 54, 93, 0.3);
}

/* ===== News Card Enhancement ===== */
.news-card {
    position: relative;
    overflow: hidden;
}
.news-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 4px; height: 0;
    background: var(--accent);
    transition: height .3s ease;
    border-radius: 0 0 2px 0;
}
.news-card:hover::before {
    height: 100%;
}

/* ===== Stats Counter Enhancement ===== */
.stat-item .number {
    position: relative;
    display: inline-block;
}
.stat-item .number::after {
    content: '';
    position: absolute;
    bottom: -4px; left: 10%; right: 10%;
    height: 2px;
    background: rgba(255,255,255,.3);
}

/* ===== Search Enhancement ===== */
.search-box input:focus {
    box-shadow: 0 0 0 3px rgba(230, 126, 34, 0.2);
}
.search-box:focus-within {
    box-shadow: var(--shadow-lg);
}

/* ===== Focus Visible ===== */
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

/* ===== Footer Enhancement ===== */
.footer h5::after {
    content: '';
    display: block;
    width: 30px;
    height: 2px;
    background: var(--accent);
    margin-top: 8px;
}

/* ===== Skeleton Loading ===== */
.skeleton {
    background: linear-gradient(90deg, var(--gray-100) 25%, var(--gray-200) 50%, var(--gray-100) 75%);
    background-size: 200% 100%;
    animation: skeleton-shimmer 1.5s ease infinite;
    border-radius: var(--radius);
}
@keyframes skeleton-shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ===== Smooth Entry for Body ===== */
body {
    animation: fadeInBody .4s ease;
}
@keyframes fadeInBody {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* ===== Print Styles ===== */
@media print {
    .navbar-main, .top-bar, .back-to-top, .search-section, footer { display: none !important; }
    .hero-section { padding: 20px 0; }
    .product-card, .news-card, .category-card { box-shadow: none; border: 1px solid #ddd; }
}

/* ===== Chat Widget ===== */
.chat-toggle-btn {
    position: fixed;
    bottom: 90px;
    right: 24px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--accent);
    color: #fff;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(230,126,34,.4);
    z-index: 9998;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}
.chat-toggle-btn:hover {
    background: var(--accent-dark);
    transform: scale(1.08);
    box-shadow: 0 6px 24px rgba(230,126,34,.5);
}
.chat-toggle-btn.chat-btn-active {
    background: var(--primary);
}
@media (max-width: 767px) {
    .chat-toggle-btn {
        bottom: 80px;
        right: 16px;
        width: 50px;
        height: 50px;
        font-size: 1.3rem;
    }
}

.chat-window {
    display: none;
    position: fixed;
    bottom: 160px;
    right: 24px;
    width: 380px;
    height: 500px;
    flex-direction: column;
    background: #fff;
    border-radius: var(--radius-lg);
    box-shadow: 0 8px 40px rgba(0,0,0,.18);
    z-index: 9999;
    overflow: hidden;
}
@media (max-width: 767px) {
    .chat-window {
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        width: 100%;
        height: 100%;
        border-radius: 0;
    }
}

.chat-header {
    background: var(--primary);
    color: #fff;
    padding: 14px 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
}
.chat-header-title {
    font-size: 1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}
.chat-header-title i {
    font-size: 1.1rem;
}
.chat-header-actions {
    display: flex;
    gap: 8px;
}
.chat-header-actions button {
    background: none;
    border: none;
    color: rgba(255,255,255,.8);
    font-size: 1rem;
    cursor: pointer;
    padding: 2px 6px;
    border-radius: 4px;
    transition: var(--transition);
}
.chat-header-actions button:hover {
    color: #fff;
    background: rgba(255,255,255,.15);
}

.chat-product-info {
    display: none;
    background: #eef7ff;
    color: var(--primary);
    font-size: .8rem;
    padding: 6px 16px;
    text-align: center;
    border-bottom: 1px solid #dde8f0;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    background: #f8f9fc;
}

.chat-msg {
    margin-bottom: 12px;
    display: flex;
}
.chat-msg-user {
    justify-content: flex-end;
}
.chat-msg-assistant {
    justify-content: flex-start;
}

.chat-bubble {
    max-width: 80%;
    padding: 10px 14px;
    border-radius: 16px;
    line-height: 1.6;
    word-wrap: break-word;
}
.chat-bubble-user {
    background: var(--primary);
    color: #fff;
    border-bottom-right-radius: 4px;
}
.chat-bubble-assistant {
    background: #fff;
    color: var(--gray-800);
    border: 1px solid #e9ecef;
    border-bottom-left-radius: 4px;
}

.chat-bubble-text {
    font-size: .9rem;
    white-space: pre-wrap;
}
.chat-bubble-time {
    font-size: .7rem;
    margin-top: 4px;
    opacity: .6;
}
.chat-bubble-user .chat-bubble-time {
    text-align: right;
}

/* Typing indicator */
.chat-typing-dots {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 4px 0;
}
.chat-typing-dots span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--gray-400);
    animation: chat-typing-bounce 1.4s infinite ease-in-out both;
}
.chat-typing-dots span:nth-child(1) { animation-delay: -0.32s; }
.chat-typing-dots span:nth-child(2) { animation-delay: -0.16s; }
@keyframes chat-typing-bounce {
    0%, 80%, 100% { transform: scale(0); }
    40% { transform: scale(1); }
}

.chat-input-area {
    padding: 12px 16px;
    background: #fff;
    border-top: 1px solid #e9ecef;
    display: flex;
    gap: 10px;
    align-items: flex-end;
    flex-shrink: 0;
}
.chat-input-area input {
    flex: 1;
    border: 1px solid #dee2e6;
    border-radius: 24px;
    padding: 10px 18px;
    font-size: .9rem;
    outline: none;
    transition: var(--transition);
}
.chat-input-area input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 2px rgba(230,126,34,.2);
}
.chat-input-area button {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--accent);
    color: #fff;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    transition: var(--transition);
    flex-shrink: 0;
}
.chat-input-area button:hover {
    background: var(--accent-dark);
}
.chat-input-area button:disabled {
    opacity: .5;
    cursor: not-allowed;
}