/* ============================================
   SINGLE PRODUCT PAGE - DREMAX DESIGN
   Based on product-d.jpg mockup
   ============================================ */

/* === BREADCRUMBS === */
.single-product-breadcrumb {
    padding: 20px 0 30px;
}

.woocommerce-breadcrumb {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    font-family: var(--font-family-text);
    font-size: 13px;
    line-height: 1;
    color: #666;
}

.woocommerce-breadcrumb a {
    color: #2E2E2E;
    text-decoration: none;
    font-weight: 400;
    transition: color 0.2s;
}

.woocommerce-breadcrumb a:hover {
    color: var(--color-primary);
    text-decoration: underline;
}

.woocommerce-breadcrumb a:first-child {
    font-size: 0;
    display: block;
    width: 16px;
    height: 16px;
    background-image: url("data:image/svg+xml,%3Csvg width='16' height='16' viewBox='0 0 16 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M2 6L8 1L14 6V14H10V9H6V14H2V6Z' stroke='%232E2E2E' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
}

.breadcrumb-separator {
    display: block;
    width: 6px;
    height: 10px;
    font-size: 0;
    background-image: url("data:image/svg+xml,%3Csvg width='6' height='10' viewBox='0 0 6 10' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 9L5 5L1 1' stroke='%23666' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
}

/* === MAIN LAYOUT === */
.product-page {
    padding-bottom: 80px;
}

.single-product-layout {
    display: flex;
    gap: 60px;
    align-items: start;
}

/* === LEFT COLUMN: GALLERY === */
.product-gallery-column, .product-info-column {
    position: relative;
    width: 50%;
}

.product-gallery-wrapper {
    position: sticky;
    top: 30px;
}

.product-gallery-main {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    overflow: hidden;
}

.main-gallery-image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    transition: transform 0.3s ease;
}

/* Thumbnails with Navigation */
.product-gallery-thumbs-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
}

.thumb-nav {
    width: 32px;
    height: 32px;
    border: 1px solid #e0e0e0;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    flex-shrink: 0;
    color: #666;
}

.thumb-nav:hover {
    border-color: #2E2E2E;
    color: #2E2E2E;
}

.thumb-nav:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.product-gallery-thumbs {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    scroll-behavior: smooth;
    -ms-overflow-style: none;
    scrollbar-width: none;
    flex: 1;
}

.product-gallery-thumbs::-webkit-scrollbar {
    display: none;
}

.thumb-item {
    width: 70px;
    height: 70px;
    flex-shrink: 0;
    background: #f8f8f8;
    cursor: pointer;
    border: 2px solid transparent;
    transition: border-color 0.2s;
    overflow: hidden;
}

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

.thumb-item:hover {
    border-color: #ccc;
}

.thumb-item.active {
    border-color: var(--color-primary);
}

/* === RIGHT COLUMN: PRODUCT INFO === */
.product-info-column {
    display: flex;
    flex-direction: column;
}

.product-title {
    font-family: var(--font-family-heading);
    font-size: 26px;
    font-weight: 600;
    line-height: 1.3;
    color: #2E2E2E;
    margin: 0 0 20px 0;
}

/* === ATTRIBUTE BADGES === */
.product-badges-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 16px;
}

.attr-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    background: #fff;
    font-family: var(--font-family-text);
    font-size: 13px;
    font-weight: 400;
    color: #888;
    cursor: pointer;
    transition: all 0.2s;
}

.attr-badge:hover {
    border-color: #ccc;
    color: #666;
}

/* Color badges */
.attr-badge.badge-color {
    background: #fff;
    color: #666;
}

.attr-badge.badge-color .color-dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 1px solid rgba(0,0,0,0.15);
    flex-shrink: 0;
}

.attr-badge.badge-color.active {
    border-color: #C4A35A;
    border-width: 2px;
    padding: 9px 15px;
    color: #2E2E2E;
    background: #fff;
}

/* Option badges - z checkmarkiem */
.attr-badge.badge-option {
    color: #888;
}

.attr-badge.badge-option .badge-check {
    color: var(--color-primary);
    font-size: 14px;
    font-weight: 600;
}

.attr-badge.badge-option.active {
    border-color: #2E2E2E;
    background: #2E2E2E;
    color: #fff;
}

.attr-badge.badge-option.active .badge-check {
    color: #fff;
}

/* === STATIC BADGES (Simple Products - no interaction) === */
.attr-badge-static {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 2px 6px;
    border-radius: 25px;
    font-family: var(--font-family-text);
    font-size: 11px;
    font-weight: 400;
    cursor: default;
    pointer-events: none;
}

.attr-badge-static.badge-color {
    border: 1px solid #2E2E2E;
    color: #2E2E2E;
}

.attr-badge-static.badge-color .color-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #C4A35A;
    border: 1px solid rgba(0,0,0,0.1);
    flex-shrink: 0;
}

.attr-badge-static.badge-option {
    background: #fff;
    border: 0;
    color: #2E2E2E;
}

.attr-badge-static.badge-option .badge-check {
    color: var(--color-primary);
    font-size: 14px;
    font-weight: 600;
}

/* === DOOR SIDE TOGGLE === */
.door-side-toggle {
    display: flex;
    gap: 0;
    margin-bottom: 24px;
    width: fit-content;
}

.door-toggle-btn {
    padding: 10px 20px;
    background: #fff;
    border: 1px solid #e0e0e0;
    font-family: var(--font-family-text);
    font-size: 13px;
    font-weight: 500;
    color: #2E2E2E;
    cursor: pointer;
    transition: all 0.2s;
}

.door-toggle-btn:first-child {
    border-right: none;
}

.door-toggle-btn.active {
    background: #2E2E2E;
    border-color: #2E2E2E;
    color: #fff;
}

.door-toggle-btn:hover:not(.active) {
    background: #f5f5f5;
    border-color: #ccc;
}

/* === ACCORDIONS === */
.product-accordions {
    border-top: 1px solid #e5e5e5;
}

.accordion-item {
    border-bottom: 1px solid #e5e5e5;
}

.accordion-header {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 0;
    background: none;
    border: none;
    cursor: pointer;
    font-family: var(--font-family-heading);
    font-size: 15px;
    font-weight: 600;
    color: #2E2E2E;
    text-align: left;
    transition: color 0.2s;
}

.accordion-header:hover {
    color: var(--color-primary);
}

.accordion-header span:first-child {
    display: flex;
    align-items: center;
    gap: 10px;
}

.accordion-header .rating-value {
    font-size: 13px;
    font-weight: 400;
    color: #666;
}

.accordion-icon {
    font-size: 18px;
    font-weight: 300;
    color: #666;
    transition: transform 0.3s;
}

.accordion-content {
    overflow: hidden;
    max-height: 0;
    transition: max-height 0.4s ease;
}

.accordion-item.active .accordion-content {
    /* max-height set inline via JS */
}

.accordion-inner {
    padding: 0 0 24px 0;
    font-size: 14px;
    line-height: 1.7;
    color: #555;
}

.accordion-inner p {
    margin-bottom: 16px;
}

.accordion-inner p:last-child {
    margin-bottom: 0;
}

/* Specs Table */
.specs-table {
    width: 100%;
    border-collapse: collapse;
}

.specs-table tr {
    border-bottom: 1px solid #f0f0f0;
}

.specs-table tr:last-child {
    border-bottom: none;
}

.specs-table td {
    padding: 12px 0;
    font-size: 14px;
}

.specs-table .spec-label {
    color: #888;
    width: 40%;
}

.specs-table .spec-value {
    color: #2E2E2E;
    font-weight: 500;
}

/* Delivery Section */
.delivery-section,
.returns-section {
    margin-bottom: 20px;
}

.delivery-section:last-child,
.returns-section:last-child {
    margin-bottom: 0;
}

.delivery-section h4,
.returns-section h4 {
    font-size: 14px;
    font-weight: 600;
    color: #2E2E2E;
    margin: 0 0 10px 0;
}

.delivery-options {
    list-style: none;
    padding: 0;
    margin: 12px 0 0 0;
}

.delivery-options li {
    position: relative;
    padding-left: 16px;
    margin-bottom: 8px;
    font-size: 13px;
}

.delivery-options li::before {
    content: "•";
    position: absolute;
    left: 0;
    color: #999;
}

.link-more {
    display: inline-block;
    margin-top: 12px;
    font-size: 13px;
    color: #2E2E2E;
    text-decoration: underline;
    font-weight: 500;
}

.link-more:hover {
    color: var(--color-primary);
}

/* Reviews */
.reviews-content {
    max-height: 400px;
    overflow-y: auto;
}

.review-item {
    padding: 16px 0;
    border-bottom: 1px solid #f0f0f0;
}

.review-item:last-child {
    border-bottom: none;
}

.review-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 10px;
}

.review-stars {
    display: flex;
    gap: 2px;
}

.review-stars .star {
    color: #ddd;
    font-size: 16px;
}

.review-stars .star.filled {
    color: var(--color-primary);
}

.review-date {
    font-size: 12px;
    color: #999;
}

.review-content {
    font-size: 13px;
    color: #555;
    line-height: 1.6;
    margin-bottom: 8px;
}

.review-content p {
    margin: 0;
}

.review-author {
    font-size: 12px;
    color: #2E2E2E;
}

/* === PURCHASE SECTION (BOTTOM) === */
.product-purchase-section {
    margin-top: 30px;
    padding-top: 30px;
    border-top: 1px solid #e5e5e5;
}

.price-block {
    margin-bottom: 20px;
}

.price-main {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 6px;
}

.price-main .price .woocommerce-Price-amount,
.price-main .price ins .woocommerce-Price-amount {
    font-family: var(--font-family-heading);
    font-size: 28px;
    font-weight: 700;
    color: var(--color-olive);
}

.price-main .price del .woocommerce-Price-amount {
    font-size: 16px;
    color: #999;
    text-decoration: line-through;
    font-weight: 400;
}

.price-discount {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 4px 10px;
    background: var(--color-olive);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    border-radius: 2px;
}

.price-info {
    font-size: 12px;
    color: #888;
}

/* Cart Actions */
.cart-actions {
    display: flex;
    align-items: flex-end;
    gap: 12px;
}

.quantity-block {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.qty-label {
    font-size: 13px;
    font-weight: 500;
    color: #2E2E2E;
}

.quantity-selector {
    display: flex;
    border: 1px solid #e0e0e0;
    height: 48px;
}

.qty-btn {
    width: 40px;
    background: #fff;
    border: none;
    font-size: 18px;
    color: #666;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.qty-btn:hover {
    background: #f5f5f5;
    color: #2E2E2E;
}

.qty-input {
    width: 50px;
    border: none;
    border-left: 1px solid #e0e0e0;
    border-right: 1px solid #e0e0e0;
    text-align: center;
    font-size: 15px;
    font-weight: 600;
    color: #2E2E2E;
    -moz-appearance: textfield;
}

.qty-input::-webkit-outer-spin-button,
.qty-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.btn-wishlist {
    width: 48px;
    height: 48px;
    border: 1px solid var(--color-olive);
    background: var(--color-olive);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    flex-shrink: 0;
}

.btn-wishlist:hover {
    background: var(--color-olive-dark);
    border-color: var(--color-olive-dark);
}

.btn-add-to-cart {
    flex: 1;
    height: 48px;
    background: var(--color-olive);
    color: #fff;
    border: none;
    font-family: var(--font-family-heading);
    font-size: 14px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-add-to-cart:hover {
    background: var(--color-olive-dark);
}

.out-of-stock-notice {
    padding: 16px;
    background: #fff3cd;
    border: 1px solid #ffc107;
    color: #856404;
    font-size: 14px;
    text-align: center;
}

/* === RELATED PRODUCTS === */
.related-products-section {
    margin-top: 80px;
    padding-top: 40px;
    border-top: 1px solid #e5e5e5;
}

.related-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.related-title {
    font-family: var(--font-family-heading);
    font-size: 22px;
    font-weight: 600;
    color: #2E2E2E;
    margin: 0;
}

.related-view-all {
    font-size: 14px;
    color: #2E2E2E;
    text-decoration: underline;
    font-weight: 500;
}

.related-view-all:hover {
    color: var(--color-primary);
}

.related-products-slider {
    overflow: hidden;
    margin-bottom: 24px;
}

.related-products-track {
    display: flex;
    gap: 20px;
    transition: transform 0.4s ease;
}

.related-product-card {
    flex: 0 0 calc(25% - 15px);
    min-width: 0;
}

.product-card-link {
    display: block;
    text-decoration: none;
    color: inherit;
}

.product-card-image {
    background: #f8f8f8;
    aspect-ratio: 1;
    margin-bottom: 14px;
    overflow: hidden;
}

.product-card-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 0.3s;
}

.product-card-link:hover .product-card-image img {
    transform: scale(1.05);
}

.product-card-title {
    font-family: var(--font-family-heading);
    font-size: 14px;
    font-weight: 600;
    color: #2E2E2E;
    margin: 0 0 6px 0;
    line-height: 1.4;
}

.product-card-width {
    font-size: 12px;
    color: #888;
    margin-bottom: 8px;
}

.product-card-price {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.product-card-price .price-sale {
    font-size: 16px;
    font-weight: 700;
    color: var(--color-olive);
    font-family: var(--font-family-heading);
}

.product-card-price .price-sale .woocommerce-Price-amount {
    font-size: 16px;
    font-family: var(--font-family-heading);
    font-weight: 700;
    color: var(--color-olive);
}

.product-card-price .price-regular {
    font-size: 13px;
    color: #999;
    text-decoration: line-through;
    font-weight: 400;
}

.product-card-price .price-regular .woocommerce-Price-amount {
    font-size: 13px;
    color: #999;
    text-decoration: line-through;
    font-weight: 400;
}

.product-card-price .price-badge {
    font-size: 11px;
    font-weight: 700;
    color: #fff;
    background: var(--color-olive);
    padding: 2px 6px;
    border-radius: 2px;
}

/* Related Navigation */
.related-navigation {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

.related-nav-btn {
    width: 40px;
    height: 40px;
    border: 1px solid #e0e0e0;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    color: #666;
}

.related-nav-btn:hover {
    border-color: #2E2E2E;
    color: #2E2E2E;
}

.related-nav-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

/* === RESPONSIVE === */
@media (max-width: 1024px) {
    .single-product-layout {
        flex-direction: column;
    }
    .product-gallery-column {
        max-width: 100%;
    }
    .product-gallery-wrapper {
        position: static;
    }
    
    .related-product-card {
        flex: 0 0 calc(33.333% - 14px);
    }
}

@media (max-width: 768px) {
    .single-product-layout {
        gap: 30px;
    }
    
    .product-title {
        font-size: 22px;
    }
    
    .product-variants-badges {
        gap: 6px;
    }
    
    .variant-badge {
        padding: 6px 10px;
        font-size: 12px;
    }
    
    .cart-actions {
        flex-wrap: wrap;
    }
    
    .quantity-block {
        flex: 1;
        min-width: 120px;
    }
    
    .btn-add-to-cart {
        flex: 1 1 100%;
        order: 3;
        margin-top: 10px;
    }
    
    .btn-wishlist {
        order: 2;
    }
    
    .related-product-card {
        flex: 0 0 calc(50% - 10px);
    }
    
    .related-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
}

@media (max-width: 480px) {
    .door-side-toggle {
        width: 100%;
    }
    
    .door-toggle-btn {
        flex: 1;
        text-align: center;
    }
    
    .price-main .price .woocommerce-Price-amount,
    .price-main .price ins .woocommerce-Price-amount {
        font-size: 24px;
    }
    
    .related-product-card {
        flex: 0 0 100%;
    }
    
    .thumb-item {
        width: 60px;
        height: 60px;
    }
}

/* === WooCommerce Overrides === */
.woocommerce-notices-wrapper {
    margin-bottom: 20px;
}

.woocommerce-message,
.woocommerce-info,
.woocommerce-error {
    padding: 16px 20px;
    margin-bottom: 20px;
    border-radius: 4px;
}

.woocommerce-message {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
}

.woocommerce-info {
    background: #d1ecf1;
    border: 1px solid #bee5eb;
    color: #0c5460;
}

.woocommerce-error {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
}