/* Product Detail Page - New Design */

/* === RESET & BASE === */
.catalog-product-view .page-main {
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    min-height: 0 !important;
}

.catalog-product-view .columns,
.catalog-product-view .column.main {
    padding: 0 !important;
    margin: 0 !important;
    min-height: 0 !important;
}

.catalog-product-view .sidebar {
    display: none !important;
}

/* === CONTAINER === */
.product-detail-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px 20px 0;
    background: #fff;
}

/* === BREADCRUMB === */
.product-breadcrumb-nav {
    font-size: 1.15rem;
    color: #666;
    margin-bottom: 18px;
    padding: 10px 0;
}

.product-breadcrumb-nav a {
    color: #0095ff;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
}

.product-breadcrumb-nav a:hover {
    color: #007acc;
}

/* === MAIN GRID (IMAGE + INFO) === */
.product-view-main {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 50px;
    margin-bottom: 24px;
}

@media (max-width: 992px) {
    .product-view-main {
        grid-template-columns: 1fr 1fr;
        gap: 30px;
    }
}

@media (max-width: 768px) {
    .product-view-main {
        grid-template-columns: 1fr;
        gap: 25px;
    }
}

/* === LEFT: MEDIA COLUMN === */
.product-media-column {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.product-media {
    width: 100%;
    background: #f8f9fa;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.image-wrapper {
    width: 100%;
    padding: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 400px;
    background: #f8f9fa;
    box-sizing: border-box;
}

.product-image-main {
    max-width: 100%;
    height: auto;
    display: block;
}

/* === THUMBNAILS === */
.product-thumbnails {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding: 10px 0;
}

.thumbnail-item {
    width: 80px;
    height: 80px;
    border: 2px solid transparent;
    border-radius: 6px;
    overflow: hidden;
    cursor: pointer;
    background: #f8f9fa;
    flex-shrink: 0;
    transition: all 0.3s;
}

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

.thumbnail-item.active {
    border-color: #0095ff;
    box-shadow: 0 0 0 2px rgba(0, 149, 255, 0.2);
}

.thumbnail-item:hover {
    border-color: #0095ff;
}

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

/* --- TITLE --- */
.product-title {
    font-size: 2.8rem;
    font-weight: 700;
    line-height: 1.3;
    color: #1a1a1a;
    margin: 0;
}

/* --- META (Author, Publisher) --- */
.product-meta-block {
    padding: 15px;
    background: #f8f9fa;
    border-radius: 6px;
}

.meta-item {
    display: flex;
    gap: 10px;
    padding: 6px 0;
    font-size: 1.35rem;
}

.meta-label {
    font-weight: 600;
    color: #666;
    min-width: 120px;
}

.meta-value {
    color: #333;
    font-weight: 500;
}

/* --- BADGES --- */
.product-badges-section {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.stock-badge {
    padding: 8px 14px;
    border-radius: 6px;
    font-size: 1.1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    background: #f0f9ff;
    color: #10b981;
    border: 2px solid #10b981;
}

.stock-badge.is-out-stock {
    background: #fef2f2;
    color: #ef4444;
    border-color: #ef4444;
}

.sku-badge {
    padding: 8px 14px;
    border-radius: 6px;
    font-size: 1.1rem;
    font-weight: 700;
    background: #eff6ff;
    color: #0095ff;
}

/* --- PRICE BLOCK --- */
.product-price-block {
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #0095ff;
}

.price-label {
    font-size: 1.25rem;
    color: #666;
    margin-bottom: 10px;
    text-transform: uppercase;
    font-weight: 600;
}

.price-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    font-size: 1.25rem;
}

.price-name {
    color: #666;
    font-weight: 500;
}

.price-value {
    font-weight: 700;
    color: #333;
}

.price-row.sale-price .price-value {
    color: #ef4444;
    font-size: 1.65rem;
}

/* --- ADD TO CART --- */
.product-actions-block {
    padding: 20px;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
}

.product-action-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.qty-section {
    display: flex;
    align-items: center;
    gap: 12px;
}

.qty-label {
    font-weight: 600;
    color: #333;
    min-width: 80px;
    font-size: 1.25rem;
}

.qty-input {
    width: 70px;
    padding: 8px 12px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    text-align: center;
    font-weight: 600;
    font-size: 1.3rem;
    transition: border-color 0.3s;
}

.qty-input:focus {
    outline: none;
    border-color: #0095ff;
    box-shadow: 0 0 0 3px rgba(0, 149, 255, 0.1);
}

.btn-add-to-cart {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #0095ff 0%, #0078cc 100%);
    color: #fff;
    border: none;
    border-radius: 6px;
    font-weight: 700;
    font-size: 1.2rem;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 12px rgba(0, 149, 255, 0.25);
    letter-spacing: 0.5px;
}

.btn-add-to-cart:hover {
    background: linear-gradient(135deg, #007acc 0%, #0065b3 100%);
    box-shadow: 0 6px 16px rgba(0, 149, 255, 0.35);
    transform: translateY(-2px);
}

.catalog-product-view .login-required-tooltip {
    position: relative;
    display: block;
    width: 100%;
}

.catalog-product-view .login-required-tooltip::after {
    content: attr(data-tooltip);
    position: absolute;
    left: 50%;
    bottom: calc(100% + 10px);
    transform: translateX(-50%);
    width: max-content;
    max-width: min(280px, 90vw);
    padding: 8px 10px;
    border-radius: 6px;
    background: #1e293b;
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.3;
    text-align: center;
    opacity: 0;
    pointer-events: none;
    visibility: hidden;
    z-index: 20;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

.catalog-product-view .login-required-tooltip:hover::after {
    opacity: 1;
    visibility: visible;
}

.catalog-product-view .btn-add-to-cart.is-login-required,
.catalog-product-view .btn-add-to-cart.is-login-required:hover {
    background: #cbd5e1 !important;
    color: #64748b !important;
    cursor: not-allowed !important;
    box-shadow: none !important;
    transform: none !important;
}

/* --- SPECS BLOCK --- */
.product-specs-block {
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
}

.specs-title {
    font-size: 1.35rem;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 15px 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.specs-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px 15px;
}

.spec-row {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 8px 0;
    font-size: 1.25rem;
}

.spec-label {
    font-weight: 600;
    color: #666;
}

.spec-value {
    color: #333;
    font-weight: 500;
}

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

/* --- DESCRIPTION BLOCK --- */
.product-description-block {
    padding: 22px 25px;
    background: #f8f9fa;
    border-radius: 8px;
    margin-top: 18px;
}

.description-title {
    font-size: 1.45rem;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 15px 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.description-content {
    font-size: 1.25rem;
    line-height: 1.7;
    color: #555;
}

.description-content p {
    margin: 0;
}

/* === RESPONSIVE === */
@media (max-width: 576px) {
    .product-detail-container {
        padding: 15px;
    }

    .product-title {
        font-size: 2.2rem;
    }

    .product-view-main {
        gap: 20px;
    }

    .image-wrapper {
        min-height: 300px;
        padding: 20px;
    }

    .product-badges-section {
        gap: 8px;
    }

    .qty-section {
        flex-wrap: wrap;
    }

    .specs-grid {
        grid-template-columns: 1fr;
        gap: 8px 10px;
    }

    .btn-add-to-cart {
        padding: 12px;
        font-size: 1.1rem;
    }
}
