/* ============================================
   Home Page Styles
   ============================================ */

/* Hero Banner */
.banner {
    position: relative;
    height: 520px;
    overflow: hidden;
    min-width: 1200px;
}
/* carousel-inner fills the banner */
.banner .carousel-inner { height: 100%; }
.banner .carousel-item {
    height: 100%;
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
}
.banner-wrapper{
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    min-width: 1200px;
    max-width: 1200px;
    z-index: 2;
    display: flex;
}
.banner-content {
    min-width: 450px;
    max-width: 700px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 32px;
    text-align: left;
}
.banner-content p {
    padding-left: 6px;
}
.banner h1 {
    font-size: 46px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 16px;
    letter-spacing: -0.5px;
    animation: fadeInUp 0.7s ease-out;
    text-shadow: 0 2px 6px rgba(0,0,0,0.2);
}
.banner h1 .slide-highlight { color: #fc2222; }
.banner p {
    font-size: 18px;
    color: rgba(255,255,255,0.9);
    margin-bottom: 32px;
    animation: fadeInUp 0.7s ease-out 0.15s both;
    font-weight: 400;
}
.banner-buttons {
    display: flex;
    gap: 16px;
    justify-content: center;
    animation: fadeInUp 0.7s ease-out 0.3s both;
}
.banner-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 32px;
    border-radius: var(--radius-full);
    font-size: 15px;
    font-weight: 600;
    transition: all var(--transition);
    text-decoration: none;
    letter-spacing: 0.3px;
}
.banner-btn.primary {
    background: #fff;
    color: var(--primary-dark);
    box-shadow: var(--shadow-md);
}
.banner-btn.primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    text-decoration: none;
    color: var(--primary-dark);
}
.banner-btn.secondary {
    background: transparent;
    color: #fff;
    border: 2px solid rgba(255,255,255,0.5);
}
.banner-btn.secondary:hover {
    background: rgba(255,255,255,0.12);
    border-color: #fff;
    transform: translateY(-2px);
    text-decoration: none;
    color: #fff;
}
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(24px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Banner carousel dots */
.banner-dots { bottom: 25px; }
.banner-dots li {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255,255,255,0.5);
    border: 0;
    margin: 0 6px;
    transition: all 0.3s;
}
.banner-dots li.active { background: #fff; }

/* Banner carousel arrows - semi-transparent circle */
.banner-arrow {
    position: absolute;
    width: 48px;
    height: 48px;
    top: 50%;
    transform: translateY(-50%);
    border-radius: 50%;
    background: rgba(0,0,0,0.25);
    opacity: 0.6;
    z-index: 99;
}
.banner-arrow:hover { background: rgba(0,0,0,0.4); opacity: 1; }
.carousel-control-prev.banner-arrow { left: 3%; }
.carousel-control-next.banner-arrow { right: 3%; }
.banner-arrow .carousel-control-prev-icon,
.banner-arrow .carousel-control-next-icon {
    width: 18px;
    height: 18px;
    background: url('../images/im_back.png') center/contain no-repeat;
    filter: brightness(0) invert(1);
}
.banner-arrow .carousel-control-next-icon { transform: scaleX(-1); }

/* About Section */
.about-section { padding: 60px 0; }
.about-row {
    display: flex;
    gap: 56px;
    align-items: flex-start;
}
.about-img { flex-shrink: 0; width: 460px; }
.about-img img {
    display: block;
    width: 100%;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    transition: transform var(--transition);
}
.about-img:hover img { transform: scale(1.02); }
.about-text { flex: 1; min-width: 0; }
.about-subtitle {
    font-size: 24px;
    color: var(--primary);
    line-height: 1.5;
    padding-bottom: 16px;
    font-weight: 600;
}
.about-text p {
    font-size: 15px;
    color: var(--text-secondary);
    line-height: 1.9;
}
.about-stats {
    display: flex;
    gap: 20px;
    margin-top: 42px;
    padding-top: 24px;
    border-top: 1px solid var(--border-light);
}
.about-stat {
    flex: 1;
    text-align: center;
    padding: 16px 0;
}
.about-stat .stat-num {
    font-size: 32px;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 4px;
}
.about-stat .stat-label {
    font-size: 13px;
    color: var(--text-light);
}

/* Product Card */
.product-card {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    text-align: center;
    transition: all var(--transition);
    border-radius: var(--radius-md);
    overflow: hidden;
}
.product-card:hover {
    border-color: var(--border-color);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}
.product-card-link {
    display: block;
    text-decoration: none;
    color: inherit;
}
.product-card-link:hover { text-decoration: none; color: inherit; }
.product-card .card-img-wrap {
    width: 100%;
    height: 180px;
    overflow: hidden;
    position: relative;
    background: var(--bg-lighter);
}
.product-card img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    transition: transform 0.5s ease;
    display: block;
}
.product-card:hover img { transform: scale(1.06); }
.product-card .card-info { padding: 16px 15px 20px; }
.product-card h3 {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.product-card p { font-size: 11px; color: var(--text-light); }
.product-card .card-tag {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 3;
    background: var(--primary);
    color: #fff;
    padding: 3px 10px;
    border-radius: var(--radius-full);
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.5px;
}

/* Horizontal Product Card */
.product-card-horizontal {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: all var(--transition);
    height: 180px;
    padding: 16px;
}
.product-card-horizontal:hover {
    border-color: var(--border-color);
    box-shadow: var(--shadow-md);
}
.product-card-link-horizontal {
    display: block;
    text-decoration: none;
    color: inherit;
    width: 100%;
}
.product-card-link-horizontal:hover { text-decoration: none; color: inherit; }
.product-card-horizontal .card-text {
    flex: 1;
    padding-right: 22px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 12px;
}
.product-card-horizontal .card-oem {
    font-size: 12px;
    color: var(--primary);
    font-weight: 600;
    letter-spacing: 0.5px;
}
.product-card-horizontal h3 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-card-horizontal .card-img-wrap-horizontal {
    flex-shrink: 0;
    height: 100%;
    overflow: hidden;
    background: var(--bg-lighter);
}
.product-card-horizontal .card-img-wrap-horizontal img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
    background-color: #fff;
}
.product-card-horizontal:hover .card-img-wrap-horizontal img { transform: scale(1.06); }

/* Hot Products */
.hot-products-wrapper { padding: 10px 16px; }
.products-grid-horizontal {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}
.products-grid-horizontal .product-card-link-horizontal { flex: 0 0 calc(33.333% - 14px); min-width: 0; }
.products-grid-horizontal .product-card-link-horizontal .product-card-horizontal { width: 100%; }
.products-grid-horizontal .error-message { width: 100%; text-align: center; padding: 40px; color: var(--text-light); }

/* News Section (Home) */
.news-list { max-width: 900px; margin: 0 auto; }
.news-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    border-bottom: 1px solid var(--border-light);
    transition: all var(--transition);
}
.news-item:hover {
    padding-left: 12px;
    background: var(--bg-lighter);
    border-bottom-color: transparent;
    border-radius: var(--radius-sm);
    padding: 15px 12px;
}
.news-item a {
    color: var(--text-primary);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    flex: 1;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    padding-right: 16px;
}
.news-item a:hover { color: var(--primary); }
.news-item span { color: var(--text-light); font-size: 12px; white-space: nowrap; }

/* Brands Grid */
.brands-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}
.brand-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 20px 10px 16px;
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    text-decoration: none;
    color: var(--text-primary);
    transition: all var(--transition);
    flex: 0 0 calc(14.285% - 14px);
}
.brand-item:hover {
    border-color: var(--border-color);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
    text-decoration: none;
    color: var(--primary);
}
.brand-item img {
    width: 70px;
    height: 70px;
    object-fit: contain;
}
.brand-item span {
    font-size: 14px;
    font-weight: 500;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

/* ============================================
   Responsive - Small Desktop
   ============================================ */
@media (max-width: 1239px) {
    .banner { min-width: 0; }
    .banner-wrapper { min-width: 0; max-width: none; width: 100%; padding: 0 15px; }
}

/* ============================================
   Responsive - Tablet & Mobile
   ============================================ */
@media (max-width: 991px) {
    /* Hero Banner */
    .banner { height: 320px; min-width: 0; }
    .banner-wrapper { min-width: 0; max-width: none; width: 100%; padding: 0 20px; }
    .banner-content { min-width: 0; max-width: 100%; gap: 16px; }
    .banner h1 { font-size: 26px; margin-bottom: 8px; }
    .banner p { font-size: 14px; margin-bottom: 14px; }
    .banner-btn { padding: 10px 22px; font-size: 13px; }
    .banner-arrow { width: 36px; height: 36px; }
    .banner-dots { bottom: 0; }

    /* About Section */
    .about-section { padding: 36px 0; }
    .about-row { flex-direction: column; gap: 22px; }
    .about-img { width: 100%; }
    .about-subtitle { font-size: 19px; }
    .about-stats { flex-wrap: wrap; gap: 8px; margin-top: 22px; padding-top: 18px; }
    .about-stat { flex: 0 0 calc(50% - 4px); padding: 10px 0; }
    .about-stat .stat-num { font-size: 24px; }

    /* Sections & grids */
    .products-section { padding-top: 30px; margin-bottom: 30px; }
    .hot-products-wrapper { padding: 4px 8px; }
    .brand-item { flex: 0 0 calc(33.333% - 11px); padding: 14px 6px 12px; gap: 6px; }
    .brand-item img { width: 46px; height: 46px; }
    .brand-item span { font-size: 12px; }
}

@media (max-width: 576px) {
    .banner { height: 260px; }
    .banner h1 { font-size: 22px; }
    .banner-buttons { gap: 10px; }
    .banner-btn { padding: 9px 18px; font-size: 12px; }
}
