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

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

/* Always use left-right layout on horizontal screens */
.product-layout {
    grid-template-columns: 1fr 1fr;
    gap: 60px;
}

.product-side-column {
    grid-column: 2;
    grid-row: 2 / span 2;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.wishlist-card {
    background: var(--surface-panel);
    border: 1px solid var(--border-default);
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.wishlist-card .btn-secondary {
    width: 100%;
}

@media (max-width: 968px) {
    .product-layout {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .product-detail-container {
        padding: 20px 16px;
    }

    .product-side-column {
        grid-column: auto;
        grid-row: auto;
    }
    
    .product-title {
        font-size: 2em;
        margin-bottom: 16px;
    }
    
    .product-description {
        font-size: 1em;
        line-height: 1.6;
        margin: 20px 0;
    }
    
    .product-meta-grid {
        gap: 12px;
        margin: 20px 0;
        padding: 20px 0;
    }
    .product-meta-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    
    .meta-item {
        font-size: 0.85em;
    }
    
    .purchase-section {
        padding: 8px;
        margin-top: 8px;  
    }
    
    .license-options-grid {
        gap: 10px;
        margin: 12px 0;
    }
    
    .license-card {
        padding: 16px;
    }
    
    .license-card.selected {
        padding: 14px;
    }
    
    .license-card-header {
        margin-bottom: 8px;
    }
    
    .total-price-display {
        padding: 12px;           
        margin: 12px 0; 
    }
    
    .action-buttons {
        margin-top: 12px;
        gap: 10px;
    }
}

.product-image-section {
    position: relative;
}

.product-image-wrapper {
    overflow: hidden;
    position: relative;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    min-height: 400px;
}

.product-image-wrapper img {
    max-width: 100%;
    max-height: 80vh;
    width: 100%;
    height: auto;
    object-fit: contain;
    display: block;
    cursor: pointer;
    transition: opacity 0.3s;
}

@media (max-width: 968px) {
    .product-image-wrapper {
        min-height: auto;
    }
    
    .product-image-wrapper img {
        max-height: 50vh;
        width: auto;
    }
}

.product-image-wrapper img:hover {
    opacity: 0.9;
}

/* Lightbox styles */
.lightbox {
    display: none;
    position: fixed;
    z-index: 9999;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    align-items: center;
    justify-content: center;
}

.lightbox.active {
    display: flex;
}

.lightbox img {
    max-width: 90%;
    max-height: 90vh;
    object-fit: contain;
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: white;
    font-size: 40px;
    font-weight: 300;
    cursor: pointer;
    transition: opacity 0.3s;
}

.lightbox-close:hover {
    opacity: 0.7;
}

.product-info-section {
    padding: 20px 0;
}

.product-title {
    font-size: 2.5em;
    font-weight: 300;
    margin: 0 0 20px 0;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

.product-meta-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin: 30px 0;
    padding: 30px 0;
    border-top: 1px solid var(--border-default);
    border-bottom: 1px solid var(--border-default);
}

.meta-item {
    font-size: 0.9em;
    color: var(--text-muted);
}

.meta-item strong {
    display: block;
    color: var(--text-color);
    margin-bottom: 4px;
    font-weight: 500;
}

.product-description {
    font-size: 1.1em;
    line-height: 1.8;
    color: var(--text-color);
    margin: 30px 0;
    font-family: SimSun, "宋体", STSong, "华文宋体", "MS Mincho", "ＭＳ 明朝", serif;
}

.purchase-section {
    background: var(--surface-panel);
    padding: 8px 8px;
    margin-top: 8px;
    border: 1px solid var(--border-default);
    color: var(--text-color);
}

.bundle-info-section {
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    border: 2px solid #28a745;
    border-radius: 0;
    padding: 8px 8px;
    margin-top: 8px;
    margin-bottom: 1px;
    width: 100%;
    align-self: start;
}

.bundle-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 1px;
}

.bundle-badge {
    background: #28a745;
    color: white;
    padding: 6px 14px;
    border-radius: 0px;
    font-weight: 600;
    font-size: 0.7em;
}

.bundle-title {
    font-size: 1.0em;
    font-weight: 700;
    color: #155724;
}

.bundle-description {
    color: #155724;
    margin-bottom: 12px;
}

.bundle-products-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.bundle-product-tag {
    background: white;
    border: 1px solid #28a745;
    color: #155724;
    padding: 4px 12px;
    border-radius: 0px;
    font-size: 0.85em;
}

.bundle-requirement {
    background: #fff3cd;
    border: 1px solid #ffc107;
    color: #856404;
    padding: 10px 16px;
    border-radius: 0px;
    margin-top: 12px;
    font-size: 0.95em;
}

.license-options-grid {
    display: grid;
    gap: 12px;
    margin: 16px 0;
}

.license-card {
    border: 2px solid var(--border-default);
    padding: 10px;
    transition: all 0.3s;
    cursor: pointer;
    position: relative;
}

.license-card:hover {
    border-color: var(--text-muted);
}

.license-card.selected {
    border-width: 4px;
    padding: 15px;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.4), 
                0 4px 20px rgba(102, 126, 234, 0.3);
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.08) 0%, rgba(118, 75, 162, 0.08) 100%);
}

.license-card input[type="radio"] {
    position: absolute;
    opacity: 0;
}

.license-card label {
    cursor: pointer;
    display: block;
    padding: 0;
    margin: 0;
    transition: all 0.3s;
    position: relative;
}

.license-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.license-name {
    font-size: 1.2em;
    font-weight: 500;
}

.license-price-tag {
    font-size: 1.3em;
    font-weight: 600;
}

.license-desc {
    font-size: 0.8em;
    opacity: 0.8;
    line-height: 1.5;
}

.quantity-row {
    margin: 30px 0;
    display: flex;
    align-items: center;
    gap: 16px;
}

.quantity-row label {
    font-size: 1.1em;
    font-weight: 500;
}

.quantity-row input[type="number"] {
    width: 100px;
    padding: 12px;
    font-size: 1.1em;
    border: 1px solid var(--border-default);
    border-radius: 0;
}

.total-price-display {
    color: white;
    padding: 16px;
    margin: 16px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.total-label {
    font-size: 1.2em;
    opacity: 0.9;
}

.total-amount {
    font-size: 1.8em;
    font-weight: 600;
}

.action-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-top: 16px;
}

.action-buttons.vertical {
    grid-template-columns: 1fr;
    gap: 12px;
}

.btn-primary {
    color: white;
    border: none;
    padding: 14px 32px;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    border-radius: 0;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.btn-secondary {
    background: var(--surface-panel);
    border: 2px solid var(--theme-primary, #111);
    padding: 14px 32px;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    border-radius: 0;
}

.btn-secondary:hover {
    color: white;
}

.btn-added {
    background: #6c757d !important;
    color: white !important;
    cursor: default !important;
    opacity: 0.7;
}

.btn-added:hover {
    background: #6c757d !important;
    color: white !important;
    transform: none !important;
}

.back-link {
    display: inline-block;
    margin-bottom: 30px;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.95em;
    transition: color 0.3s;
}

.back-link:hover {
}

.alert {
    padding: 12px 16px;
    border-radius: 4px;
    margin-bottom: 16px;
    display: none;
    align-items: center;
    gap: 8px;
}

.alert.success {
    background: #d4edda;
    color: #155724;
    display: flex;
}

.alert.error {
    background: #f8d7da;
    color: #721c24;
    display: flex;
}

