/**
 * Homepage Styles - Pháp Phục Tu Sĩ
 * Dark Professional | 1440px | 90px padding | Centered
 */

/* ============================================================
 * 0. GLOBAL VARIABLES & CONTAINERS
 * ============================================================ */
:root {
    --pp-max-width: 1440px;
    --pp-padding-x: 90px;
}

.pp-container {
    max-width: var(--pp-max-width) !important;
    padding-left: var(--pp-padding-x) !important;
    padding-right: var(--pp-padding-x) !important;
    margin-left: auto !important;
    margin-right: auto !important;
    width: 100% !important;
}

/* ============================================================
 * 1. HERO SECTION
 * ============================================================ */
.pp-hero-section,
.pp-hero {
    position: relative;
    width: 100%;
    padding: 0;
    margin: 0;
    overflow: hidden;
    background: transparent;
}

.pp-hero-slide {
    width: 100%;
    position: relative;
}

/* Let the image control the height to avoid cropping */
.pp-hero-img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: contain;
}

.pp-hero-image-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    z-index: 1;
}

.pp-hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 10, 10, 0.4);
    z-index: 2;
}

.pp-hero-content-wrapper {
    position: relative;
    z-index: 3;
    max-width: var(--pp-max-width);
    padding: 0 var(--pp-padding-x);
    width: 100%;
    text-align: center;
}

.pp-hero-content {
    max-width: 800px;
    margin: 0 auto;
}

.pp-hero-subtitle {
    display: inline-block;
    font-size: 0.875rem;
    font-weight: 700;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--pp-gold);
    margin-bottom: 20px;
    padding: 6px 16px;
    background: var(--pp-gold-soft);
    border: 1px solid var(--pp-gold-border);
    border-radius: 100px;
}

.pp-hero-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 800;
    color: var(--pp-white);
    margin-bottom: 30px;
    line-height: 1.2;
    text-shadow: 0 4px 12px rgba(0,0,0,0.5);
    letter-spacing: -0.02em;
}

.pp-hero-btn {
    min-width: 200px;
}

.pp-hero-empty {
    padding: 100px 20px;
    text-align: center;
    background: var(--pp-bg-card);
    color: var(--pp-text-muted);
}

/* ============================================================
 * 2. CATEGORY SLIDER
 * ============================================================ */
.pp-category-slider {
    padding: 96px 0;
    background: var(--pp-bg-section);
    border-top: 1px solid var(--pp-border);
    border-bottom: 1px solid var(--pp-border);
}

.pp-category-slider .pp-container {
    max-width: var(--pp-max-width);
    padding-left: var(--pp-padding-x);
    padding-right: var(--pp-padding-x);
}

.pp-category-card {
    background: var(--pp-bg-card);
    border: 1px solid var(--pp-border);
    border-radius: var(--pp-radius-lg);
    overflow: hidden;
    transition: var(--pp-transition);
}

.pp-category-card:hover {
    border-color: var(--pp-border-gold);
    box-shadow: var(--pp-shadow), var(--pp-glow-gold);
    transform: translateY(-6px);
}

.pp-category-card__image {
    position: relative;
    padding-top: 100%; /* 1:1 Aspect Ratio / Square */
    background: var(--pp-bg-overlay);
    overflow: hidden;
}

.pp-category-card__image img {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    object-position: center !important;
    transition: transform 0.5s ease;
}

.pp-category-card:hover .pp-category-card__image img {
    transform: scale(1.06);
}

.pp-category-card__content {
    padding: 15px 10px;
    text-align: center;
}

.pp-category-card__title {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--pp-text-primary);
    margin-bottom: 4px;
    letter-spacing: -0.01em;
}

.pp-category-card__count {
    font-size: 0.75rem;
    color: var(--pp-text-muted);
}

/* Slider Buttons (Flickity) */
.flickity-prev-next-button {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    width: 44px !important;
    height: 44px !important;
}

.flickity-prev-next-button:hover {
    background: transparent !important;
}

.flickity-prev-next-button .flickity-button-icon {
    fill: var(--pp-gold) !important;
}

.flickity-page-dots .dot {
    background: var(--pp-border-strong) !important;
    opacity: 1 !important;
}

.flickity-page-dots .dot.is-selected {
    background: var(--pp-gold) !important;
}


/* ============================================================
 * 3. PRODUCT TABS
 * ============================================================ */
.pp-product-tabs,
.pp-product-collections {
    padding: 96px 0;
    background: var(--pp-bg-alt);
}

.pp-product-tabs > .container,
.pp-product-tabs > .pp-container {
    max-width: var(--pp-max-width);
    padding-left: var(--pp-padding-x);
    padding-right: var(--pp-padding-x);
    margin: 0 auto;
}

/* Section heading trong tabs */
.pp-product-tabs .section-header,
.pp-product-tabs .pp-section-heading {
    text-align: center;
    margin-bottom: 48px;
}

.pp-product-tabs .section-title,
.pp-product-tabs .pp-section-heading__title,
.pp-product-tabs h2 {
    font-size: clamp(1.875rem, 3vw, 2.5rem);
    font-weight: 700;
    color: var(--pp-white);
    margin-bottom: 12px;
    letter-spacing: -0.02em;
}

/* ---- Nav Tabs (Flatsome-compatible) ---- */
.product-tabs-wrapper {
    width: 100%;
}

.product-tabs-wrapper .nav-line {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    list-style: none;
    padding: 0;
    margin: 0 0 48px;
    border-bottom: 1px solid var(--pp-border) !important;
    padding-bottom: 0;
    justify-content: center;
}

.product-tabs-wrapper .nav-line .tab {
    margin-bottom: -1px;
    margin-left: 0;
    margin-right: 0;
    padding: 0;
}

.product-tabs-wrapper .nav-line .tab > a {
    display: block;
    padding: 12px 24px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--pp-text-secondary) !important;
    background: transparent !important;
    border: 1px solid transparent !important;
    border-bottom: 2px solid transparent !important;
    border-radius: var(--pp-radius) var(--pp-radius) 0 0;
    cursor: pointer;
    transition: var(--pp-transition);
    letter-spacing: 0.02em;
    text-decoration: none;
    white-space: nowrap;
    text-transform: none;
}

.product-tabs-wrapper .nav-line .tab > a:hover {
    color: var(--pp-gold) !important;
    background: var(--pp-gold-soft) !important;
    border-color: var(--pp-border) !important;
    border-bottom-color: transparent !important;
}

.product-tabs-wrapper .nav-line .tab.active > a {
    color: var(--pp-gold) !important;
    background: var(--pp-bg-card) !important;
    border-color: var(--pp-border) !important;
    border-bottom: 2px solid var(--pp-gold) !important;
}

/* Tab Content */
.product-tabs-wrapper .tab-content {
    min-height: 300px;
}

.product-tabs-wrapper .tab-pane {
    display: none;
    animation: fadeInTab 0.3s ease;
}

.product-tabs-wrapper .tab-pane.active {
    display: block;
}

@keyframes fadeInTab {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0); }
}

.product-tabs-wrapper .no-products {
    text-align: center;
    color: var(--pp-text-muted);
    padding: 80px 20px;
    font-size: 1rem;
}

/* Products grid trong tab & collections */
.product-tabs-wrapper .products-grid .row,
.collections-wrapper .products-grid .row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

.product-tabs-wrapper .products-grid .col-lg-3,
.product-tabs-wrapper .products-grid .col-md-4,
.product-tabs-wrapper .products-grid .col-sm-6,
.collections-wrapper .products-grid .col-lg-3,
.collections-wrapper .products-grid .col-md-4,
.collections-wrapper .products-grid .col-sm-6 {
    width: 100%;
    padding: 0;
    margin: 0;
    float: none;
}

/* ============================================================
 * 4. PROMOTIONAL BANNER
 * ============================================================ */
.pp-promo-banner {
    padding: 96px 0;
    background: var(--pp-bg-section);
    border-top: 1px solid var(--pp-border);
    border-bottom: 1px solid var(--pp-border);
}

.pp-promo-banner__container {
    max-width: var(--pp-max-width);
    padding-left: var(--pp-padding-x);
    padding-right: var(--pp-padding-x);
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: center;
}

.pp-promo-banner__content { order: 1; }
.pp-promo-banner__image   { order: 2; }

.pp-promo-banner__badge {
    display: inline-block;
    padding: 6px 14px;
    background: var(--pp-gold-soft);
    color: var(--pp-gold);
    border: 1px solid var(--pp-gold-border);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    border-radius: 100px;
    margin-bottom: 20px;
}

.pp-promo-banner__title {
    font-size: clamp(2rem, 3.5vw, 2.75rem);
    font-weight: 700;
    color: var(--pp-white);
    margin-bottom: 16px;
    letter-spacing: -0.02em;
}

.pp-promo-banner__description {
    font-size: 1.0625rem;
    line-height: 1.7;
    color: var(--pp-text-secondary);
    margin-bottom: 36px;
}

.pp-promo-banner__image img {
    width: 100%;
    height: auto;
    border-radius: var(--pp-radius-xl);
    box-shadow: var(--pp-shadow-lg);
}


/* ============================================================
 * 5. PRODUCT COLLECTIONS
 * ============================================================ */
.pp-product-collection {
    padding: 96px 0;
    background: var(--pp-bg-page);
}

.pp-product-collection + .pp-product-collection {
    background: var(--pp-bg-alt);
    border-top: 1px solid var(--pp-border);
}

.pp-product-collection .pp-container {
    max-width: var(--pp-max-width);
    padding-left: var(--pp-padding-x);
    padding-right: var(--pp-padding-x);
    margin: 0 auto;
}

.pp-collection-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 40px;
}

.pp-collection-title {
    font-size: clamp(1.5rem, 2.5vw, 2rem);
    font-weight: 700;
    color: var(--pp-white);
    letter-spacing: -0.02em;
}

.pp-collection-description {
    color: var(--pp-text-secondary);
    margin-top: 8px;
    font-size: 0.9375rem;
}


/* ============================================================
 * 6. BRAND STORY
 * ============================================================ */
.pp-brand-story {
    padding: 96px 0;
    background: var(--pp-bg-section);
    border-top: 1px solid var(--pp-border);
}

.pp-brand-story__container {
    max-width: var(--pp-max-width);
    padding-left: var(--pp-padding-x);
    padding-right: var(--pp-padding-x);
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: center;
}

.pp-brand-story__image img {
    width: 100%;
    height: auto;
    border-radius: var(--pp-radius-xl);
    box-shadow: var(--pp-shadow-lg);
}

.pp-brand-story__title {
    font-size: clamp(1.875rem, 3vw, 2.5rem);
    font-weight: 700;
    color: var(--pp-white);
    margin-bottom: 20px;
    letter-spacing: -0.02em;
}

.pp-brand-story__description {
    font-size: 1.0625rem;
    line-height: 1.75;
    color: var(--pp-text-secondary);
    margin-bottom: 36px;
}

.pp-brand-story__points {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.pp-story-point {
    display: flex;
    align-items: center;
    gap: 14px;
    color: var(--pp-text-primary);
    font-size: 0.9375rem;
}

.pp-story-point::before {
    content: '✓';
    display: flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    min-width: 26px;
    background: var(--pp-gold);
    color: #0a0a0a;
    border-radius: 50%;
    font-weight: 800;
    font-size: 0.75rem;
}


/* ============================================================
 * 7. SERVICE BENEFITS
 * ============================================================ */
.pp-services {
    padding: 96px 0;
    background: var(--pp-bg-page);
    border-top: 1px solid var(--pp-border);
}

.pp-services .pp-container {
    max-width: var(--pp-max-width);
    padding-left: var(--pp-padding-x);
    padding-right: var(--pp-padding-x);
    margin: 0 auto;
}

.pp-services__grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    margin-top: 56px;
}

.pp-service-item {
    text-align: center;
    padding: 36px 28px;
    background: var(--pp-bg-card);
    border: 1px solid var(--pp-border);
    border-radius: var(--pp-radius-lg);
    transition: var(--pp-transition);
}

.pp-service-item:hover {
    border-color: var(--pp-border-gold);
    box-shadow: var(--pp-shadow), var(--pp-glow-gold);
    transform: translateY(-6px);
}

.pp-service-item__icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--pp-gold-soft);
    border: 1px solid var(--pp-gold-border);
    border-radius: var(--pp-radius-lg);
}

.pp-service-item__icon img,
.pp-service-item__icon svg {
    width: 32px;
    height: 32px;
    object-fit: contain;
}

.pp-service-item__title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--pp-text-primary);
    margin-bottom: 10px;
    letter-spacing: -0.01em;
}

.pp-service-item__description {
    font-size: 0.875rem;
    color: var(--pp-text-secondary);
    line-height: 1.6;
}

/* ============================================================
 * 9. BLOG GRID (HOVER EFFECTS)
 * ============================================================ */
.pp-blog-card:hover {
    transform: translateY(-5px) !important;
}
.pp-blog-card:hover .pp-blog-card__image {
    transform: scale(1.05) !important;
}
.pp-blog-card__title a:hover {
    color: var(--pp-gold) !important;
}
.pp-blog-card__readmore:hover {
    opacity: 0.8;
}

/* Blog Responsive Overrides */
@media (max-width: 767px) {
    .pp-blog-list-item {
        flex-direction: column !important;
    }
    .pp-blog-list-item .pp-blog-card__image-link {
        width: 100% !important;
        padding-top: 56.25% !important; /* 16:9 ratio */
    }
    .pp-blog-list-item .pp-blog-card__content {
        width: 100% !important;
        padding: 20px !important;
    }
    .pp-blog-featured .pp-blog-card__image-link {
        padding-top: 56.25% !important;
        aspect-ratio: auto !important;
    }
}

/* ============================================================
 * 10. RESPONSIVE DESIGN
 * ============================================================ */
@media (max-width: 1199px) {
    .product-tabs-wrapper .products-grid .row,
    .collections-wrapper .products-grid .row {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 991px) {
    .product-tabs-wrapper .products-grid .row,
    .collections-wrapper .products-grid .row,
    .pp-services__grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .pp-promo-banner__container,
    .pp-brand-story__container {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    .pp-brand-story__image {
        order: -1;
    }
}

@media (max-width: 767px) {
    .product-tabs-wrapper .products-grid .row,
    .collections-wrapper .products-grid .row {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    .pp-services__grid {
        grid-template-columns: 1fr;
    }
    .pp-section-heading__title, 
    .section-title,
    .pp-collection-title,
    .pp-brand-story__title,
    .pp-promo-banner__title {
        font-size: 1.5rem !important;
    }
    .pp-category-slider,
    .pp-product-tabs,
    .pp-product-collections,
    .pp-product-collection,
    .pp-brand-story,
    .pp-services,
    .pp-promo-banner {
        padding: 60px 0;
    }
}
