/* =========================================
   CMS Pages Styles
   - About Us
   - Custom Made
   - Style Gallery
   ========================================= */

/* Common Utilities */
.mb-lg {
    margin-bottom: var(--spacing-lg);
}

.mt-lg {
    margin-top: var(--spacing-lg);
}

.mb-md {
    margin-bottom: var(--spacing-md);
}

.btn-outline-dark {
    background: transparent;
    border: 1px solid #333;
    color: #333;
    padding: 10px 24px;
    font-weight: 500;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-outline-dark:hover {
    background: #333;
    color: #fff;
}

/* =========================================
   About Us Page
   ========================================= */
.page-about {
    padding-bottom: var(--spacing-xl);
}

/* About Hero */
.about-hero {
    position: relative;
    height: 50vh;
    min-height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.about-hero .hero-bg-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.about-hero .hero-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.about-hero .hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
}

.about-hero-content {
    position: relative;
    z-index: 10;
    text-align: center;
    color: #fff;
}

.about-hero-content h1 {
    font-size: 2rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 3px;
    margin-bottom: var(--spacing-sm);
}

.about-hero-content p {
    font-size: 1.1rem;
    opacity: 0.9;
}

/* About Intro */
.about-intro {
    padding: var(--spacing-xl) 0;
}

.about-intro-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--spacing-lg);
}

.intro-text h2 {
    font-size: 1.75rem;
    margin-bottom: var(--spacing-md);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.intro-text p {
    line-height: 1.8;
    color: #555;
    margin-bottom: var(--spacing-md);
}

.intro-image img {
    border-radius: var(--radius-md, 8px);
    max-height: 400px;
    object-fit: cover;
}

/* About Features */
.about-features {
    padding: var(--spacing-xl) 0;
    background: #f9f9f9;
}

.about-features-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--spacing-md);
}

.about-feature-card {
    background: #fff;
    padding: var(--spacing-lg);
    text-align: center;
    border-radius: var(--radius-md, 8px);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.about-feature-card .feature-icon {
    font-size: 2.5rem;
    margin-bottom: var(--spacing-sm);
}

.about-feature-card h3 {
    font-size: 1rem;
    font-weight: 600;
    text-transform: uppercase;
    margin-bottom: var(--spacing-xs);
}

.about-feature-card p {
    font-size: 0.9rem;
    color: #666;
    line-height: 1.6;
}

/* About Contact */
.about-contact {
    padding: var(--spacing-xl) 0;
}

.about-contact h3 {
    font-size: 1.5rem;
    margin-bottom: var(--spacing-sm);
}

.about-contact .link-underlined {
    color: var(--primary-color);
    border-bottom: 1px solid var(--primary-color);
}

/* =========================================
   Custom Made Page
   ========================================= */
.page-custom {
    padding-bottom: var(--spacing-xl);
}

/* Custom Hero */
.custom-hero {
    position: relative;
}

.custom-hero-top {
    position: relative;
    padding: 80px var(--spacing-md) 120px;
    text-align: center;
    min-height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.custom-hero-top .hero-bg-absolute {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.custom-hero-top .hero-bg-absolute img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.custom-hero-top .overlay-dark {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
}

.custom-title {
    font-size: 2.5rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 3px;
    color: #fff;
    position: relative;
    z-index: 10;
    margin-bottom: var(--spacing-sm);
}

.custom-subtitle {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.9);
    text-transform: uppercase;
    letter-spacing: 2px;
    position: relative;
    z-index: 10;
}

/* Custom Scenes Grid */
.custom-scenes {
    margin-top: -80px;
    position: relative;
    z-index: 20;
}

.scene-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--spacing-sm);
}

.scene-item {
    aspect-ratio: 3/4;
    overflow: hidden;
    border-radius: var(--radius-md, 8px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.scene-item img {
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

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

/* Custom Emphasis Bar */
.custom-emphasis-bar {
    background: #222;
    color: #fff;
    padding: var(--spacing-lg) 0;
    margin-top: var(--spacing-xl);
}

.custom-emphasis-bar h2 {
    font-size: 1.25rem;
    font-weight: 500;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin: 0;
}

/* Custom Section */
.custom-section {
    padding: var(--spacing-xl) 0;
}

.content-text-block {
    max-width: 800px;
    margin: 0 auto;
    line-height: 1.8;
    color: #555;
}

.content-text-block p {
    margin-bottom: var(--spacing-md);
}

/* Benefits Section */
.benefits-section {
    background: #f9f9f9;
}

.benefits-container {
    max-width: 700px;
    margin: 0 auto;
}

.benefits-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.benefits-list li {
    display: flex;
    gap: var(--spacing-md);
    padding: var(--spacing-md) 0;
    border-bottom: 1px solid #eee;
}

.benefits-list li:last-child {
    border-bottom: none;
}

.check-icon {
    flex-shrink: 0;
    width: 30px;
    height: 30px;
    background: var(--primary-color);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

.benefit-content strong {
    display: block;
    font-size: 1rem;
    margin-bottom: 4px;
}

.benefit-content p {
    font-size: 0.9rem;
    color: #666;
    margin: 0;
    line-height: 1.5;
}

/* Custom Submit Section */
.custom-submit-section {
    background: #222;
    color: #fff;
    padding: var(--spacing-xl) 0;
}

.custom-submit-section h3 {
    font-size: 1.5rem;
    margin-bottom: var(--spacing-sm);
}

.custom-submit-section>.container>p {
    opacity: 0.8;
    margin-bottom: var(--spacing-md);
}

.submit-content-row {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--spacing-lg);
}

.info-checklist {
    text-align: left;
    list-style: disc;
    padding-left: 20px;
    opacity: 0.9;
    line-height: 1.8;
}

.btn-custom-submit {
    padding: 15px 40px;
    font-size: 1rem;
}

/* =========================================
   Style Gallery Page
   ========================================= */
.page-gallery {
    padding-bottom: var(--spacing-xl);
}

/* Gallery Hero */
.gallery-hero {
    background: linear-gradient(135deg, #fce4ec 0%, #f8bbd9 100%);
    padding: var(--spacing-xl) 0;
    text-align: center;
}

.gallery-title {
    font-size: 2.5rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 3px;
    margin-bottom: var(--spacing-sm);
    color: #333;
}

.gallery-subtitle {
    font-size: 1.1rem;
    color: #666;
    margin-bottom: var(--spacing-lg);
}

.gallery-actions {
    display: flex;
    justify-content: center;
    gap: var(--spacing-md);
    flex-wrap: wrap;
}

/* Gallery Tabs */
.gallery-nav-section {
    padding: var(--spacing-md) 0;
    border-bottom: 1px solid #eee;
    background: #fff;
    position: sticky;
    top: 60px;
    z-index: 50;
}

.gallery-tabs {
    display: flex;
    gap: var(--spacing-md);
    overflow-x: auto;
    list-style: none;
    padding: 0;
    margin: 0;
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.gallery-tabs::-webkit-scrollbar {
    display: none;
}

.gallery-tabs li {
    flex-shrink: 0;
    padding: 10px 0;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #999;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all 0.3s;
}

.gallery-tabs li:hover,
.gallery-tabs li.active {
    color: #333;
    border-bottom-color: var(--primary-color);
}

/* Gallery Grid */
.gallery-grid-section {
    padding: var(--spacing-xl) 0;
}

.gallery-masonry {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--spacing-md);
}

.gallery-card {
    cursor: pointer;
    overflow: hidden;
    position: relative;
}

.gallery-img-wrapper {
    position: relative;
    aspect-ratio: 3/4;
    overflow: hidden;
    border-radius: var(--radius-md, 8px);
}

.gallery-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

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

.gallery-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.7));
    padding: var(--spacing-md);
    opacity: 0;
    transition: opacity 0.3s;
}

.gallery-card:hover .gallery-overlay {
    opacity: 1;
}

.gallery-overlay span {
    color: #fff;
    font-size: 0.9rem;
    font-weight: 500;
}

.gallery-author {
    padding: var(--spacing-sm) 0;
}

.gallery-author p {
    font-size: 0.85rem;
    color: #666;
    margin: 0;
}

.multi-img-icon {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(255, 255, 255, 0.9);
    padding: 5px;
    border-radius: 4px;
}

/* Gallery Modal */
.gallery-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
}

.gallery-modal.active {
    opacity: 1;
    visibility: visible;
}

.gallery-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
}

.gallery-modal-content {
    position: relative;
    background: #fff;
    max-width: 1000px;
    max-height: 90vh;
    margin: 5vh auto;
    border-radius: var(--radius-md, 8px);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    font-size: 2rem;
    color: #333;
    cursor: pointer;
    z-index: 10;
}

.modal-body-grid {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow-y: auto;
}

.modal-image-col {
    position: relative;
    flex: 1;
    min-height: 300px;
    background: #f5f5f5;
}

.modal-main-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.modal-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.6);
    border: 2px solid rgba(255, 255, 255, 0.8);
    color: #fff;
    font-size: 2rem;
    padding: 15px 20px;
    cursor: pointer;
    z-index: 5;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    line-height: 1;
}

.modal-nav:hover {
    background: rgba(0, 0, 0, 0.8);
    border-color: #fff;
    transform: translateY(-50%) scale(1.1);
}

.modal-nav.prev {
    left: 15px;
}

.modal-nav.next {
    right: 15px;
}

.modal-info-col {
    padding: var(--spacing-lg);
}

.modal-user-name {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: var(--spacing-xs);
}

.modal-rating {
    color: #f5a623;
    margin-bottom: var(--spacing-sm);
}

.modal-review-text h5 {
    font-weight: 600;
    margin-bottom: 5px;
}

.modal-review-text p {
    color: #666;
    line-height: 1.6;
}

.modal-date {
    font-size: 0.85rem;
    color: #999;
    margin-top: var(--spacing-sm);
}

.modal-divider {
    border: none;
    border-top: 1px solid #eee;
    margin: var(--spacing-md) 0;
}

.modal-shop-look h4 {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: var(--spacing-sm);
}

.modal-product-card {
    display: flex;
    gap: var(--spacing-sm);
}

.modal-prod-link {
    display: flex;
    gap: var(--spacing-sm);
    align-items: center;
}

.modal-prod-img {
    width: 80px;
    height: 100px;
    object-fit: cover;
    border-radius: 4px;
}

.modal-prod-details {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.modal-prod-name {
    font-size: 0.9rem;
    font-weight: 500;
}

.modal-prod-price {
    font-size: 0.9rem;
    color: var(--primary-color);
    font-weight: 600;
}

.mobile-image-slider {
    display: none;
}

.mobile-img-counter {
    display: none;
}

.modal-thumbnails {
    display: flex;
    gap: 8px;
    padding: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

.modal-thumb {
    width: 60px;
    height: 80px;
    cursor: pointer;
    border: 2px solid transparent;
    border-radius: 4px;
    overflow: hidden;
    transition: all 0.3s;
}

.modal-thumb.active {
    border-color: var(--primary-color, #e91e63);
}

.modal-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.modal-thumb:hover {
    opacity: 0.8;
}

/* =========================================
   Responsive - PC/Desktop
   ========================================= */
@media (min-width: 768px) {

    /* About Us */
    .about-hero-content h1 {
        font-size: 3rem;
    }

    .about-intro-grid {
        grid-template-columns: 1fr 1fr;
        align-items: center;
    }

    .about-features-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    /* Custom Made */
    .custom-title {
        font-size: 3.5rem;
    }

    .scene-grid {
        gap: var(--spacing-md);
    }

    .custom-emphasis-bar h2 {
        font-size: 1.5rem;
    }

    .submit-content-row {
        flex-direction: row;
        justify-content: center;
    }

    /* Style Gallery */
    .gallery-masonry {
        grid-template-columns: repeat(4, 1fr);
    }

    .modal-body-grid {
        flex-direction: row;
    }

    .modal-image-col {
        flex: 1.2;
        min-height: auto;
    }

    .modal-info-col {
        flex: 1;
        max-width: 350px;
    }
}

@media (min-width: 1024px) {

    /* About Us */
    .about-features-grid {
        grid-template-columns: repeat(6, 1fr);
    }

    .about-feature-card {
        padding: var(--spacing-md);
    }

    /* Custom Made */
    .custom-hero-top {
        padding: 120px var(--spacing-md) 160px;
    }

    .custom-scenes {
        margin-top: -100px;
    }
}

/* =========================================
   Mobile Gallery Modal Fixes
   ========================================= */
@media (max-width: 767px) {

    /* Modal slides in from right on mobile */
    .gallery-modal-content {
        width: 100%;
        height: 100%;
        max-width: none;
        max-height: none;
        margin: 0;
        border-radius: 0;
        transform: translateX(100%);
        transition: transform 0.3s ease;
    }

    .gallery-modal.active .gallery-modal-content {
        transform: translateX(0);
    }

    .modal-body-grid {
        flex-direction: column;
        height: 100%;
    }

    /* Hide desktop elements on mobile */
    .modal-main-img,
    .modal-thumbnails,
    .modal-nav {
        display: none !important;
    }

    .modal-image-col {
        width: 100%;
        flex: none;
        height: 45vh;
        max-height: 45vh;
        min-height: 0;
        background: #000;
        display: flex;
        align-items: center;
        justify-content: center;
        overflow: hidden;
        position: relative;
    }

    /* Mobile swipeable image slider */
    .mobile-image-slider {
        display: flex !important;
        width: 100%;
        height: 100%;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        align-items: center;
    }

    .mobile-image-slider img {
        flex: 0 0 100%;
        width: 100%;
        height: 100%;
        object-fit: contain;
        scroll-snap-align: center;
    }

    /* Mobile image counter */
    .mobile-img-counter {
        display: block !important;
        position: absolute;
        bottom: 15px;
        right: 15px;
        background: rgba(0, 0, 0, 0.6);
        color: #fff;
        padding: 4px 10px;
        border-radius: 12px;
        font-size: 0.8rem;
        z-index: 5;
    }

    .modal-info-col {
        flex: 1;
        padding: var(--spacing-md);
        overflow-y: auto;
        justify-content: flex-start;
    }

    /* Hide scroll bar for mobile slider */
    .mobile-image-slider::-webkit-scrollbar {
        display: none;
    }

    .mobile-image-slider {
        -ms-overflow-style: none;
        scrollbar-width: none;
    }

    /* Enhanced close button for mobile */
    .modal-close {
        background: #fff;
        width: 40px;
        height: 40px;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 1.8rem;
        color: #000;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
        top: 10px;
        right: 10px;
        line-height: 1;
        transition: transform 0.2s ease;
    }

    .modal-close:active {
        transform: scale(0.95);
    }
}

/* =========================================
   Product List Page Layout & Wishlist Fix
   ========================================= */

/* Product Card - Position relative for wishlist button */
.product-card {
    position: relative;
}

/* List Wishlist Button */
.list-wishlist-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #fff;
    border: 1px solid #ddd;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    transition: all 0.2s;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.list-wishlist-btn:hover {
    background: #f5f5f5;
}

.list-wishlist-btn.is-favorited {
    background: #000;
    border-color: #000;
    color: #fff;
}

.list-wishlist-btn.is-favorited svg {
    fill: #fff;
    stroke: #fff;
}