/* Product details page styles */
.product-detail-container {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
}

.product-main {
    display: flex;
    gap: 40px;
    margin-bottom: 60px;
}

.product-gallery {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.main-image {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    min-height: 320px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    background-color: #f9f9f9;
    border-radius: 8px;
    overflow: hidden;
}

.main-image img {
    width: 100%;
    height: 100%;
    object-fit: fill;
}

.thumbnail-carousel {
    position: relative;
    width: 100%;
    box-sizing: border-box;
    padding: 0 44px;
    margin-top: 12px;
}

.thumbnail-viewport {
    overflow: hidden;
    width: 100%;
    max-width: 100%;
    min-width: 0;
}

.thumbnails {
    display: flex;
    gap: 10px;
    flex-wrap: nowrap;
    scroll-behavior: smooth;
    min-width: max-content;
}

.thumbnail {
    flex: 0 0 auto;
    width: 80px;
    height: 80px;
    border: 2px solid transparent;
    border-radius: 4px;
    overflow: hidden;
    cursor: pointer;
    opacity: 0.7;
    transition: all 0.3s ease;
}

.thumbnail.active {
    border-color: #007bff;
    opacity: 1;
}

.thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: fill;
}

.thumbnail-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 50%;
    background-color: rgba(0, 0, 0, 0.55);
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s ease, opacity 0.2s ease;
}

.thumbnail-nav:hover {
    background-color: rgba(0, 0, 0, 0.75);
}

.thumbnail-nav:disabled {
    opacity: 0.35;
    cursor: default;
}

.thumbnail-nav.prev {
    left: 8px;
}

.thumbnail-nav.next {
    right: 8px;
}

.thumbnail-nav.is-hidden {
    visibility: hidden;
}

.product-info {
    flex: 1;
}

.product-title {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 15px;
    color: #333;
    font-family: 'Playfair Display', serif;
    font-style: italic;
}

.product-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    margin-bottom: 6px;
    font-size: 14px;
    color: #666;
}

.product-label {
    font-weight: 600;
    color: #333;
    font-size: 16px;
}

.product-price {
    margin-bottom: 0px;
}

.current-price {
    font-size: 32px;
    font-weight: 700;
    margin-right: 15px;
}

.product-description {
    margin-bottom: 19px;
    line-height: 1.6;
    color: #555;
}

.product-attributes {
    margin-bottom: 30px;
}

.attribute {
    margin-bottom: 20px;
}

.attribute h4 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 10px;
    color: #333;
}

.attribute-options {
    display: flex;
    gap: 10px;
}

.option {
    padding: 8px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.option:hover {
    border-color: #007bff;
    color: #007bff;
}

.option.active {
    border-color: #007bff;
    background-color: #007bff;
    color: white;
}

.product-actions {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 30px;
    align-items: flex-start;
}

.quantity-row {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
}

.quantity-label {
    font-size: 14px;
    font-weight: 600;
    color: #333;
}

.stock-status {
    margin-left: auto;
    font-size: 14px;
    font-weight: 500;
    color: #28a745;
    white-space: nowrap;
}

.stock-status.stock-unavailable {
    color: #dc3545;
}

.stock-status.stock-unknown {
    color: #666;
}

.quantity-row .quantity-selector {
    flex-shrink: 0;
}

.quantity-selector {
    display: flex;
    align-items: center;
}

.quantity-btn {
    width: 36px;
    height: 36px;
    background: #f0f0f0;
    border: none;
    border-radius: 50%;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.quantity-btn:hover {
    background: #e0e0e0;
}

.quantity-input {
    width: 60px;
    height: 36px;
    text-align: center;
    border: 1px solid #ddd;
    border-radius: 4px;
    margin: 0 10px;
}

.add-to-cart {
    padding: 12px 30px;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.add-to-cart {
    background: #333;
    color: white;
    width: 100%;
}

.add-to-cart:hover {
    background: #222;
}

.product-detail-section {
    margin-bottom: 60px;
}

.section-header {
    border-bottom: 1px solid #eee;
    padding-bottom: 15px;
    margin-bottom: 25px;
}

.section-header h2 {
    font-size: 24px;
    font-weight: 600;
    color: #333;
}

.product-detail-section::after {
    content: "";
    display: block;
    clear: both;
}

.product-detail-section img {
    max-width: 100%;
    height: auto;
}

.product-detail-section figure,
.product-detail-section .wp-block-image,
.product-detail-section p {
    margin-bottom: 1.5em;
}

.product-detail-section .alignnone {
    margin-bottom: 1.5em;
}

.product-detail-section .alignleft {
    float: left;
    margin: 0 1.5em 1.5em 0;
}

.product-detail-section .alignright {
    float: right;
    margin: 0 0 1.5em 1.5em;
}

.product-detail-section .aligncenter {
    display: block;
    margin: 0 auto 1.5em;
    text-align: center;
}

.product-detail-section .wp-block-image .aligncenter,
.product-detail-section figure.aligncenter {
    display: table;
    margin-left: auto;
    margin-right: auto;
}

.product-detail-section .wp-caption,
.product-detail-section .wp-block-image figcaption {
    text-align: center;
    font-size: 14px;
    color: #666;
    margin-top: 0.5em;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 25px;
}

table th,
table td {
    padding: 12px 15px;
    border: 1px solid #eee;
    text-align: left;
}

table th {
    background-color: #f9f9f9;
    font-weight: 600;
    width: 30%;
}

.detail-images {
    margin-top: 30px;
}

.detail-images img {
    width: 100%;
    margin-bottom: 20px;
    border-radius: 8px;
}

.no-product-data {
    max-width: 800px;
    margin: 80px auto;
    padding: 60px 20px;
    text-align: center;
    background-color: #fafafa;
    border: 1px solid #eee;
    border-radius: 8px;
}

.no-product-message {
    font-size: 18px;
    color: #666;
}

@supports not (aspect-ratio: 1 / 1) {
    .main-image {
        display: block;
        padding-top: 100%;
    }

    .main-image img {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        object-fit: fill;
    }
}


@media (max-width: 992px) {
    .product-main {
        flex-direction: column;
    }
}

@media (max-width: 768px) {
    .product-actions {
        align-items: stretch;
    }

    .quantity-row {
        gap: 10px;
    }

    .product-detail-section .alignleft,
    .product-detail-section .alignright {
        float: none;
        display: block;
        margin: 0 auto 1.5em;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .product-title {
        font-size: 24px;
    }

    .current-price {
        font-size: 28px;
    }

    .attribute-options {
        flex-wrap: wrap;
    }

    .thumbnail-carousel {
        padding: 0 32px;
    }

    .thumbnail-nav {
        width: 32px;
        height: 32px;
    }

    .quantity-row {
        flex-wrap: wrap;
    }

    .stock-status {
        margin-left: 0;
    }
}
