/* Aerobatics Collection Page Styles */

/* Hero Section */
.collection-hero {
    position: relative;
    width: 100%;
    overflow: hidden;
    margin: 0;
    padding: 0;
}

/* Image captions - Universal styling */
.image-caption {
    font-size: 1rem;
    color: #666;
    text-align: center;
    font-weight: 500;
    line-height: 1.6;
    margin: 0.75rem auto 0 auto;
    padding: 0 1rem;
}

/* Banner image captions - converted to fine print like the-book.php */
.hero-banner-section .image-caption {
    font-size: 13px;
    text-align: center;
    color: #666;
    font-style: normal;
    margin-top: 0.25rem;
    line-height: 1.4;
    font-weight: normal;
}

.hero-banner-section {
    position: relative;
    width: 100%;
    margin: 0;
    padding: 0;
    overflow: hidden;
    /* Let the image determine the height */
    height: auto;
}

.hero-banner {
    width: 100%;
    height: auto;
    max-width: 100%;
    display: block;
    /* Maintain aspect ratio */
    object-fit: contain;
    object-position: center top;
}

/* For larger screens, limit the maximum height */
@media (min-width: 1200px) {
    .hero-banner {
        max-height: 750px;
        width: 100%;
        object-fit: cover;
        object-position: center center;
    }
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(0,0,0,0.3), rgba(0,0,0,0.7));
    display: flex;
    align-items: flex-end;
    padding: 60px 0;
}

.hero-title {
    font-size: clamp(2rem, 5vw, 3.5rem);
    color: white;
    margin: 0;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.hero-subtitle {
    font-size: clamp(1rem, 2vw, 1.25rem);
    color: rgba(255, 255, 255, 0.9);
    margin-top: 10px;
    letter-spacing: 3px;
    text-transform: uppercase;
    font-weight: 300;
}

/* Remove any padding from main */
.aerobatics-collection-page main {
    padding-top: 0;
}

/* Collection Title Section */
.collection-title-section {
    padding: 50px 0;
    background: white;
    text-align: center;
}

.collection-main-title {
    font-size: clamp(2rem, 5vw, 3.5rem);
    color: #5B7FCC;
    margin: 0 0 15px 0;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.collection-main-subtitle {
    font-size: clamp(1rem, 2vw, 1.25rem);
    color: #666;
    margin: 0;
    letter-spacing: 3px;
    text-transform: uppercase;
    font-weight: 300;
}

/* Collection Introduction */
.collection-intro {
    padding: 40px 0;
    background: transparent;
}

.intro-text {
    max-width: 900px;
    margin: 0 auto;
    font-size: 1.125rem;
    line-height: 1.8;
    color: #333;
    text-align: center;
}

/* Gallery Grid */
.collection-gallery {
    padding: 80px 0;
    background: white;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 40px;
    margin-bottom: 60px;
    justify-content: center;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

@media (min-width: 768px) {
    .gallery-grid {
        grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
        max-width: 800px;
    }
}

@media (min-width: 1200px) {
    .gallery-grid {
        grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
        max-width: 1200px;
    }
}

/* Ensure items stretch to fill grid cells */
.gallery-grid {
    place-items: stretch;
}

/* Alternative approach for better centering with fewer items */
@supports (display: grid) {
    .gallery-grid {
        justify-items: stretch;
    }
}

/* Gallery Item */
.gallery-item {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
    width: 100%;
    max-width: 100%;
}

.gallery-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.item-image-wrapper {
    position: relative;
    width: 100%;
    padding-top: 75%; /* 4:3 aspect ratio */
    overflow: hidden;
    background: #f0f0f0;
}

.item-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.gallery-item:hover .item-image {
    transform: scale(1.05);
}

.item-overlay {
    position: absolute;
    top: 10px;
    right: 10px;
    left: 10px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 10px;
}

.item-id {
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 0.875rem;
    font-weight: 500;
}

.cart-btn {
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #1a1a1a;
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.cart-btn:hover {
    background: #c8a882;
    color: white;
    transform: scale(1.1);
}

.cart-btn.in-cart {
    background: #c8a882;
    color: white;
}

.cart-btn.in-cart:hover {
    background: #a08660;
}

.item-content {
    padding: 25px;
    display: flex;
    flex-direction: column;
    text-align: center;
    height: 100%;
}

.item-title {
    font-size: 1.125rem;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 10px 0;
    line-height: 1.3;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.item-subtitle {
    font-size: 0.9rem;
    color: #666;
    margin: 0 0 15px 0;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.item-price {
    font-size: 1.125rem;
    font-weight: 700;
    color: #c8a882;
    margin: 10px 0 15px 0;
    text-align: center;
    border: 2px solid #c8a882;
    border-radius: 4px;
    padding: 8px 15px;
    background: rgba(200, 168, 130, 0.1);
}

.item-description-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    margin-bottom: 0;
}

.item-description {
    font-size: 0.95rem;
    line-height: 1.6;
    color: #444;
    margin: 0;
    text-align: center;
}

.content-short,
.content-full {
    flex: 1;
    margin-bottom: 15px;
}

.content-short.content-full {
    margin-bottom: 15px;
}

.item-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
    align-items: center;
    margin-top: auto;
    padding-top: 20px;
    border-top: 1px solid #f0f0f0;
}

.view-more-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    background: none;
    border: 1px solid #c8a882;
    color: #c8a882;
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 500;
    padding: 8px 15px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    border-radius: 4px;
    flex: 1;
    white-space: nowrap;
}

.buy-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: #c8a882;
    border: 1px solid #c8a882;
    color: white;
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 600;
    padding: 8px 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    border-radius: 4px;
    flex: 1;
    white-space: nowrap;
}

.buy-btn:hover {
    background: #a08660;
    border-color: #a08660;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(200, 168, 130, 0.3);
}

.buy-btn.in-cart {
    background: #4CAF50;
    border-color: #4CAF50;
}

.buy-btn.in-cart:hover {
    background: #45a049;
    border-color: #45a049;
}

.view-more-btn:hover {
    background: #c8a882;
    color: white;
    border-color: #c8a882;
}

.view-more-btn .chevron {
    transition: transform 0.3s ease;
}

.view-more-btn:focus {
    outline: 2px solid #c8a882;
    outline-offset: 2px;
    border-radius: 2px;
}

/* Team Section */
.item-team {
    padding-top: 15px;
    border-top: 1px solid #e0e0e0;
    text-align: center;
}

.item-team-inline {
    padding-top: 15px;
    margin-top: 15px;
    border-top: 1px solid #e0e0e0;
    text-align: center;
}

.team-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: #333;
    margin: 0 0 10px 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.team-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.team-list li {
    font-size: 0.875rem;
    color: #555;
    padding: 3px 0;
    border-left: 2px solid #c8a882;
    padding-left: 12px;
    margin-bottom: 5px;
}

/* Pagination */
.pagination {
    margin-top: 60px;
    padding-top: 40px;
    border-top: 1px solid #e0e0e0;
}

.pagination-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.pagination-prev,
.pagination-next {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: #1a1a1a;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    transition: background 0.3s ease;
    font-weight: 500;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.pagination-prev:hover,
.pagination-next:hover {
    background: #333;
}

.pagination-numbers {
    display: flex;
    align-items: center;
    gap: 8px;
}

.pagination-number,
.pagination-current {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 4px;
    font-weight: 500;
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.pagination-number {
    color: #333;
    background: white;
    border: 1px solid #ddd;
    text-decoration: none;
}

.pagination-number:hover {
    background: #f0f0f0;
    border-color: #999;
}

.pagination-current {
    background: #c8a882;
    color: white;
    border: 1px solid #c8a882;
    cursor: default;
}

.pagination-ellipsis {
    color: #999;
    padding: 0 5px;
}

.pagination-info {
    text-align: center;
    margin-top: 20px;
    color: #666;
    font-size: 0.9rem;
}

/* Related Collections */
.related-collections {
    padding: 80px 0;
    background: #f8f8f8;
}

.related-collections .section-title {
    text-align: center;
    font-size: 2rem;
    color: #1a1a1a;
    margin-bottom: 40px;
    font-weight: 700;
    letter-spacing: 1px;
}

.collections-nav {
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
    max-width: 900px;
    margin: 0 auto;
}

.collection-link {
    padding: 12px 24px;
    background: white;
    color: #333;
    text-decoration: none;
    border: 2px solid #ddd;
    border-radius: 4px;
    font-weight: 500;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
}

.collection-link:hover {
    background: #1a1a1a;
    color: white;
    border-color: #1a1a1a;
    transform: translateY(-2px);
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-banner-section {
        /* Auto height for mobile */
        height: auto;
    }

    .hero-banner {
        /* Ensure full width on mobile */
        width: 100%;
        height: auto;
        object-fit: contain;
    }

    .hero-overlay {
        padding: 40px 0;
    }

    .collection-title-section {
        padding: 30px 20px;
    }

    .collection-intro {
        padding: 40px 20px;
    }

    .intro-text {
        font-size: 1rem;
    }

    .collection-gallery {
        padding: 40px 0;
    }

    .gallery-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .item-content {
        padding: 20px;
    }

    .pagination-container {
        gap: 10px;
    }

    .pagination-prev,
    .pagination-next {
        padding: 8px 15px;
        font-size: 0.875rem;
    }

    .pagination-number,
    .pagination-current {
        width: 35px;
        height: 35px;
        font-size: 0.875rem;
    }

    .collections-nav {
        gap: 15px;
    }

    .collection-link {
        padding: 10px 18px;
        font-size: 0.875rem;
    }

    /* Print Specifications Responsive */
    .print-specifications-section {
        padding: 30px 0;
    }

    .print-specifications-info {
        padding: 20px 15px;
        margin: 0 15px;
    }

    .print-specs-heading {
        font-size: 1.1rem;
        margin-bottom: 15px;
    }

    .spec-info-item {
        flex-direction: column;
        padding: 12px 15px;
    }

    .spec-label {
        margin-bottom: 5px;
        min-width: auto;
    }

    .spec-note {
        margin-left: 0;
        margin-top: 5px;
        display: block;
    }

    /* Banner image captions fine print responsive */
    .hero-banner-section .image-caption {
        font-size: 12px;
        padding: 0 10px;
    }
}

/* Additional fine print responsive breakpoints for banner captions */
@media (max-width: 576px) {
    .hero-banner-section .image-caption {
        font-size: 11px;
        text-align: center;
        padding: 0 10px;
        line-height: 1.4;
    }
}

@media (max-width: 480px) {
    .hero-banner-section .image-caption {
        font-size: 10px;
        padding: 0 8px;
        margin-top: 8px;
    }
}

@media (max-width: 360px) {
    .hero-banner-section .image-caption {
        font-size: 9px;
        padding: 0 5px;
        margin-top: 5px;
        line-height: 1.3;
    }
}

/* Loading State */
.gallery-item.loading .item-image-wrapper {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* Print Specifications Section */
.print-specifications-section {
    padding: 40px 0;
}

.print-specifications-info {
    background: #f9f9f9;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 25px;
    margin: 0 auto;
    max-width: 1000px;
}

.print-specs-heading {
    font-size: 1.25rem;
    color: #1a1a1a;
    font-weight: 700;
    text-align: center;
    margin-bottom: 20px;
    letter-spacing: 1px;
}

.print-specs-content {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.spec-info-item {
    display: flex;
    align-items: baseline;
    padding: 10px 20px;
    background: white;
    border-radius: 6px;
    border-left: 4px solid #c8a882;
}

.spec-label {
    font-weight: 600;
    color: #333;
    margin-right: 10px;
    flex-shrink: 0;
    min-width: 140px;
}

.spec-value {
    color: #555;
    flex: 1;
}

.spec-note {
    font-size: 0.85rem;
    color: #666;
    font-style: italic;
    margin-left: 10px;
}

/* Print Styles */
@media print {
    .collection-hero,
    .pagination,
    .related-collections,
    .print-specifications-section {
        display: none;
    }

    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .gallery-item {
        page-break-inside: avoid;
    }
}