/**
 * JNews Product Box Element Styles
 * Custom affiliate product box styling
 */

/* ================================
   Product Box Container
   ================================ */
.jnews-product-box {
    width: 100%;
    margin: 24px 0;
}

.jnews-product-box .product-box-container {
    background: #ffffff;
    border-radius: 12px;
    padding: 28px;
    box-shadow: 0 2px 16px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    border: 1px solid #f0f0f0;
}

.jnews-product-box .product-box-container:hover {
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.12);
    transform: translateY(-2px);
}

/* ================================
   Product Header
   ================================ */
.jnews-product-box .product-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 2px solid #f5f5f5;
    gap: 20px;
}

.jnews-product-box .product-title {
    font-size: 24px;
    font-weight: 700;
    margin: 0;
    color: #1a1a1a;
    line-height: 1.4;
    flex: 1;
}

/* ================================
   Product Rating
   ================================ */
.jnews-product-box .product-rating {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
}

.jnews-product-box .product-rating .stars {
    display: flex;
    gap: 2px;
    font-size: 18px;
    color: #ffa500;
    line-height: 1;
}

.jnews-product-box .product-rating .stars i {
    color: #ffa500;
}

.jnews-product-box .product-rating .rating-text {
    font-size: 13px;
    color: #666;
    font-weight: 500;
}

/* ================================
   Product Image Section
   ================================ */
.jnews-product-box .product-image-section {
    text-align: center;
    margin: 24px 0;
}

.jnews-product-box .product-main-image {
    margin-bottom: 16px;
}

.jnews-product-box .product-main-image img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    max-height: 400px;
    object-fit: contain;
}

/* Product Gallery */
.jnews-product-box .product-gallery {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

.jnews-product-box .product-gallery .gallery-thumb {
    width: 80px;
    height: 80px;
    border-radius: 8px;
    overflow: hidden;
    border: 2px solid #f0f0f0;
    cursor: pointer;
    transition: all 0.3s ease;
}

.jnews-product-box .product-gallery .gallery-thumb:hover {
    border-color: #007bff;
    transform: scale(1.05);
}

.jnews-product-box .product-gallery .gallery-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ================================
   Product Price
   ================================ */
.jnews-product-box .product-price-section {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 8px;
    margin: 20px 0;
}

.jnews-product-box .product-price-section .price-label {
    font-size: 14px;
    color: #666;
    font-weight: 500;
}

.jnews-product-box .product-price-section .product-price {
    font-size: 20px;
    font-weight: 700;
    color: #28a745;
}

/* ================================
   Product Specifications
   ================================ */
.jnews-product-box .product-specs {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin: 24px 0;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
}

.jnews-product-box .product-specs .spec-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 8px;
}

.jnews-product-box .product-specs .spec-item i {
    color: #007bff;
    font-size: 20px;
    margin-top: 2px;
    min-width: 20px;
}

.jnews-product-box .product-specs .spec-content {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.jnews-product-box .product-specs .spec-label {
    font-size: 12px;
    color: #666;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.jnews-product-box .product-specs .spec-value {
    font-size: 14px;
    color: #333;
    font-weight: 600;
}

/* ================================
   Product Description
   ================================ */
.jnews-product-box .product-description {
    margin: 24px 0;
    line-height: 1.8;
    color: #555;
    font-size: 15px;
}

.jnews-product-box .product-description p {
    margin-bottom: 12px;
}

.jnews-product-box .product-description p:last-child {
    margin-bottom: 0;
}

/* ================================
   Product Buttons
   ================================ */
.jnews-product-box .product-buttons {
    display: flex;
    gap: 12px;
    margin-top: 28px;
}

.jnews-product-box .product-buttons a,
.jnews-product-box .product-buttons button {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 16px 24px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
    outline: none;
    line-height: 1.4;
}

/* Primary Button */
.jnews-product-box .btn-primary {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    color: #ffffff !important;
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.3);
}

.jnews-product-box .btn-primary:hover {
    background: linear-gradient(135deg, #0056b3 0%, #004085 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 123, 255, 0.4);
}

.jnews-product-box .btn-primary:active {
    transform: translateY(0);
}

.jnews-product-box .btn-primary i {
    font-size: 16px;
}

/* Secondary Button */
.jnews-product-box .btn-secondary {
    background: #ffffff;
    color: #007bff;
    border: 2px solid #007bff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.jnews-product-box .btn-secondary:hover {
    background: #007bff;
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.2);
}

.jnews-product-box .btn-secondary:active {
    transform: translateY(0);
}

.jnews-product-box .btn-secondary i {
    font-size: 14px;
}

/* ================================
   Responsive Design
   ================================ */

/* Tablet */
@media (max-width: 992px) {
    .jnews-product-box .product-box-container {
        padding: 24px;
    }
    
    .jnews-product-box .product-title {
        font-size: 22px;
    }
    
    .jnews-product-box .product-specs {
        grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
        gap: 12px;
        padding: 16px;
    }
}

/* Mobile */
@media (max-width: 768px) {
    .jnews-product-box .product-box-container {
        padding: 20px;
    }
    
    .jnews-product-box .product-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    
    .jnews-product-box .product-rating {
        align-items: flex-start;
    }
    
    .jnews-product-box .product-title {
        font-size: 20px;
    }
    
    .jnews-product-box .product-specs {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .jnews-product-box .product-buttons {
        flex-direction: column;
    }
    
    .jnews-product-box .product-buttons a,
    .jnews-product-box .product-buttons button {
        width: 100%;
    }
    
    .jnews-product-box .product-gallery .gallery-thumb {
        width: 70px;
        height: 70px;
    }
}

/* Small Mobile */
@media (max-width: 480px) {
    .jnews-product-box .product-box-container {
        padding: 16px;
    }
    
    .jnews-product-box .product-title {
        font-size: 18px;
    }
    
    .jnews-product-box .product-price-section .product-price {
        font-size: 18px;
    }
    
    .jnews-product-box .product-buttons a,
    .jnews-product-box .product-buttons button {
        padding: 14px 20px;
        font-size: 14px;
    }
}

/* ================================
   Dark Mode Support (Optional)
   ================================ */
@media (prefers-color-scheme: dark) {
    body.dark-mode .jnews-product-box .product-box-container {
        background: #1a1a1a;
        border-color: #333;
    }
    
    body.dark-mode .jnews-product-box .product-title {
        color: #f0f0f0;
    }
    
    body.dark-mode .jnews-product-box .product-header {
        border-bottom-color: #333;
    }
    
    body.dark-mode .jnews-product-box .product-specs {
        background: #222;
    }
    
    body.dark-mode .jnews-product-box .product-description {
        color: #ccc;
    }
    
    body.dark-mode .jnews-product-box .product-price-section {
        background: linear-gradient(135deg, #222 0%, #2a2a2a 100%);
    }
}

/* ================================
   Print Styles
   ================================ */
@media print {
    .jnews-product-box .product-buttons {
        display: none;
    }
    
    .jnews-product-box .product-box-container {
        box-shadow: none;
        border: 1px solid #ccc;
    }
}

