/* Home Page Styles */

/* Hero Section */
.hero-section {
    position: relative;
    color: white;
    padding: 4rem 0;
    margin-bottom: 0;
    overflow: hidden;
    min-height: 450px;
    display: flex;
    align-items: center;
}

.hero-background-slider {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.hero-bg-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0;
    transition: opacity 2s ease-in-out;
    transform: scale(1);
}

.hero-bg-image.active {
    opacity: 1;
    animation: zoomIn 10s ease-in-out forwards;
}

@keyframes zoomIn {
    0% { transform: scale(1); }
    100% { transform: scale(1.1); }
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(15, 32, 39, 0.90) 0%, rgba(32, 58, 67, 0.85) 50%, rgba(44, 83, 100, 0.80) 100%);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
}

.hero-title {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 1rem;
    line-height: 1.2;
    text-shadow: 2px 4px 8px rgba(0, 0, 0, 0.3);
    letter-spacing: -0.5px;
}

.hero-subtitle {
    font-size: 1.15rem;
    margin-bottom: 2rem;
    opacity: 0.95;
    line-height: 1.6;
    max-width: 90%;
    text-shadow: 1px 2px 4px rgba(0, 0, 0, 0.2);
}

.hero-buttons {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.hero-buttons .btn {
    padding: 0.875rem 2rem;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 50px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.hero-buttons .btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
}

.hero-buttons .btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.hero-buttons .btn-outline-light:hover {
    background: white;
    color: #667eea;
    transform: translateY(-3px);
}

.hero-carousel-indicators {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 2rem;
}

.hero-carousel-indicators .indicator {
    width: 12px;
    height: 12px;
    background: rgba(255, 255, 255, 0.4);
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.4s ease;
    border: 2px solid transparent;
}

.hero-carousel-indicators .indicator:hover {
    background: rgba(255, 255, 255, 0.7);
    transform: scale(1.2);
}

.hero-carousel-indicators .indicator.active {
    background: white;
    border-color: rgba(102, 126, 234, 0.8);
    transform: scale(1.3);
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

/* Products Section */
.products-section {
    padding: 2.5rem 0;
    background: linear-gradient(180deg, #ffffff 0%, #f8f9fa 100%);
}

.products-section.bg-light {
    background: linear-gradient(180deg, #f8f9fa 0%, #ffffff 100%);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    position: relative;
    padding-bottom: 0.75rem;
}

.section-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    border-radius: 2px;
}

.section-title {
    font-size: 2rem;
    font-weight: 800;
    color: #1a202c;
    margin: 0;
    letter-spacing: -0.5px;
}

.view-all-link {
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
    padding: 0.5rem 1.5rem;
    border-radius: 25px;
    border: 2px solid #667eea;
}

.view-all-link:hover {
    background: #667eea;
    color: white;
    transform: translateX(5px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

/* Horizontal Scroll Container */
.horizontal-scroll-wrapper {
    position: relative;
    width: 100%;
    overflow: hidden;
}

.horizontal-scroll-container {
    display: flex;
    gap: 1rem;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: #667eea #f8f9fa;
    padding-bottom: 1rem;
}

.horizontal-scroll-container::-webkit-scrollbar {
    height: 8px;
}

.horizontal-scroll-container::-webkit-scrollbar-track {
    background: #f8f9fa;
    border-radius: 10px;
}

.horizontal-scroll-container::-webkit-scrollbar-thumb {
    background: #667eea;
    border-radius: 10px;
}

.horizontal-scroll-container::-webkit-scrollbar-thumb:hover {
    background: #764ba2;
}

/* Product Card Wrapper for Horizontal Scroll */
.product-card-wrapper {
    flex: 0 0 calc((100% - 4rem) / 5); /* 5 items per view on desktop */
    min-width: calc((100% - 4rem) / 5);
    scroll-snap-align: start;
}

/* Product Card Link */
.product-card-link {
    text-decoration: none;
    color: inherit;
    display: block;
    height: 100%;
}

/* Product Card */
.product-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    height: 100%;
    display: flex;
    flex-direction: column;
    border: 1px solid rgba(0,0,0,0.05);
}

.product-card-link:hover .product-card {
    transform: translateY(-8px);
    box-shadow: 0 12px 28px rgba(102, 126, 234, 0.25);
    border-color: rgba(102, 126, 234, 0.2);
}

.product-image {
    position: relative;
    width: 100%;
    padding-top: 85%; /* Slightly taller aspect ratio */
    overflow: hidden;
    background: #f8f9fa;
}

.product-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-image-placeholder {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: #dee2e6;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

.badge-new,
.badge-popular {
    position: absolute;
    top: 12px;
    right: 12px;
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a6f 100%);
    color: white;
    padding: 0.35rem 0.9rem;
    border-radius: 25px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 12px rgba(255, 107, 107, 0.4);
}

.badge-popular {
    background: linear-gradient(135deg, #ffa500 0%, #ff8c00 100%);
    box-shadow: 0 4px 12px rgba(255, 165, 0, 0.4);
}

.product-body {
    padding: 1rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.product-name {
    font-size: 0.95rem;
    font-weight: 700;
    color: #1a202c;
    margin-bottom: 0.5rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    line-height: 1.3;
}

.product-description {
    font-size: 0.8rem;
    color: #718096;
    margin-bottom: 0.75rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    line-height: 1.4;
}

.product-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
    padding-top: 0.5rem;
    border-top: 1px solid rgba(0,0,0,0.05);
}

.product-price {
    font-size: 1rem;
    font-weight: 800;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.product-stock .badge {
    font-size: 0.65rem;
    padding: 0.25rem 0.6rem;
    border-radius: 12px;
    font-weight: 600;
}

.product-stock .badge.bg-success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
}

.product-stock .badge.bg-danger {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%) !important;
}

/* News Section */
.news-section {
    padding: 2.5rem 0;
    background: linear-gradient(180deg, #f8f9fa 0%, #e9ecef 100%);
}

/* News Card Wrapper for Horizontal Scroll */
.news-card-wrapper {
    flex: 0 0 calc((100% - 2rem) / 3); /* 3 items per view on desktop */
    min-width: calc((100% - 2rem) / 3);
    scroll-snap-align: start;
}

/* News Card Link */
.news-card-link {
    text-decoration: none;
    color: inherit;
    display: block;
    height: 100%;
}

.news-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    height: 100%;
    display: flex;
    flex-direction: column;
    border: 1px solid rgba(0,0,0,0.05);
}

.news-card-link:hover .news-card {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 12px 28px rgba(102, 126, 234, 0.25);
    border-color: rgba(102, 126, 234, 0.2);
}

.news-image {
    height: 240px;
    background-size: cover;
    background-position: center;
    position: relative;
    transition: transform 0.4s ease;
}

.news-card-link:hover .news-image {
    transform: scale(1.05);
}

.news-video {
    position: relative;
    height: 240px;
    background: #000;
    overflow: hidden;
}

.news-video .video-container {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.news-video .video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
    transition: transform 0.4s ease;
}

.news-card-link:hover .news-video .video-container iframe {
    transform: scale(1.02);
}

.news-image-placeholder {
    height: 240px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
    color: #dee2e6;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

.video-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.95) 0%, rgba(220, 38, 38, 0.95) 100%);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 25px;
    font-size: 0.8rem;
    font-weight: 700;
    backdrop-filter: blur(8px);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.4);
    z-index: 10;
}

.news-body {
    padding: 2rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.news-meta {
    color: #718096;
    font-size: 0.875rem;
    margin-bottom: 0.875rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.news-meta i {
    color: #667eea;
}

.news-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1a202c;
    margin-bottom: 0.875rem;
    line-height: 1.4;
    min-height: 2.8em;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-excerpt {
    color: #718096;
    font-size: 0.95rem;
    margin-bottom: 1.25rem;
    flex: 1;
    line-height: 1.7;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.btn-read-more {
    color: #667eea;
    text-decoration: none;
    font-weight: 700;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    font-size: 0.95rem;
    padding: 0.625rem 1.25rem;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
    border-radius: 25px;
    align-self: flex-start;
}

.btn-read-more i {
    transition: transform 0.3s;
    margin-left: 0.25rem;
}

.news-card-link:hover .btn-read-more {
    color: white;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.news-card-link:hover .btn-read-more i {
    transform: translateX(5px);
}

/* Contact Section */
.contact-section {
    background: linear-gradient(135deg, #1a202c 0%, #2d3748 50%, #1a202c 100%);
    color: white;
    padding: 2.5rem 0;
    position: relative;
    overflow: hidden;
}

.contact-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg"><defs><pattern id="grid" width="100" height="100" patternUnits="userSpaceOnUse"><path d="M 100 0 L 0 0 0 100" fill="none" stroke="rgba(255,255,255,0.05)" stroke-width="1"/></pattern></defs><rect width="100%" height="100%" fill="url(%23grid)"/></svg>');
    opacity: 0.3;
}

.contact-section > .container {
    position: relative;
    z-index: 1;
}

.contact-title {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 1rem;
    letter-spacing: -0.5px;
}

.contact-subtitle {
    font-size: 1.1rem;
    margin-bottom: 1.75rem;
    opacity: 0.9;
    line-height: 1.6;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.contact-item {
    display: flex;
    gap: 1.25rem;
    align-items: start;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s;
}

.contact-link {
    text-decoration: none;
    color: inherit;
    cursor: pointer;
}

.contact-link .contact-item {
    cursor: pointer;
}

.contact-item:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateX(5px);
}

.contact-link:hover {
    color: inherit;
    text-decoration: none;
}

.contact-link:hover .contact-item {
    background: rgba(255, 255, 255, 0.08);
    transform: translateX(5px);
}

.contact-item i {
    font-size: 1.25rem;
    color: #667eea;
    margin-top: 0;
    background: white;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
    flex-shrink: 0;
}

.contact-item strong {
    display: block;
    font-size: 1rem;
    margin-bottom: 0.25rem;
    font-weight: 700;
}

.contact-item p {
    margin: 0;
    opacity: 0.85;
    font-size: 0.95rem;
}

.social-section {
    background: rgba(255,255,255,0.08);
    border-radius: 16px;
    padding: 2rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.social-title {
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    text-align: center;
    letter-spacing: -0.5px;
}

.social-links-large {
    display: flex;
    flex-direction: column;
    gap: 0.875rem;
}

.social-link-large {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.25rem;
    border-radius: 12px;
    color: white;
    text-decoration: none;
    font-weight: 700;
    font-size: 1rem;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.social-link-large.facebook {
    background: linear-gradient(135deg, #3b5998 0%, #2d4373 100%);
}

.social-link-large.facebook:hover {
    background: linear-gradient(135deg, #2d4373 0%, #1e2d4c 100%);
    transform: translateX(10px) scale(1.02);
    box-shadow: 0 6px 20px rgba(59, 89, 152, 0.4);
}

.social-link-large.youtube {
    background: linear-gradient(135deg, #ff0000 0%, #cc0000 100%);
}

.social-link-large.youtube:hover {
    background: linear-gradient(135deg, #cc0000 0%, #990000 100%);
    transform: translateX(10px) scale(1.02);
    box-shadow: 0 6px 20px rgba(255, 0, 0, 0.4);
}

.social-link-large.tiktok {
    background: linear-gradient(135deg, #000000 0%, #1a1a1a 100%);
}

.social-link-large.tiktok:hover {
    background: linear-gradient(135deg, #1a1a1a 0%, #333333 100%);
    transform: translateX(10px) scale(1.02);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.6);
}

.social-link-large i {
    font-size: 1.5rem;
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 8px;
}

/* Large Tablet (992px - 1199px) */
@media (max-width: 1199px) {
    .product-card-wrapper {
        flex: 0 0 calc((100% - 3rem) / 4); /* 4 items per view on large tablet */
        min-width: calc((100% - 3rem) / 4);
    }

    .news-card-wrapper {
        flex: 0 0 calc((100% - 1.5rem) / 2.5); /* ~2.5 items per view on large tablet */
        min-width: calc((100% - 1.5rem) / 2.5);
    }
}

/* Tablet (768px - 991px) */
@media (max-width: 991px) {
    .product-card-wrapper {
        flex: 0 0 calc((100% - 2rem) / 3); /* 3 items per view on tablet */
        min-width: calc((100% - 2rem) / 3);
    }

    .news-card-wrapper {
        flex: 0 0 calc((100% - 1rem) / 2); /* 2 items per view on tablet */
        min-width: calc((100% - 1rem) / 2);
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .section-title {
        font-size: 1.75rem;
    }

    .hero-section {
        min-height: 450px;
    }
}

/* Small Tablet (576px - 767px) - IMPROVED READABILITY */
@media (max-width: 767px) {
    .product-card-wrapper {
        flex: 0 0 calc((100% - 1.5rem) / 2.5); /* 2.5 items per view on mobile */
        min-width: calc((100% - 1.5rem) / 2.5);
    }

    .news-card-wrapper {
        flex: 0 0 calc((100% - 0.75rem) / 1.5); /* ~1.5 items per view on small tablet */
        min-width: calc((100% - 0.75rem) / 1.5);
    }

    .hero-section {
        padding: 3rem 0;
    }

    .hero-title {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .hero-section {
        min-height: 400px;
        padding: 3rem 0;
    }

    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .section-title {
        font-size: 1.5rem;
    }

    /* IMPROVED: Better font sizes for tablets */
    .product-name {
        font-size: 0.85rem; /* Increased from 0.75rem */
        font-weight: 700;
    }

    .product-description {
        font-size: 0.75rem; /* Increased from 0.7rem */
    }

    .product-price {
        font-size: 0.875rem; /* Increased from 0.75rem */
        font-weight: 800;
    }

    .product-body {
        padding: 0.875rem;
    }

    .contact-section {
        padding: 3rem 0;
    }

    .contact-title {
        font-size: 1.5rem;
    }

    .contact-subtitle {
        font-size: 1rem;
    }
}

/* Extra Small (< 576px) - ENHANCED MOBILE VISIBILITY */
@media (max-width: 575px) {
    .product-card-wrapper {
        flex: 0 0 calc((100% - 1rem) / 2); /* 2 items per view on very small screens */
        min-width: calc((100% - 1rem) / 2);
    }

    .news-card-wrapper {
        flex: 0 0 calc((100% - 0.75rem) / 1.5); /* ~1.5 items per view on very small screens */
        min-width: calc((100% - 0.75rem) / 1.5);
    }

    .horizontal-scroll-container {
        gap: 0.75rem;
    }

    /* IMPROVED: Larger padding for mobile */
    .product-body {
        padding: 0.75rem 0.625rem;
    }

    /* IMPROVED: Larger, more readable font sizes */
    .product-name {
        font-size: 0.85rem; /* Increased from 0.7rem */
        margin-bottom: 0.35rem;
        font-weight: 700;
        line-height: 1.25;
    }

    .product-description {
        font-size: 0.75rem; /* Increased from 0.65rem */
        margin-bottom: 0.5rem;
        line-height: 1.3;
    }

    .product-price {
        font-size: 0.9rem; /* Increased from 0.7rem */
        font-weight: 800;
    }

    /* IMPROVED: Larger badges for better visibility */
    .product-stock .badge {
        font-size: 0.65rem; /* Increased from 0.55rem */
        padding: 0.25rem 0.45rem;
        font-weight: 700;
    }

    /* IMPROVED: Larger badge indicators */
    .badge-new,
    .badge-popular {
        font-size: 0.65rem; /* Increased */
        padding: 0.4rem 0.75rem;
        top: 8px;
        right: 8px;
    }

    /* IMPROVED: Better spaced footer */
    .product-footer {
        padding-top: 0.625rem;
        gap: 0.5rem;
    }

    .hero-buttons {
        flex-direction: column;
        width: 100%;
    }

    .hero-buttons .btn {
        width: 100%;
    }

    .hero-section {
        min-height: 350px;
    }

    .hero-carousel-indicators {
        margin-top: 1rem;
        gap: 0.5rem;
    }

    .hero-carousel-indicators .indicator {
        width: 40px;
        height: 3px;
    }

    .hero-carousel-indicators .indicator.active {
        width: 50px;
    }
}
