/* =====================================================
   GALLERY SECTIONS - Instagram, Gallery Page, Báo Chí
   ===================================================== */

.gallery-section {
    text-align: center;
    padding: 40px 20px;
}

.gallery-container {
    max-width: 1600px;
    margin: 0 auto;
}

.gallery-header {
    margin-bottom: 30px;
}

.gallery-header img {
    max-width: 100%;
    height: auto;
    display: inline-block;
}

.gallery-title {
    margin-top: 15px;
    font-size: 32px;
    font-weight: bold;
    color: #1d1e1e;
    font-family: 'Arima Madurai', serif;
    position: relative;
    padding-bottom: 50px;
}

/* Decoration image mặc định cho title khi không có heading image */
.gallery-header:not(:has(img)) .gallery-title::after {
    content: url(../../images/img_title.png);
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
}

.gallery-slider {
    margin-top: 20px;
    padding: 10px;
    position: relative;
    overflow: hidden;
    width: 100%;
}

.gallery-slider .swiper-wrapper {
    display: flex;
    align-items: stretch;
    cursor: grab;
    user-select: none;
}

.gallery-slider .swiper-wrapper:active {
    cursor: grabbing;
}

.gallery-slider .swiper-slide {
    flex-shrink: 0;
    width: auto;
    height: auto;
    display: flex;
    align-items: stretch;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.gallery-item {
    padding: 5px;
    height: 100%;
}

.gallery-item img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    display: block;
    transition: transform 0.3s ease;
}

.gallery-item a {
    display: block;
}

.gallery-item:hover img {
    transform: scale(1.05);
}

/* =====================================================
   SWIPER GLOBAL STYLES - Pagination & Navigation
   ===================================================== */

/* Pagination - áp dụng cho tất cả Swiper sliders */
.swiper .swiper-pagination {
    position: relative !important;
    margin-top: 20px !important;
    bottom: auto !important;
    left: 0 !important;
    width: 100% !important;
    text-align: center !important;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    height: auto !important;
    min-height: 20px !important;
    line-height: normal !important;
    z-index: 10 !important;
    padding: 0 !important;
    margin-bottom: 0 !important;
}

.swiper .swiper-pagination-bullet {
    width: 8px !important;
    height: 8px !important;
    background-color: #ddd !important;
    opacity: 1 !important;
    margin: 0 4px !important;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1) !important;
    cursor: pointer !important;
    display: inline-block !important;
    border-radius: 50% !important;
    vertical-align: middle !important;
}

.swiper .swiper-pagination-bullet:hover {
    background-color: #c93795 !important;
    opacity: 0.7 !important;
    transform: scale(1.1) !important;
}

.swiper .swiper-pagination-bullet-active {
    background-color: #c93795 !important;
    width: 24px !important;
    border-radius: 4px !important;
}

/* Navigation Buttons - áp dụng cho tất cả Swiper sliders */
.swiper-button-next,
.swiper-button-prev {
    width: 44px !important;
    height: 44px !important;
    background-color: #fff !important;
    border-radius: 50% !important;
    border: 1px solid #e0e0e0 !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1) !important;
    transition: all 0.3s ease !important;
}

.swiper-button-next:hover,
.swiper-button-prev:hover {
    background-color: #f5f5f5 !important;
    border-color: #ccc !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
}

.swiper-button-next::after,
.swiper-button-prev::after {
    font-size: 16px !important;
    color: #333 !important;
    font-weight: bold !important;
}

.swiper-button-next svg,
.swiper-button-prev svg {
    width: 11px !important;
    height: 20px !important;
}

.swiper-button-next svg path,
.swiper-button-prev svg path {
    fill: #333 !important;
}

.swiper-button-disabled {
    opacity: 0.35 !important;
    cursor: not-allowed !important;
}

/* =====================================================
   RELATED PRODUCTS SLIDER
   ===================================================== */

.related-products-section {
    padding: 40px 0;
    width: 100%;
}

.related-products-section .section-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.related-products-slider .product-small {
    width: 100%;
}

.related-products-slider .box {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.related-products-slider .box:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
    border-color: #c93795;
}

.related-products-slider .box-image {
    position: relative;
    width: 100%;
    padding-bottom: 100%;
    overflow: hidden;
    background: #f9fafb;
}

.related-products-slider .box-image .image-fade_in_back {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.related-products-slider .box-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.related-products-slider .box:hover .box-image img {
    transform: scale(1.05);
}

.related-products-slider .box-text {
    padding: 15px;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.related-products-slider .product-title {
    font-size: 14px;
    line-height: 1.4;
    margin: 0 0 8px 0;
    min-height: 40px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.related-products-slider .product-title a {
    color: #1f2937;
    text-decoration: none;
    transition: color 0.2s ease;
}

.related-products-slider .product-title a:hover {
    color: #c93795;
}

.related-products-slider .price-wrapper {
    margin-top: 8px;
}

.related-products-slider .price {
    font-size: 16px;
    font-weight: bold;
    color: #c93795;
}

.related-products-slider .price del {
    color: #9ca3af;
    font-size: 14px;
    font-weight: normal;
    margin-right: 5px;
}

.related-products-slider .price ins {
    text-decoration: none;
}

.related-products-slider .rating-wrapper {
    margin-top: 8px;
}

.related-products-slider .star-rating {
    font-size: 12px;
    color: #fbbf24;
}

/* =====================================================
   RESPONSIVE - MOBILE
   ===================================================== */

@media (max-width: 767px) {

    /* Gallery Grid 2x2 cho mobile */
    .gallery-grid-2x2 {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 10px;
        width: 100%;
    }

    .gallery-grid-2x2 .gallery-item {
        padding: 0;
        width: 100%;
    }

    .gallery-grid-2x2 img {
        width: 100%;
        height: auto;
        border-radius: 8px;
        display: block;
    }

    .gallery-slider {
        padding: 10px 0;
    }

    .gallery-slider .swiper-slide {
        width: 100%;
    }

    .gallery-section {
        padding: 30px 15px;
    }

    .gallery-title {
        font-size: 20px;
    }

    /* Navigation buttons nhỏ hơn trên mobile */
    .swiper-button-next,
    .swiper-button-prev {
        width: 36px !important;
        height: 36px !important;
    }

    .swiper-button-next::after,
    .swiper-button-prev::after {
        font-size: 14px !important;
    }

    /* Related Products Mobile */
    .related-products-section {
        padding: 30px 0;
    }

    .related-products-section .section-content {
        padding: 0 15px;
    }

    .related-products-slider .product-title {
        font-size: 13px;
        min-height: 36px;
    }

    .related-products-slider .price {
        font-size: 14px;
    }
}