/**
 * Custom Product Page Styles
 * Estilos mejorados para la página de producto
 */

/* Mejoras generales */
.product-detail {
    padding: 30px 0;
    background-color: #f9f9f9;
    border-radius: 10px;
    margin: 20px 0;
}

.product-content {
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.08);
    padding: 30px;
    margin-bottom: 30px;
}

/* Estilo mejorado para la galería */
.product-gallery {
    position: relative;
    overflow: hidden;
}

.main-image {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
    margin-bottom: 20px;
    border: 1px solid #eaeaea;
    position: relative;
}

.main-image img {
    width: 100%;
    height: auto;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.main-image:hover img {
    transform: scale(1.05);
}

.main-image .zoom-icon {
    position: absolute;
    bottom: 15px;
    right: 15px;
    background-color: rgba(255, 255, 255, 0.8);
    color: #2E7D32;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.main-image:hover .zoom-icon {
    opacity: 1;
}

.gallery-thumbnails {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
}

.gallery-thumbnails img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.05);
}

.gallery-thumbnails img.active {
    border-color: #2E7D32;
    transform: translateY(-5px);
}

.gallery-thumbnails img:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.1);
}

/* Estilo mejorado para la información del producto */
.product-info h1 {
    font-size: 28px;
    margin-bottom: 20px;
    color: #333;
    font-weight: 700;
    line-height: 1.3;
    position: relative;
    padding-bottom: 15px;
}

.product-info h1:after {
    content: "";
    position: absolute;
    bottom: 0;
    right: 0;
    width: 60px;
    height: 3px;
    background-color: #2E7D32;
}

.product-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 25px;
    padding: 15px 0;
    border-bottom: 1px solid #eee;
}

.product-category {
    background-color: #e8f5e9;
    padding: 6px 15px;
    border-radius: 30px;
    font-size: 14px;
    color: #2E7D32;
    font-weight: 500;
    transition: all 0.3s ease;
}

.product-category:hover {
    background-color: #c8e6c9;
    transform: translateY(-2px);
}

.product-rating {
    display: flex;
    align-items: center;
    gap: 8px;
}

.product-rating i {
    color: #FFD700;
    font-size: 16px;
}

.product-rating span {
    font-size: 15px;
    color: #666;
    font-weight: 500;
}

/* Mejora para el precio */
.product-price-wrapper {
    margin: 30px 0;
    padding: 20px;
    background-color: #f9f9f9;
    border-radius: 10px;
    display: flex;
    align-items: center;
    gap: 15px;
    position: relative;
}

.product-price-wrapper::before {
    content: "قیمت محصول";
    position: absolute;
    top: -10px;
    right: 20px;
    background-color: #2E7D32;
    color: white;
    padding: 3px 15px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

.original-price {
    text-decoration: line-through;
    color: #999;
    font-size: 18px;
}

.current-price {
    font-size: 28px;
    font-weight: 700;
    color: #2E7D32;
}

/* Descripción del producto */
.product-description {
    line-height: 2;
    color: #555;
    margin: 30px 0;
    padding: 20px;
    background-color: #f9f9f9;
    border-right: 3px solid #2E7D32;
    border-radius: 0 10px 10px 0;
}

/* Características del producto */
.product-features {
    margin: 30px 0;
}

.product-features h3 {
    margin-bottom: 20px;
    font-size: 20px;
    color: #333;
    position: relative;
    padding-right: 15px;
}

.product-features h3:before {
    content: "";
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 5px;
    height: 20px;
    background-color: #2E7D32;
    border-radius: 3px;
}

.product-features ul {
    list-style: none;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 15px;
}

.product-features li {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 15px;
    background-color: #f5f5f5;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.product-features li:hover {
    background-color: #e8f5e9;
    transform: translateX(-5px);
}

.product-features li i {
    color: #2E7D32;
    font-size: 16px;
}

/* Botones de acción */
.product-actions {
    margin: 30px 0;
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

#add-to-cart-form {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
    width: 100%;
}

.quantity {
    display: flex;
    align-items: center;
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.05);
}

.quantity-btn {
    background: none;
    border: none;
    height: 48px;
    width: 48px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #2E7D32;
    font-size: 18px;
    transition: all 0.2s;
}

.quantity-btn:hover {
    background-color: #e8f5e9;
}

.quantity input {
    width: 60px;
    height: 48px;
    text-align: center;
    border: none;
    border-left: 1px solid #ddd;
    border-right: 1px solid #ddd;
    font-size: 18px;
    font-weight: 500;
}

.add-to-cart-btn {
    flex: 1;
    background-color: #2E7D32;
    color: white;
    border: none;
    height: 48px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 0 20px;
    box-shadow: 0 5px 15px rgba(46, 125, 50, 0.2);
}

.add-to-cart-btn:hover {
    background-color: #1B5E20;
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(46, 125, 50, 0.3);
}

.add-to-wishlist-btn {
    background-color: white;
    height: 48px;
    width: 48px;
    border: 1px solid #ddd;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s;
    color: #666;
    font-size: 18px;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.05);
}

.add-to-wishlist-btn:hover {
    color: #ff5252;
    border-color: #ff5252;
    transform: translateY(-3px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.1);
}

.add-to-wishlist-btn i.fas {
    color: #ff5252;
}

/* Información adicional del producto */
.product-meta-info {
    margin-top: 30px;
    border-top: 1px solid #eee;
    padding-top: 20px;
}

.product-meta-info p {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
    color: #666;
    font-size: 14px;
}

.product-meta-info i {
    color: #2E7D32;
    font-size: 16px;
    width: 20px;
}

/* Indicador de stock */
.stock-info {
    font-weight: 500;
    padding: 5px 12px;
    border-radius: 20px;
    display: inline-block;
    margin-right: 10px;
}

.in-stock {
    background-color: #e8f5e9;
    color: #2E7D32;
}

.out-of-stock {
    background-color: #ffebee;
    color: #d32f2f;
}

/* Animación de pulsación para el botón de compra */
@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

.add-to-cart-btn:hover {
    animation: pulse 1.5s infinite;
}

/* Estilo para los reviews */
.user-reviews {
    margin-top: 30px;
    max-height: 500px;
    overflow-y: auto;
    padding-right: 10px;
}

.review {
    border-bottom: 1px solid #eee;
    padding: 20px 0;
    margin-bottom: 15px;
}

.review-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.reviewer-name {
    font-weight: 600;
    font-size: 16px;
    color: #333;
}

.review-date {
    color: #888;
    font-size: 14px;
}

.reviewer-rating {
    margin-top: 10px;
    width: 100%;
}

.review-content p {
    line-height: 1.8;
    color: #555;
}

/* Estilo para productos relacionados */
.related-products {
    margin-top: 60px;
}

.related-products h2 {
    text-align: center;
    margin-bottom: 30px;
    color: #333;
    position: relative;
    padding-bottom: 15px;
}

.related-products h2:after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background-color: #2E7D32;
}

/* Responsive */
@media (max-width: 768px) {
    .product-content {
        flex-direction: column;
        padding: 20px;
    }
    
    .product-gallery, 
    .product-info {
        width: 100%;
    }
    
    .product-meta,
    .product-actions {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .product-price-wrapper {
        margin: 20px 0;
        padding: 15px;
    }
    
    .current-price {
        font-size: 24px;
    }
    
    .product-features ul {
        grid-template-columns: 1fr;
    }
    
    #add-to-cart-form {
        flex-direction: column;
        align-items: stretch;
    }
    
    .quantity {
        margin-bottom: 15px;
    }
}

@media (max-width: 576px) {
    .product-detail {
        padding: 15px 0;
    }
    
    .product-info h1 {
        font-size: 22px;
    }
    
    .gallery-thumbnails img {
        width: 60px;
        height: 60px;
    }
    
    .product-features li {
        padding: 8px 12px;
    }
}

/* Mejora visual para las pestañas */
.tab-header {
    display: flex;
    border-bottom: 1px solid #ddd;
    margin-bottom: 20px;
    overflow-x: auto;
    scrollbar-width: none;
}

.tab-header::-webkit-scrollbar {
    display: none;
}

.tab-item {
    padding: 12px 25px;
    cursor: pointer;
    color: #666;
    font-weight: 500;
    position: relative;
    white-space: nowrap;
    transition: all 0.3s ease;
}

.tab-item:hover {
    color: #2E7D32;
}

.tab-item.active {
    color: #2E7D32;
}

.tab-item.active:after {
    content: "";
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    height: 3px;
    background-color: #2E7D32;
    border-radius: 3px 3px 0 0;
}

/* بهبود طراحی جدول مشخصات فنی */
.specs-table {
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.specs-row {
    display: flex;
    border-bottom: 1px solid #eee;
}

.specs-row:last-child {
    border-bottom: none;
}

.specs-row:nth-child(odd) {
    background-color: #f9f9f9;
}

.specs-row:nth-child(even) {
    background-color: #fff;
}

.specs-label {
    flex: 1;
    padding: 15px;
    font-weight: 600;
    color: #333;
    background-color: #f5f5f5;
}

.specs-value {
    flex: 2;
    padding: 15px;
    color: #666;
    line-height: 1.6;
} 