/**
 * PyziTheme - single-product.css (pyzitheme/assets/css/single-product.css)
 * 
 * Styl dla produktu jako produktu
 *
 * @package     PyziTheme
 * @subpackage  Assets/CSS
 * @author      Patryk Kowalski <p.kowalski@kamikstudio.pl>
 * @copyright   2025 KamikStudio & PyziPyzi
 * @license     Proprietary
 * @version     1.0.0
 * @since       1.0.0
 * 
 * Client: PyziPyzi - Domowe wyroby cukiernicze
 * Website: https://pyzipyzi.pl
 * 
 * This file is part of PyziTheme.
 * Unauthorized copying or distribution is prohibited.
 */

/* ================================
   SINGLE PRODUCT - NOWY LAYOUT
   ================================ */

.single-product-page {
    padding: 40px 0 80px;
    background: #fafafa;
}

.product-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ================================
   NAGŁÓWEK NAD KOLUMNAMI
   ================================ */

.product-header-section {
    background: white;
    padding: 30px 40px;
    border-radius: 12px 12px 0 0;
    margin-bottom: 0;
}

.product-categories-top {
    display: flex;
    gap: 8px;
    margin-bottom: 15px;
}

.category-badge {
    display: inline-block;
    padding: 6px 14px;
    background: #f5f0e8;
    color: #5e341c;
    font-size: 12px;
    font-weight: 600;
    border-radius: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.product-title-main {
    font-size: 32px;
    font-weight: 700;
    color: #5e341c;
    margin: 0 0 10px 0;
    line-height: 1.2;
}

.product-header-meta {
    display: flex;
    align-items: center;
    gap: 20px;
    font-size: 14px;
    color: #999;
}

.product-sku-top {
    color: #999;
}

.product-rating-top {
    display: flex;
    align-items: center;
    gap: 6px;
}

.product-rating-top .stars {
    font-size: 16px;
    line-height: 1;
}

.product-rating-top .rating-count {
    color: #666;
}

/* ================================
   LAYOUT 2 KOLUMNY
   ================================ */

.product-layout {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 40px;
    background: white;
    padding: 40px;
    border-radius: 0 0 12px 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    margin-bottom: 30px;
}

/* ================================
   ZDJĘCIA (lewa strona)
   ================================ */

.product-images {
    position: sticky;
    top: 100px;
    height: fit-content;
}

.main-image {
    width: 100%;
    aspect-ratio: 1;
    border-radius: 12px;
    overflow: hidden;
    background: #f5f5f5;
    margin-bottom: 15px;
}

.main-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.main-image:hover img {
    transform: scale(1.05);
}

.no-image {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: #999;
}

.no-image svg {
    fill: #ddd;
    margin-bottom: 15px;
}

.product-gallery {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}

.gallery-thumb {
    aspect-ratio: 1;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.2s ease;
}

.gallery-thumb:hover,
.gallery-thumb.active {
    border-color: #ef6341;
}

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

/* ================================
   INFO KOMPAKTOWE (prawa strona)
   ================================ */

.product-info-compact {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Cena */
.product-price-box {
    padding: 20px;
    background: #f5f0e8;
    border-radius: 10px;
}

.price-main {
    font-size: 32px;
    font-weight: 700;
    color: #ef6341;
    line-height: 1;
    margin-bottom: 8px;
}

.price-main .woocommerce-Price-amount {
    font-size: inherit;
    color: inherit;
}

.price-per-kg {
    font-size: 14px;
    color: #666;
}

/* Status */
.product-status-compact {
    padding: 12px 18px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    text-align: center;
}

.product-status-compact.in-stock {
    background: #e8f5e9;
    color: #2e7d32;
}

.product-status-compact.out-of-stock {
    background: #ffebee;
    color: #c62828;
}

/* Excerpt */
.product-excerpt-compact {
    font-size: 15px;
    line-height: 1.6;
    color: #4a2814;
}

/* Przycisk */
.btn-order-main {
    width: 100%;
    padding: 18px 24px;
    background: #ef6341;
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-order-main:hover {
    background: #d94e2a;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(239, 99, 65, 0.3);
}

/* Formularz dodawania do koszyka */
.product-add-to-cart {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.product-add-to-cart .cart {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* Rząd z ilością i przyciskiem - JEDNA LINIA */
.cart-form-row {
    display: flex;
    gap: 15px;
    align-items: stretch;
}

/* Wrapper ilości z +/- */
.quantity-wrapper {
    display: flex;
    align-items: stretch;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    background: white;
    min-width: 140px;
}

.qty-btn {
    width: 40px;
    background: #f5f5f5;
    border: none;
    font-size: 20px;
    font-weight: 600;
    color: #5e341c;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.qty-btn:hover {
    background: #ef6341;
    color: white;
}

.qty-btn:active {
    transform: scale(0.95);
}

.quantity-wrapper .qty {
    width: 60px;
    border: none;
    text-align: center;
    font-size: 16px;
    font-weight: 600;
    color: #5e341c;
    padding: 0;
    -moz-appearance: textfield;
}

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

.quantity-wrapper .qty:focus {
    outline: none;
}

/* Przycisk dodaj do koszyka */
.btn-add-to-cart {
    flex: 1;
    padding: 14px 24px;
    background: #4caf50;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 17px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.btn-add-to-cart:hover {
    background: #45a049;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(76, 175, 80, 0.3);
}

/* Warianty produktu */
.variations {
    margin-bottom: 20px;
}

.variation-row {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 15px;
}

.variation-row label {
    font-size: 15px;
    font-weight: 600;
    color: #5e341c;
}

.variation-select {
    width: 100%;
    padding: 12px 40px 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 15px;
    background: white url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%235e341c' d='M1 1l5 5 5-5'/%3E%3C/svg%3E") no-repeat right 15px center;
    background-size: 12px;
    cursor: pointer;
    transition: border-color 0.2s ease;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
}

.variation-select:focus {
    outline: none;
    border-color: #ef6341;
}

.variation-select:disabled {
    background-color: #f5f5f5;
    cursor: not-allowed;
    opacity: 0.6;
}

/* Cena wariantu */
.single_variation {
    margin-bottom: 15px;
}

.woocommerce-variation-price {
    font-size: 24px;
    font-weight: 700;
    color: #ef6341;
    margin-bottom: 15px;
}

.woocommerce-variation-description {
    font-size: 14px;
    color: #666;
    line-height: 1.6;
    margin-bottom: 15px;
}

.woocommerce-variation-availability {
    font-size: 14px;
    margin-bottom: 15px;
}

.reset_variations {
    display: inline-block;
    font-size: 13px;
    color: #ef6341;
    text-decoration: underline;
    cursor: pointer;
    margin-top: 10px;
}

.reset_variations:hover {
    color: #d94e2a;
}

/* Komunikat sukcesu */
.woocommerce-message {
    padding: 15px 20px;
    background: #e8f5e9;
    border-left: 4px solid #4caf50;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 15px;
    color: #2e7d32;
}

.woocommerce-message a {
    color: #ef6341;
    font-weight: 600;
    text-decoration: underline;
    margin-left: 10px;
}

.woocommerce-message a:hover {
    color: #d94e2a;
}

/* Loading state */
.btn-add-to-cart.loading {
    opacity: 0.6;
    pointer-events: none;
}

.btn-add-to-cart.disabled,
.btn-add-to-cart:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Responsywność */
@media (max-width: 768px) {
    .cart-form-row {
        flex-direction: column;
    }
    
    .quantity-wrapper {
        width: 100%;
        justify-content: center;
    }
    
    .btn-add-to-cart {
        font-size: 16px;
        padding: 16px 20px;
    }
}

@media (max-width: 480px) {
    .qty-btn {
        width: 50px;
        font-size: 22px;
    }
    
    .quantity-wrapper .qty {
        width: 80px;
        font-size: 18px;
    }
}

/* Selektor ilości */
.quantity-selector {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px;
    background: #f5f5f5;
    border-radius: 8px;
}

.quantity-selector label {
    font-size: 15px;
    font-weight: 600;
    color: #5e341c;
    margin: 0;
}

.quantity-selector .qty {
    width: 80px;
    padding: 10px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    text-align: center;
    transition: border-color 0.2s ease;
}

.quantity-selector .qty:focus {
    outline: none;
    border-color: #ef6341;
}

/* Przycisk dodaj do koszyka */
.btn-add-to-cart {
    width: 100%;
    padding: 18px 24px;
    background: #4caf50;
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-add-to-cart:hover {
    background: #45a049;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(76, 175, 80, 0.3);
}

/* Produkt dodany do koszyka - komunikat */
.woocommerce-message {
    padding: 15px 20px;
    background: #e8f5e9;
    border-left: 4px solid #4caf50;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 15px;
    color: #2e7d32;
}

.woocommerce-message a {
    color: #ef6341;
    font-weight: 600;
    text-decoration: underline;
}

.woocommerce-message a:hover {
    color: #d94e2a;
}

/* Loading state */
.btn-add-to-cart.loading {
    opacity: 0.6;
    pointer-events: none;
}

.btn-add-to-cart.loading::after {
    content: "...";
    animation: dots 1.5s steps(4, end) infinite;
}

@keyframes dots {
    0%, 20% { content: ""; }
    40% { content: "."; }
    60% { content: ".."; }
    80%, 100% { content: "..."; }
}

/* Warianty produktu (variable products) */
.variations {
    margin-bottom: 20px;
}

.variations tr {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 15px;
}

.variations label {
    font-size: 15px;
    font-weight: 600;
    color: #5e341c;
}

.variations select {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 15px;
    background: white;
    cursor: pointer;
    transition: border-color 0.2s ease;
}

.variations select:focus {
    outline: none;
    border-color: #ef6341;
}

.variations .reset_variations {
    display: inline-block;
    margin-top: 10px;
    font-size: 14px;
    color: #ef6341;
    text-decoration: underline;
    cursor: pointer;
}

.variations .reset_variations:hover {
    color: #d94e2a;
}

/* Cena wariantu */
.woocommerce-variation-price {
    margin: 15px 0;
    font-size: 24px;
    font-weight: 700;
    color: #ef6341;
}

/* Responsywność */
@media (max-width: 768px) {
    .quantity-selector {
        padding: 12px;
    }
    
    .btn-add-to-cart {
        font-size: 16px;
        padding: 16px 20px;
    }
}

/* Quick info */
.product-quick-info {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 20px;
    background: #fafafa;
    border-radius: 10px;
}

.info-row {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    color: #4a2814;
}

.info-row .icon {
    font-size: 18px;
}

.info-row a {
    color: #ef6341;
    text-decoration: none;
    font-weight: 600;
}

.info-row a:hover {
    text-decoration: underline;
}

/* ================================
   TABS
   ================================ */

.product-tabs {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    margin-bottom: 30px;
}

.tabs-navigation {
    display: flex;
    border-bottom: 2px solid #f0f0f0;
}

.tab-btn {
    flex: 1;
    padding: 18px 24px;
    background: transparent;
    border: none;
    font-size: 15px;
    font-weight: 600;
    color: #999;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.tab-btn:hover {
    color: #5e341c;
    background: #fafafa;
}

.tab-btn.active {
    color: #ef6341;
}

.tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 2px;
    background: #ef6341;
}

.tabs-content {
    padding: 40px;
}

.tab-pane {
    display: none;
}

.tab-pane.active {
    display: block;
}

.tab-content {
    font-size: 15px;
    line-height: 1.8;
    color: #4a2814;
}

.tab-content p {
    margin-bottom: 15px;
}

/* Sizes grid */
.sizes-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

.size-card {
    padding: 20px;
    background: #f5f0e8;
    border-radius: 10px;
    text-align: center;
}

.size-card h4 {
    font-size: 18px;
    font-weight: 700;
    color: #5e341c;
    margin: 0 0 5px 0;
}

.size-card p {
    font-size: 14px;
    color: #666;
    margin: 0;
}

/* Additional info - ulepszone */
.additional-info-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.additional-info-list li {
    padding: 18px 0;
    border-bottom: 1px solid #f0f0f0;
    font-size: 15px;
    line-height: 1.6;
    color: #4a2814;
    display: flex;
    gap: 10px;
}

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

.additional-info-list strong {
    color: #5e341c;
    font-weight: 600;
    min-width: 180px;
    flex-shrink: 0;
}

.additional-info-list li:empty {
    display: none;
}

@media (max-width: 768px) {
    .additional-info-list li {
        flex-direction: column;
        gap: 5px;
    }
    
    .additional-info-list strong {
        min-width: auto;
    }
}

/* ================================
   MODAL
   ================================ */

.order-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

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

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

.modal-content {
    position: relative;
    background: white;
    border-radius: 12px;
    max-width: 550px;
    width: 90%;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    transform: scale(0.95);
    transition: transform 0.3s ease;
    z-index: 10000;
}

.order-modal.active .modal-content {
    transform: scale(1);
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 36px;
    height: 36px;
    border: none;
    background: transparent;
    font-size: 32px;
    line-height: 1;
    cursor: pointer;
    color: #5e341c;
    transition: all 0.2s ease;
    opacity: 0.6;
}

.modal-close:hover {
    opacity: 1;
    transform: scale(1.1);
}

.modal-header {
    padding: 35px 30px 25px;
    border-bottom: 1px solid #e0e0e0;
}

.modal-header h3 {
    margin: 0 0 12px 0;
    font-size: 24px;
    font-weight: 700;
    color: #5e341c;
}

.modal-product-name {
    font-size: 18px;
    font-weight: 600;
    color: #ef6341;
    margin: 0;
}

.modal-body {
    padding: 30px;
}

.info-box {
    padding: 16px 18px;
    border-radius: 8px;
    margin-bottom: 25px;
    background: #fff9f0;
    border-left: 3px solid #ef6341;
    font-size: 15px;
    line-height: 1.6;
    color: #4a2814;
}

.info-box strong {
    color: #5e341c;
}

.modal-body > p {
    font-size: 15px;
    color: #4a2814;
    margin: 0 0 15px 0;
}

.order-checklist {
    list-style: none;
    padding: 0;
    margin: 0 0 30px 0;
}

.order-checklist li {
    padding: 10px 0;
    font-size: 15px;
    color: #4a2814;
    border-bottom: 1px solid #f0f0f0;
}

.order-checklist li:last-child {
    border-bottom: none;
}

.modal-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.modal-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 24px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
    border: 2px solid transparent;
}

.modal-btn.btn-phone {
    background: #5e341c;
    color: white;
}

.modal-btn.btn-phone:hover {
    background: #4a2814;
    transform: translateY(-1px);
}

.modal-btn.btn-contact {
    background: transparent;
    color: #ef6341;
    border: 2px solid #ef6341;
}

.modal-btn.btn-contact:hover {
    background: #ef6341;
    color: white;
}

/* ================================
   RESPONSYWNOŚĆ
   ================================ */

@media (max-width: 992px) {
    .product-layout {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .product-images {
        position: static;
    }
    
    .product-title-main {
        font-size: 26px;
    }
    
    .sizes-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .product-header-section {
        padding: 20px;
    }
    
    .product-layout {
        padding: 20px;
    }
    
    .product-gallery {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .tabs-content {
        padding: 25px 20px;
    }
    
    .tab-btn {
        padding: 14px 16px;
        font-size: 14px;
    }
}

/* ================================
   POWIĄZANE PRODUKTY
   ================================ */

.related-products-section {
    margin: 40px 0;
}

.upsell-products,
.crosssell-products,
.related-products {
    margin-bottom: 50px;
}

.section-title {
    font-size: 24px;
    font-weight: 700;
    color: #5e341c;
    margin: 0 0 25px 0;
    text-align: center;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

/* Karta produktu */
.product-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

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

.product-card-image {
    width: 100%;
    aspect-ratio: 1;
    overflow: hidden;
    background: #f5f5f5;
}

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

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

.product-card-content {
    padding: 20px;
}

.product-card-title {
    font-size: 16px;
    font-weight: 600;
    color: #5e341c;
    margin: 0 0 10px 0;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-card-price {
    font-size: 18px;
    font-weight: 700;
    color: #ef6341;
}

.product-card-price .woocommerce-Price-amount {
    font-size: inherit;
    color: inherit;
}

/* Responsywność */
@media (max-width: 1200px) {
    .products-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    
    .section-title {
        font-size: 20px;
    }
    
    .product-card-content {
        padding: 15px;
    }
    
    .product-card-title {
        font-size: 14px;
    }
    
    .product-card-price {
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    .products-grid {
        grid-template-columns: 1fr;
    }
}

/* Ukryj sidebar - ostateczne wymuszenie */
.single-product .sidebar,
.single-product aside,
.single-product .widget-area,
.single-product #secondary,
.full-width-product .sidebar,
.full-width-product aside {
    display: none !important;
}

.full-width-product .site-content,
.full-width-product .content-area {
    width: 100% !important;
    max-width: 100% !important;
}

/* ================================
   MODAL PO DODANIU DO KOSZYKA
   ================================ */

.cart-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

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

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

.cart-modal-content {
    position: relative;
    background: white;
    border-radius: 16px;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 10px 50px rgba(0, 0, 0, 0.3);
    transform: scale(0.9);
    transition: transform 0.3s ease;
    z-index: 100000;
}

.cart-modal.active .cart-modal-content {
    transform: scale(1);
}

.cart-modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 36px;
    height: 36px;
    border: none;
    background: transparent;
    font-size: 32px;
    line-height: 1;
    cursor: pointer;
    color: #999;
    transition: all 0.2s ease;
    opacity: 0.6;
}

.cart-modal-close:hover {
    opacity: 1;
    transform: rotate(90deg);
}

.cart-modal-header {
    text-align: center;
    padding: 40px 30px 20px;
    border-bottom: 1px solid #f0f0f0;
}

.modal-icon {
    font-size: 64px;
    margin-bottom: 15px;
    animation: checkmark 0.5s ease;
}

@keyframes checkmark {
    0% { transform: scale(0); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

.cart-modal-header h3 {
    margin: 0;
    font-size: 24px;
    font-weight: 700;
    color: #5e341c;
}

.cart-modal-body {
    padding: 30px;
}

.added-product {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 20px;
    background: #f5f0e8;
    border-radius: 12px;
    margin-bottom: 20px;
}

.added-product img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 8px;
}

.added-product strong {
    display: block;
    font-size: 16px;
    color: #5e341c;
    margin-bottom: 5px;
}

.cart-summary {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 20px;
    background: #fafafa;
    border-radius: 10px;
}

.cart-summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 15px;
    color: #4a2814;
}

.cart-summary-row.total {
    padding-top: 12px;
    border-top: 2px solid #e0e0e0;
    font-size: 18px;
}

.cart-summary-row strong {
    color: #5e341c;
    font-weight: 700;
}

.cart-summary-row.total strong {
    color: #ef6341;
    font-size: 22px;
}

.cart-modal-actions {
    display: flex;
    gap: 10px;
    padding: 20px 30px 30px;
}

.cart-modal-actions .modal-btn {
    flex: 1;
    padding: 14px 20px;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
}

.btn-continue {
    background: transparent;
    color: #666;
    border: 2px solid #e0e0e0;
}

.btn-continue:hover {
    background: #f5f5f5;
    border-color: #ccc;
}

.btn-checkout {
    background: #ef6341;
    color: white;
}

.btn-checkout:hover {
    background: #d94e2a;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(239, 99, 65, 0.3);
}

@media (max-width: 768px) {
    .cart-modal-content {
        max-width: 95%;
    }
    
    .cart-modal-header {
        padding: 30px 20px 15px;
    }
    
    .cart-modal-body {
        padding: 20px;
    }
    
    .cart-modal-actions {
        flex-direction: column;
        padding: 15px 20px 25px;
    }
    
    .added-product img {
        width: 60px;
        height: 60px;
    }
}

/* =============================================
   CART FORM - Quantity + Button in one row
   ============================================= */

/* Main cart container */
.product-add-to-cart {
    margin-top: 24px;
}

/* Variations table styling */
.variations {
    width: 100%;
    margin-bottom: 20px;
    border: none;
}

.variations td {
    padding: 8px 0;
    border: none;
    vertical-align: middle;
}

.variations td.label {
    font-weight: 600;
    color: #333;
    padding-right: 12px;
    width: 100px;
}

.variations td.value {
    width: 100%;
}

.variations select {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 15px;
    color: #333;
    background: white;
    cursor: pointer;
    transition: all 0.2s ease;
}

.variations select:hover {
    border-color: #ef6341;
}

.variations select:focus {
    outline: none;
    border-color: #ef6341;
    box-shadow: 0 0 0 3px rgba(239, 99, 65, 0.1);
}

/* Variation price display */
.single_variation_wrap {
    margin-top: 20px;
}

.single_variation {
    margin-bottom: 16px;
}

.woocommerce-variation-price {
    font-size: 24px;
    font-weight: 700;
    color: #ef6341;
    margin-bottom: 12px;
}

/* Cart form row - Quantity + Button */
.cart-form-row {
    display: flex;
    gap: 12px;
    align-items: stretch;
    width: 100%;
}

/* Quantity wrapper with +/- buttons */
.quantity-wrapper {
    display: flex;
    align-items: center;
    border: 2px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
    background: white;
    min-width: 140px;
    height: 52px;
}

.qty-btn {
    background: #f5f5f5;
    border: none;
    padding: 0 18px;
    font-size: 22px;
    font-weight: bold;
    color: #333;
    cursor: pointer;
    transition: all 0.2s ease;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.qty-btn:hover {
    background: #ef6341;
    color: white;
}

.qty-btn:active {
    transform: scale(0.95);
}

.quantity-wrapper input.qty {
    border: none;
    text-align: center;
    width: 70px;
    padding: 0;
    font-size: 16px;
    font-weight: 600;
    color: #333;
    background: white;
    height: 100%;
    -moz-appearance: textfield;
}

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

.quantity-wrapper input.qty:focus {
    outline: none;
}

/* Add to cart button */
.btn-add-to-cart {
    flex: 1;
    background: linear-gradient(135deg, #ef6341 0%, #d94521 100%);
    color: white !important;
    border: none;
    padding: 14px 32px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(239, 99, 65, 0.3);
    min-height: 52px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-decoration: none;
}

.btn-add-to-cart:hover {
    background: linear-gradient(135deg, #d94521 0%, #c23a15 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(239, 99, 65, 0.4);
}

.btn-add-to-cart:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(239, 99, 65, 0.3);
}

.btn-add-to-cart:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Loading state */
.btn-add-to-cart.loading {
    position: relative;
    color: transparent;
}

.btn-add-to-cart.loading::after {
    content: "";
    position: absolute;
    width: 20px;
    height: 20px;
    top: 50%;
    left: 50%;
    margin-left: -10px;
    margin-top: -10px;
    border: 3px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spinner 0.6s linear infinite;
}

@keyframes spinner {
    to { transform: rotate(360deg); }
}

/* Reset WooCommerce default styles */
.variations_button {
    display: block !important;
}

.variations_button .quantity {
    display: none; /* Hide default quantity input */
}

/* Responsive */
@media (max-width: 768px) {
    .variations td.label {
        width: 80px;
        font-size: 14px;
    }
    
    .variations select {
        font-size: 14px;
        padding: 10px 14px;
    }
}

@media (max-width: 480px) {
    .cart-form-row {
        flex-direction: column;
        gap: 10px;
    }
    
    .quantity-wrapper {
        width: 100%;
        justify-content: center;
    }
    
    .btn-add-to-cart {
        width: 100%;
    }
    
    .variations {
        margin-bottom: 16px;
    }
    
    .variations td.label,
    .variations td.value {
        display: block;
        width: 100%;
        padding: 6px 0;
    }
}
/* Responsive */
@media (max-width: 480px) {
    .cart-form-row {
        flex-direction: column;
    }
    
    .quantity-wrapper {
        width: 100%;
        justify-content: center;
    }
    
    .btn-add-to-cart {
        width: 100%;
    }
}

/* =============================================
   PYZITHEME CUSTOM CART SYSTEM
   ============================================= */

.pyzitheme-cart-row {
    display: flex;
    gap: 12px;
    align-items: stretch;
    margin-top: 20px;
}

.pyzitheme-qty-box {
    display: flex;
    align-items: center;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    overflow: hidden;
    background: white;
    min-width: 140px;
    height: 56px;
}

.pyzitheme-qty-box:focus-within {
    border-color: #ef6341;
    box-shadow: 0 0 0 4px rgba(239, 99, 65, 0.1);
}

.pyzitheme-qty-minus,
.pyzitheme-qty-plus {
    background: white;
    border: none;
    padding: 0 18px;
    font-size: 24px;
    font-weight: 600;
    color: #666;
    cursor: pointer;
    transition: all 0.2s ease;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    user-select: none;
}

.pyzitheme-qty-minus:hover,
.pyzitheme-qty-plus:hover {
    color: #ef6341;
    background: #fef5f3;
}

.pyzitheme-qty-minus:active,
.pyzitheme-qty-plus:active {
    transform: scale(0.9);
}

.pyzitheme-qty-minus {
    border-right: 1px solid #f0f0f0;
}

.pyzitheme-qty-plus {
    border-left: 1px solid #f0f0f0;
}

.pyzitheme-qty-input {
    border: none !important;
    text-align: center;
    width: 70px;
    padding: 0 !important;
    font-size: 18px;
    font-weight: 600;
    color: #333;
    background: white;
    height: 100%;
    -moz-appearance: textfield;
}

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

.pyzitheme-qty-input:focus {
    outline: none;
}

.pyzitheme-cart-btn {
    flex: 1;
    background: linear-gradient(135deg, #4caf50 0%, #45a049 100%);
    color: white !important;
    border: none;
    padding: 0 32px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 16px rgba(76, 175, 80, 0.25);
    min-height: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    white-space: nowrap;
}

.pyzitheme-cart-btn:hover {
    background: linear-gradient(135deg, #45a049 0%, #3d8b40 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(76, 175, 80, 0.35);
}

.pyzitheme-cart-btn:active {
    transform: translateY(0);
}

.pyzitheme-cart-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.pyzitheme-variations {
    margin-bottom: 20px;
}

.pyzitheme-variation-item {
    margin-bottom: 16px;
}

.pyzitheme-variation-item label {
    display: block;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
    font-size: 15px;
}

.pyzitheme-variation-item select {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    font-size: 15px;
    color: #333;
    background: white;
    cursor: pointer;
    transition: all 0.2s ease;
}

.pyzitheme-variation-item select:hover {
    border-color: #ef6341;
}

.pyzitheme-variation-item select:focus {
    outline: none;
    border-color: #ef6341;
    box-shadow: 0 0 0 4px rgba(239, 99, 65, 0.1);
}

/* Hide WooCommerce default */
.variations_button .quantity {
    display: none !important;
}

@media (max-width: 768px) {
    .pyzitheme-cart-row {
        flex-direction: column;
        gap: 10px;
    }
    
    .pyzitheme-qty-box {
        width: 100%;
        justify-content: center;
    }
}

.pyzitheme-cart-btn.loading {
    opacity: 0.7;
    pointer-events: none;
    position: relative;
}

.pyzitheme-cart-btn.loading::after {
    content: '';
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    border: 2px solid #fff;
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

@keyframes spin {
    to { transform: translateY(-50%) rotate(360deg); }
}

/* ================================
   ZAKŁADKA: INFORMACJE DODATKOWE
   ================================ */

/* Usuń szare tło z contentu zakładek */
.tab-content,
.tabs-content .tab-pane {
    background: transparent;
}

/* Tabela atrybutów WooCommerce */
.woocommerce-product-attributes,
.shop_attributes {
    width: 100%;
    border-collapse: collapse;
    margin: 0;
    background: white;
}

.woocommerce-product-attributes th,
.shop_attributes th {
    width: 35%;
    padding: 16px 20px;
    text-align: left;
    font-size: 15px;
    font-weight: 600;
    color: #5e341c;
    background: #f5f0e8;
    border-bottom: 1px solid #e0d5cb;
}

.woocommerce-product-attributes td,
.shop_attributes td {
    padding: 16px 20px;
    font-size: 15px;
    color: #4a2814;
    background: white;
    border-bottom: 1px solid #f0f0f0;
    line-height: 1.6;
}

.woocommerce-product-attributes tr:last-child td,
.shop_attributes tr:last-child td,
.woocommerce-product-attributes tr:last-child th,
.shop_attributes tr:last-child th {
    border-bottom: none;
}

.woocommerce-product-attributes tbody tr:nth-child(even),
.shop_attributes tbody tr:nth-child(even) {
    background: #fafafa;
}

/* Linki w tabeli */
.woocommerce-product-attributes a,
.shop_attributes a {
    color: #ef6341;
    text-decoration: none;
    font-weight: 500;
}

.woocommerce-product-attributes a:hover,
.shop_attributes a:hover {
    text-decoration: underline;
}

/* Jeśli nie ma atrybutów */
.woocommerce-Tabs-panel--additional_information p {
    font-size: 15px;
    color: #666;
    line-height: 1.7;
}

/* ================================
   ZAKŁADKA: OPINIE (REVIEWS)
   ================================ */

/* Container opinii */
#comments,
#reviews {
    width: 100%;
}

#comments h2,
#reviews h2,
.woocommerce-Reviews-title {
    font-size: 24px;
    font-weight: 700;
    color: #5e341c;
    margin: 0 0 30px 0;
    line-height: 1.3;
}

.woocommerce-Reviews-title span {
    color: #666;
    font-weight: 500;
}

/* Lista opinii */
.commentlist {
    list-style: none;
    padding: 0;
    margin: 0 0 40px 0;
}

.commentlist .review {
    margin-bottom: 25px;
}

.commentlist li:last-child {
    margin-bottom: 0;
}

/* Container pojedynczej opinii */
.comment_container {
    display: flex;
    gap: 20px;
    padding: 25px;
    background: white;
    border-radius: 12px;
    border: 1px solid #f0f0f0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

/* Avatar */
.comment_container .avatar {
    flex-shrink: 0;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    border: 2px solid #e0e0e0;
}

/* Metadane opinii */
.comment-text {
    flex: 1;
}

.comment-text .meta {
    margin-bottom: 12px;
    line-height: 1.6;
}

.comment-text .woocommerce-review__author {
    font-size: 16px;
    font-weight: 600;
    color: #5e341c;
    margin: 0;
}

.comment-text .woocommerce-review__dash {
    color: #ccc;
    margin: 0 5px;
}

.comment-text .woocommerce-review__published-date {
    font-size: 13px;
    color: #999;
}

/* Gwiazdki - ocena */
.star-rating {
    display: inline-block;
    position: relative;
    height: 1em;
    line-height: 1;
    font-size: 18px;
    width: 5.4em;
    font-family: Arial, sans-serif;
    margin-bottom: 12px;
    overflow: hidden;
    text-indent: -9999px;
    white-space: nowrap;
}

.star-rating::before {
    content: "★★★★★";
    position: absolute;
    top: 0;
    left: 0;
    color: #e0e0e0;
    letter-spacing: 0.1em;
    text-indent: 0;
}

.star-rating span {
    position: absolute;
    top: 0;
    left: 0;
    overflow: hidden;
    padding: 0;
    text-indent: -9999px;
}

.star-rating span::before {
    content: "★★★★★";
    position: absolute;
    top: 0;
    left: 0;
    color: #ffc107;
    letter-spacing: 0.1em;
    text-indent: 0;
}

/* Ukryj tekst wewnątrz gwiazdek */
.star-rating strong {
    position: absolute;
    left: -9999px;
}

/* Treść opinii */
.comment-text .description {
    font-size: 15px;
    line-height: 1.7;
    color: #4a2814;
    margin: 15px 0 0 0;
}

.comment-text .description p {
    margin: 0 0 10px 0;
}

.comment-text .description p:last-child {
    margin-bottom: 0;
}

/* Verified badge */
.woocommerce-review__verified {
    font-size: 12px;
    color: #4caf50;
    font-weight: 500;
    display: inline;
    font-style: normal;
}

.woocommerce-review__verified::before {
    content: "";
}

/* ================================
   FORMULARZ DODAWANIA OPINII
   ================================ */

#review_form_wrapper,
#respond {
    margin-top: 40px;
    padding-top: 40px;
    border-top: 2px solid #f0f0f0;
}

#reply-title,
#review_form_wrapper h3 {
    font-size: 20px;
    font-weight: 700;
    color: #5e341c;
    margin: 0 0 25px 0;
}

/* Ocena gwiazdkami w formularzu */
.comment-form-rating {
    margin-bottom: 20px;
}

.comment-form-rating label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #5e341c;
    margin-bottom: 10px;
}

.comment-form-rating .stars {
    display: inline-flex;
    gap: 3px;
}

.comment-form-rating .stars a {
    font-size: 24px;
    color: #e0e0e0;
    text-decoration: none;
    transition: color 0.2s ease;
    line-height: 1;
}

.comment-form-rating .stars a:hover,
.comment-form-rating .stars a.active {
    color: #ffc107;
}

/* Pola formularza */
.comment-form-comment,
.comment-form-author,
.comment-form-email {
    margin-bottom: 20px;
}

.comment-form-comment label,
.comment-form-author label,
.comment-form-email label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #5e341c;
    margin-bottom: 8px;
}

.comment-form-comment label .required,
.comment-form-author label .required,
.comment-form-email label .required {
    color: #ef6341;
}

.comment-form-comment textarea {
    width: 100%;
    min-height: 120px;
    padding: 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 15px;
    font-family: inherit;
    resize: vertical;
    transition: border-color 0.2s ease;
    line-height: 1.6;
}

.comment-form-comment textarea:focus {
    outline: none;
    border-color: #ef6341;
    box-shadow: 0 0 0 3px rgba(239, 99, 65, 0.1);
}

.comment-form-author input,
.comment-form-email input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 15px;
    transition: border-color 0.2s ease;
}

.comment-form-author input:focus,
.comment-form-email input:focus {
    outline: none;
    border-color: #ef6341;
    box-shadow: 0 0 0 3px rgba(239, 99, 65, 0.1);
}

/* Grid dla pól Imię/Email na desktop */
@media (min-width: 769px) {
    .comment-form-author,
    .comment-form-email {
        display: inline-block;
        width: calc(50% - 10px);
        vertical-align: top;
    }
    
    .comment-form-author {
        margin-right: 20px;
    }
}

/* Przycisk wyślij */
.form-submit {
    margin: 0;
}

.form-submit input[type="submit"],
.form-submit button,
#submit {
    background: linear-gradient(135deg, #ef6341 0%, #d94e2a 100%);
    color: white !important;
    border: none;
    padding: 14px 32px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 16px rgba(239, 99, 65, 0.25);
}

.form-submit input[type="submit"]:hover,
.form-submit button:hover,
#submit:hover {
    background: linear-gradient(135deg, #d94e2a 0%, #c23d1a 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(239, 99, 65, 0.35);
}

/* Komunikat "Brak opinii" */
.woocommerce-noreviews,
p.woocommerce-noreviews {
    padding: 40px;
    text-align: center;
    background: #fafafa;
    border-radius: 12px;
    font-size: 16px;
    color: #999;
    margin: 0 0 30px 0;
}

/* ================================
   RESPONSYWNOŚĆ
   ================================ */

@media (max-width: 768px) {
    /* Tabela atrybutów */
    .woocommerce-product-attributes,
    .shop_attributes {
        font-size: 14px;
    }
    
    .woocommerce-product-attributes th,
    .shop_attributes th {
        width: 40%;
        padding: 12px 15px;
        font-size: 14px;
    }
    
    .woocommerce-product-attributes td,
    .shop_attributes td {
        padding: 12px 15px;
        font-size: 14px;
    }
    
    /* Opinie */
    .comment_container {
        flex-direction: column;
        padding: 20px 15px;
        gap: 15px;
    }
    
    .comment_container .avatar {
        width: 50px;
        height: 50px;
        align-self: flex-start;
    }
    
    .comment-text .woocommerce-review__author {
        font-size: 15px;
    }
    
    .comment-text .description {
        font-size: 14px;
    }
    
    .star-rating {
        font-size: 16px;
    }
    
    /* Formularz */
    .comment-form-author,
    .comment-form-email {
        width: 100%;
        margin-right: 0;
    }
    
    .form-submit input[type="submit"],
    .form-submit button,
    #submit {
        width: 100%;
        padding: 16px 24px;
    }
    
    #reply-title,
    #review_form_wrapper h3 {
        font-size: 18px;
    }
    
    .woocommerce-Reviews-title {
        font-size: 20px;
    }
}