/* Product Page Styles */
.product-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Breadcrumbs */
.breadcrumbs {
    background: var(--light-gray);
    padding: 15px 0;
    margin-bottom: 2rem;
}

.breadcrumbs-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    font-size: 14px;
    color: var(--text-gray);
}

.breadcrumbs a {
    color: var(--blue);
    text-decoration: none;
    font-weight: 500;
}

.breadcrumbs a:hover {
    text-decoration: underline;
}

.breadcrumbs span {
    margin: 0 8px;
    color: var(--text-gray);
}

/* Product Layout */
.product-page {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    margin: 40px 0;
}

/* Product Gallery */
.product-gallery {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Main Image Clickable */
.main-image {
    width: 100%;
    aspect-ratio: 1;
    border-radius: 12px;
    overflow: hidden;
    background: var(--white);
    border: 1px solid #f0f0f0;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.main-image:hover {
    transform: scale(1.02);
}

.main-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.thumbnail-images {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    max-width: 100%;
}

.thumbnail {
    aspect-ratio: 1;
    border-radius: 8px;
    overflow: hidden;
    background: var(--white);
    border: 2px solid transparent;
    cursor: pointer;
    transition: all 0.3s ease;
}

.thumbnail:hover,
.thumbnail.active {
    border-color: var(--primary-green);
}

.thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* Product Info Side */
.product-info {
    padding: 20px 0;
}

.product-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--black);
    margin-bottom: 8px;
}

.product-code {
    font-size: 14px;
    color: var(--text-gray);
    margin-bottom: 20px;
}

.product-price {
    font-size: 2.5rem;
    font-weight: 700;
    color: #ff7e3d;
    margin-bottom: 15px;
}

.old-price {
    font-size: 1.5rem;
    color: var(--text-gray);
    text-decoration: line-through;
}

/* Size Selection */
.size-section {
    margin-bottom: 30px;
}

.size-label {
    font-size: 16px;
    font-weight: 600;
    color: var(--black);
    margin-bottom: 15px;
    display: block;
}

.size-options {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 15px;
}

.size-option {
    min-width: 70px;
    height: 55px;
    padding: 3px 5px;
    border: 1px solid #ddd;
    background: var(--white);
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    font-weight: 600;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    color: var(--black);
}

.size-option:hover {
    border-color: var(--primary-green);
}

.size-option.active {
    border-color: var(--primary-green);
    background: var(--primary-green);
    color: var(--white);
}

.size-number {
    font-size: 16px;
    font-weight: 700;
    line-height: 1;
}

.size-length {
    font-size: 11px;
    font-weight: 400;
    line-height: 1;
    opacity: 0.7;
}

/* Promotion Notice */
.promotion-notice {
    background: linear-gradient(135deg, #fff3e0, #ffe0b3);
    border: 1px solid #ff9800;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 15px;
    color: var(--black);
    font-weight: 500;
    text-align: left;
}

/* Action Buttons */
.action-buttons {
    display: flex;
    gap: 15px;
    margin-bottom: 30px;
}

.add-to-cart-btn {
    flex: 1;
    background: var(--primary-green);
    color: var(--white);
    border: none;
    padding: 12px 20px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid var(--primary-green);
}

.add-to-cart-btn:hover:not(:disabled) {
    background: var(--light-green);
    border-color: var(--light-green);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 160, 70, 0.3);
}

.add-to-cart-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.chat-manager-btn {
    flex: 1;
    background: var(--light-blue);
    color: var(--white);
    border: none;
    padding: 12px 20px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.chat-manager-btn:hover {
    background: var(--blue);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(74, 158, 255, 0.3);
}

/* Delivery Info Block */
.delivery-info {
    background: var(--white);
    border: 1px solid #e9ecef;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
}

.delivery-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--black);
    margin-bottom: 15px;
}

.delivery-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.delivery-option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 15px;
    background: var(--white);
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.delivery-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.delivery-icon {
    width: 24px;
    height: 24px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: var(--white);
}

.delivery-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.delivery-method {
    font-size: 14px;
    font-weight: 500;
    color: var(--black);
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
    min-width: 0;
}

.delivery-method .mobile-text {
    display: none;
}

.delivery-method .desktop-text {
    display: inline;
}

.delivery-time {
    font-size: 12px;
    color: var(--text-gray);
}

.delivery-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
}

.delivery-price {
    font-size: 14px;
    font-weight: 600;
    color: var(--primary-green);
}

.delivery-price.paid {
    color: var(--text-gray);
}

/* Product Details Section */
.product-details {
    margin-top: 40px;
    background: var(--white);
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.05);
    border: 1px solid #f0f0f0;
}

.details-title {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 20px;
    color: var(--black);
    border-bottom: 3px solid var(--primary-green);
    padding-bottom: 10px;
    display: inline-block;
}

.description-text {
    color: var(--text-gray);
    line-height: 1.8;
    font-size: 16px;
    margin-bottom: 30px;
}

/* Size Chart Table */
.size-chart-section {
    margin-top: 30px;
}

.size-chart-title {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 20px;
    color: var(--black);
    display: flex;
    align-items: center;
    gap: 10px;
}

.size-chart-title::before {
    content: "📏";
    font-size: 22px;
}

.size-chart-table {
    overflow-x: auto;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    border: 1px solid #e9ecef;
}

.size-chart-table table {
    width: 100%;
    border-collapse: collapse;
    background: var(--white);
    font-size: 14px;
}

.size-chart-table thead {
    background: linear-gradient(135deg, var(--primary-green), var(--light-green));
    color: var(--white);
}

.size-chart-table th {
    padding: 15px 20px;
    text-align: center;
    font-weight: 600;
    font-size: 16px;
    letter-spacing: 0.5px;
}

.size-chart-table td {
    padding: 12px 20px;
    text-align: center;
    border-bottom: 1px solid #f0f0f0;
    transition: background 0.3s ease;
}

.size-chart-table tbody tr:hover {
    background: #f8f9fa;
}

.size-chart-table tbody tr:last-child td {
    border-bottom: none;
}

.size-chart-table tbody tr:nth-child(even) {
    background: #fafbfc;
}

/* Gallery Modal */
.gallery-modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.9);
    overflow: hidden;
}

.gallery-modal-content {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gallery-modal img {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
    border-radius: 8px;
}

.gallery-close {
    position: absolute;
    top: 20px;
    right: 35px;
    color: #fff;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    z-index: 2001;
}

.gallery-close:hover {
    color: #ccc;
}

.gallery-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,0.2);
    color: #fff;
    border: none;
    font-size: 30px;
    padding: 15px 20px;
    cursor: pointer;
    border-radius: 5px;
    transition: background 0.3s ease;
}

.gallery-nav:hover {
    background: rgba(255,255,255,0.4);
}

.gallery-prev {
    left: 20px;
}

.gallery-next {
    right: 20px;
}

.gallery-thumbnails {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
}

.gallery-thumb {
    width: 60px;
    height: 60px;
    border-radius: 5px;
    cursor: pointer;
    opacity: 0.6;
    transition: opacity 0.3s ease;
    object-fit: cover;
}

.gallery-thumb.active,
.gallery-thumb:hover {
    opacity: 1;
}

/* Related Products */
.related-products {
    margin-top: 80px;
}

.section-title {
    text-align: center;
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 40px;
    color: var(--black);
}

/* Mobile block - hidden by default */
.mobile-product-details {
    display: none;
}

/* Notification Styles */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
    min-width: 300px;
    max-width: 400px;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    opacity: 0;
    transform: translateX(100%);
    transition: all 0.3s ease;
}

.notification.show {
    opacity: 1;
    transform: translateX(0);
}

.notification-success {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
}

.notification-error {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
}

.notification-content {
    display: flex;
    align-items: center;
    padding: 15px;
    gap: 10px;
}

.notification-icon {
    font-size: 1.2rem;
    font-weight: bold;
}

.notification-message {
    flex: 1;
    font-weight: 500;
}

.notification-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: inherit;
    opacity: 0.7;
    padding: 0;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.notification-close:hover {
    opacity: 1;
}

/* ПЕРЕВИЗНАЧЕННЯ СТИЛІВ ЦІН ДЛЯ ОСНОВНОЇ КАРТОЧКИ ТОВАРУ */

/* Стилі тільки для основної карточки товару */
.product-info .product-prices {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 15px !important;
}

.product-info .current-price {
    font-size: 2.625rem !important;
    font-weight: 700 !important;
    color: #ff7e3d !important;
}

.product-info .old-price {
    font-size: 2.1rem !important;
    color: var(--text-gray) !important;
    text-decoration: line-through !important;
}

/* На мобільних повертаємо вертикальне розміщення для основної карточки */
@media (max-width: 768px) {
    .product-info .product-prices {
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        gap: 15px !important;
        justify-content: center !important;
    }
    
    .product-info .current-price {
        font-size: 2rem !important;
    }
    
    .product-info .old-price {
        font-size: 1.6rem !important;
    }
}

/* ДОДАТКОВІ СТИЛІ - ВИПРАВЛЕННЯ ДЛЯ РОЗМІРІВ ТА ЦІНИ */

/* ВИПРАВЛЕННЯ ДЛЯ РОЗМІРІВ */
.size-length {
    font-size: 0.9em !important;
    opacity: 0.8 !important;
}

/* СТАРОЮ ЦІНУ НА 20% МЕНШЕ ЗА НОВУ ЦІНУ */
.old-price {
    font-size: 0.8em !important;
}

/* Responsive */
@media (max-width: 1024px) {
    .product-page {
        gap: 40px;
    }
    
    .product-details {
        padding: 25px;
    }
}

@media (max-width: 768px) {
    .product-page {
        grid-template-columns: 1fr !important;
        gap: 20px !important;
    }
    
    .thumbnail-images {
        order: 2 !important;
        margin-top: 15px !important;
        margin-bottom: 0 !important;
    }
    
    .product-info {
        order: 3 !important;
        padding: 20px 0 0 0 !important;
    }
    
    .product-title {
        font-size: 1.5rem !important;
    }
    
    .product-price {
        font-size: 2rem !important;
    }
    
    .size-options {
        grid-template-columns: repeat(auto-fit, minmax(70px, 1fr)) !important;
    }
    
    .delivery-info {
        padding: 15px !important;
        order: 4 !important;
        margin-bottom: 0 !important;
    }
    
    /* ВИСОКОСПЕЦИФІЧНІ СТИЛІ ДЛЯ ДОСТАВКИ - ПЕРЕВИЗНАЧАЮТЬ ЗАГАЛЬНІ ПРАВИЛА */
    .delivery-info .delivery-options .delivery-option {
        display: flex !important;
        align-items: center !important;
        padding: 10px !important;
        margin-bottom: 8px !important;
        background: #f8f9fa !important;
        border-radius: 8px !important;
        border: 1px solid #e9ecef !important;
        gap: 8px !important;
        transform: none !important;
        transition: none !important;
    }
    
    /* Прибираємо відступ знизу у останнього елементу доставки */
    .delivery-info .delivery-options .delivery-option:last-child {
        margin-bottom: 0 !important;
    }
    
    .delivery-info .delivery-options .delivery-option .delivery-left {
        display: flex !important;
        align-items: center !important;
        gap: 8px !important;
        width: 45% !important;
        transform: none !important;
        transition: none !important;
    }
    
    .delivery-info .delivery-options .delivery-option .delivery-left .delivery-icon {
        width: 30px !important;
        height: 30px !important;
        flex-shrink: 0 !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        background: white !important;
        border-radius: 6px !important;
        border: 1px solid #e9ecef !important;
        transform: none !important;
        transition: none !important;
    }
    
    .delivery-info .delivery-options .delivery-option .delivery-left .delivery-icon img {
        width: 100% !important;
        height: 100% !important;
        object-fit: contain !important;
        transform: none !important;
        transition: none !important;
    }
    
    .delivery-info .delivery-options .delivery-option .delivery-left .delivery-method {
        display: flex !important;
        flex-direction: column !important;
        gap: 1px !important;
        font-size: 12px !important;
        line-height: 1.1 !important;
        align-items: flex-start !important;
        white-space: normal !important;
        transform: none !important;
        transition: none !important;
        min-width: 0 !important;
        flex: 1 !important;
    }
    
    .delivery-info .delivery-options .delivery-option .delivery-left .delivery-method .desktop-text {
        display: none !important;
    }
    
    .delivery-info .delivery-options .delivery-option .delivery-left .delivery-method .mobile-text {
        display: block !important;
        font-size: 15px !important;
        font-weight: 600 !important;
        color: #333 !important;
        line-height: 1.1 !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
    }
    
    .delivery-info .delivery-options .delivery-option .delivery-right {
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        width: 55% !important;
        gap: 5px !important;
        justify-content: space-between !important;
        transform: none !important;
        transition: none !important;
        min-width: 0 !important;
    }
    
    .delivery-info .delivery-options .delivery-option .delivery-right .delivery-time {
        font-size: 12px !important;
        color: #666 !important;
        font-weight: 500 !important;
        white-space: nowrap !important;
        margin: 0 !important;
        padding: 0 !important;
        transform: none !important;
        transition: none !important;
        flex-shrink: 0 !important;
    }
    
    .delivery-info .delivery-options .delivery-option .delivery-right .delivery-price {
        font-size: 13px !important;
        font-weight: 600 !important;
        color: #00A046 !important;
        white-space: nowrap !important;
        margin: 0 !important;
        padding: 0 !important;
        transform: none !important;
        transition: none !important;
        flex-shrink: 0 !important;
        text-align: right !important;
    }
    
    .delivery-info .delivery-options .delivery-option .delivery-right .delivery-price.paid {
        color: #666 !important;
    }
    
    .product-details {
        display: none !important;
    }
    
    .mobile-product-details {
        display: block !important;
        background: var(--white) !important;
        border-radius: 12px !important;
        padding: 20px !important;
        margin-top: 20px !important;
        box-shadow: 0 4px 20px rgba(0,0,0,0.05) !important;
        border: 1px solid #f0f0f0 !important;
    }
    
    .notification {
        right: 10px;
        left: 10px;
        min-width: auto;
        max-width: none;
    }
}

/* ОНОВЛЕНІ СТИЛІ ДЛЯ ДЕСКТОПНОЇ ДОСТАВКИ */
@media (min-width: 769px) {
    .delivery-option {
        display: flex !important;
        align-items: center !important;
        padding: 15px !important;
        margin-bottom: 10px !important;
        background: #f8f9fa !important;
        border-radius: 8px !important;
        border: 1px solid #e9ecef !important;
        gap: 15px !important;
    }
    
    .delivery-left {
        display: flex !important;
        align-items: center !important;
        gap: 12px !important;
        width: 40% !important;
    }
    
    .delivery-icon {
        width: 30px !important;
        height: 30px !important;
        flex-shrink: 0 !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        background: white !important;
        border-radius: 6px !important;
        border: 1px solid #e9ecef !important;
        padding: 3px !important;
    }
    
    .delivery-icon img {
        width: 100% !important;
        height: 100% !important;
        object-fit: contain !important;
    }
    
    .delivery-method .mobile-text {
        display: none !important;
    }
    
    .delivery-method .desktop-text {
        display: inline !important;
        font-size: 15px !important;
        font-weight: 600 !important;
        color: #333 !important;
    }
    
    .delivery-right {
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        width: 60% !important;
        gap: 15px !important;
        justify-content: space-between !important;
    }
    
    .delivery-time {
        font-size: 14px !important;
        color: #666 !important;
        font-weight: 500 !important;
        white-space: nowrap !important;
        margin: 0 !important;
        padding: 0 !important;
    }
    
    .delivery-price {
        font-size: 15px !important;
        font-weight: 600 !important;
        color: #00A046 !important;
        white-space: nowrap !important;
        margin: 0 !important;
        padding: 0 !important;
    }
    
    .delivery-price.paid {
        color: #666 !important;
    }
}

@media (max-width: 480px) {
    .product-container {
        padding: 0 10px;
    }
    
    .product-title {
        font-size: 1.25rem;
    }
    
    .product-price {
        font-size: 1.8rem;
    }
    
    .action-buttons {
        flex-direction: column;
        gap: 10px;
    }
    
    .action-buttons .add-to-cart-btn,
    .chat-manager-btn {
        flex: none;
        width: 100%;
    }
    
    .delivery-method {
        font-size: 12px;
    }
    
    .delivery-time {
        font-size: 10px;
    }
    
    .mobile-product-details {
        padding: 15px !important;
        margin-top: 15px !important;
    }
    
    .mobile-product-details .details-title {
        font-size: 18px !important;
        margin-bottom: 15px !important;
    }
    
    .mobile-product-details .description-text {
        font-size: 14px !important;
        line-height: 1.6 !important;
        margin-bottom: 20px !important;
    }
    
    .mobile-product-details .size-chart-table {
        font-size: 12px !important;
    }
    
    .mobile-product-details .size-chart-table th,
    .mobile-product-details .size-chart-table td {
        padding: 8px 10px !important;
    }
    
    .mobile-product-details .size-chart-title {
        font-size: 16px !important;
        margin-bottom: 15px !important;
    }
}