/**
 * Product Page Template Styles
 * 
 * Styling for the Product Page template that can be assigned to WordPress pages
 * Follows the same design patterns as the single product template
 */

/* Product Page - Mobile-First Responsive Design */

/* Base styles for all screen sizes */
.page-product {
    overflow-x: hidden;
    min-height: 100vh;
}

/* Page Background Image - Fixed stretching */
.page-background-image {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    z-index: 0;
    opacity: 0.1;
}

/* Main Container */
.container {
    position: relative;
    z-index: 3;
    max-width: 100%;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
}

/* Page Content Wrapper */
.page-content-wrapper {
    margin-bottom: 40px;
}

.page-content-area {
    background: white;
    border-radius: 12px;
    padding: 25px 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    line-height: 1.6;
    margin-bottom: 0; /* Remove bottom margin to prevent white line */
}

.page-content-area h1,
.page-content-area h2,
.page-content-area h3,
.page-content-area h4,
.page-content-area h5,
.page-content-area h6 {
    margin-top: 0;
    margin-bottom: 15px;
    color: #333;
}

.page-content-area h1 {
    font-size: 28px;
}

.page-content-area h2 {
    font-size: 24px;
}

.page-content-area h3 {
    font-size: 20px;
}

.page-content-area p {
    margin-bottom: 15px;
    color: #555;
}

.page-content-area ul,
.page-content-area ol {
    margin-bottom: 15px;
    padding-left: 20px;
}

.page-content-area li {
    margin-bottom: 8px;
}

.page-content-area img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 15px 0;
}

.page-content-area a {
    color: #0073aa;
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-bottom-color 0.3s ease;
}

.page-content-area a:hover {
    border-bottom-color: #0073aa;
}

/* Mobile-only: Show complete images without cropping */
@media (max-width: 767px) {
    .page-content-area img {
        object-fit: contain;
        background-color: #f8f9fa;
    }
}

/* Brand Spotlight Section */
.brand-spotlight {
    margin-top: 40px;
}

/* Hero Image Mobile Adaptations */
.hero-image {
    width: 100%;
    height: auto;
    max-height: 300px;
    object-fit: cover;
    border-radius: 12px;
    margin-bottom: 20px;
}

/* Carousel Mobile Adaptations */
.carousel-container {
    width: 100%;
    overflow: hidden;
    position: relative;
    margin: 20px 0;
}

.carousel-slide {
    width: 100%;
    display: flex;
    transition: transform 0.3s ease;
}

.carousel-item {
    min-width: 100%;
    padding: 0 10px;
    box-sizing: border-box;
}

.carousel-item img {
    width: 100%;
    height: auto;
    max-height: 250px;
    object-fit: contain;
    border-radius: 8px;
}

/* Carousel Navigation */
.carousel-nav {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 20px;
}

.carousel-nav button {
    background: #0073aa;
    color: white;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s ease;
}

.carousel-nav button:hover {
    background: #005a87;
}

/* Mobile-specific carousel controls */
.mobile-carousel-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 15px 0;
}

.mobile-carousel-dots {
    display: flex;
    gap: 8px;
    justify-content: center;
}

.mobile-carousel-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #ccc;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.mobile-carousel-dot.active {
    background: #0073aa;
}

/* Tablet Styles (768px and up) */
@media (min-width: 768px) {
    .container {
        padding: 30px 40px;
        max-width: 800px;
    }
    
    .page-content-wrapper {
        margin-bottom: 50px;
    }
    
    .page-content-area {
        padding: 35px 30px;
    }
    
    .page-content-area h1 {
        font-size: 32px;
    }
    
    .page-content-area h2 {
        font-size: 28px;
    }
    
    .page-content-area h3 {
        font-size: 24px;
    }
    
    .brand-spotlight {
        margin-top: 50px;
    }
    
    /* Hero image tablet */
    .hero-image {
        max-height: 400px;
    }
    
    /* Carousel tablet */
    .carousel-item {
        min-width: 50%;
        padding: 0 15px;
    }
    
    .carousel-item img {
        max-height: 300px;
    }
}

/* Desktop Styles (1024px and up) */
@media (min-width: 1024px) {
    .container {
        max-width: 1000px;
        padding: 40px 50px;
    }
    
    .page-content-wrapper {
        margin-bottom: 60px;
    }
    
    .page-content-area {
        padding: 40px 35px;
    }
    
    .page-content-area h1 {
        font-size: 36px;
    }
    
    .page-content-area h2 {
        font-size: 32px;
    }
    
    .page-content-area h3 {
        font-size: 28px;
    }
    
    .brand-spotlight {
        margin-top: 60px;
    }
    
    /* Hero image desktop */
    .hero-image {
        max-height: 500px;
    }
    
    /* Carousel desktop */
    .carousel-item {
        min-width: 33.333%;
        padding: 0 20px;
    }
    
    .carousel-item img {
        max-height: 350px;
    }
}

/* Large Desktop Styles (1440px and up) */
@media (min-width: 1440px) {
    .container {
        max-width: 1200px;
        padding: 50px 60px;
    }
    
    .page-content-area {
        padding: 50px 40px;
    }
    
    /* Hero image large desktop */
    .hero-image {
        max-height: 600px;
    }
    
    /* Carousel large desktop */
    .carousel-item img {
        max-height: 400px;
    }
}

/* Mobile-specific optimizations */
@media (max-width: 767px) {
    .page-background-image {
        background-attachment: scroll;
    }
    
    .page-content-area {
        font-size: 16px;
    }
    
    .page-content-area h1,
    .page-content-area h2,
    .page-content-area h3 {
        word-wrap: break-word;
        hyphens: auto;
    }
    
    /* Mobile hero image */
    .hero-image {
        max-height: 200px;
        margin-bottom: 15px;
    }
    
    /* Mobile carousel */
    .carousel-container {
        margin: 15px 0;
    }
    
    .carousel-item {
        padding: 0 5px;
    }
    
    .carousel-item img {
        max-height: 180px;
    }
    
    /* Mobile carousel navigation */
    .carousel-nav button {
        width: 35px;
        height: 35px;
        font-size: 14px;
    }
    
    .mobile-carousel-dots {
        gap: 6px;
    }
    
    .mobile-carousel-dot {
        width: 6px;
        height: 6px;
    }
}

/* Touch Device Optimizations */
@media (hover: none) and (pointer: coarse) {
    .page-content-area a {
        padding: 2px 0;
    }
    
    .page-content-area a:active {
        background-color: rgba(0, 115, 170, 0.1);
        border-radius: 4px;
    }
    
    .carousel-nav button {
        min-height: 44px;
        min-width: 44px;
    }
}

/* High DPI Display Support */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .page-content-area img,
    .hero-image,
    .carousel-item img {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
}

/* Print Styles */
@media print {
    .page-background-image {
        display: none;
    }
    
    .page-content-area {
        box-shadow: none;
        border: 1px solid #ccc;
    }
    
    .page-content-area a {
        color: #000;
        text-decoration: underline;
    }
    
    .carousel-container {
        display: none;
    }
}

