/* ====================================================== */
/* PRODUCT PAGE LAYOUT & COMPONENTS (UNIFORM SPACING)     */
/* ====================================================== */

/* Standardizăm distanța dintre *toate* secțiunile de pe pagină să fie strict egală */
.product-main-card,
.price-action-box,
.card.border-0.shadow-sm,
#reviews-section,
.home-section,
.my-5, .my-4, .my-3 {
    margin-bottom: 1.25rem !important; /* Spațiu uniformizat între blocuri */
    margin-top: 0 !important;
}

.product-main-card {
    background-color: var(--th-bg-header) !important;
    border-radius: 12px;
    border: 1px solid var(--th-border) !important;
    padding: 1.25rem; /* Redus uniform la 1.25rem pentru a evita spațiile interne mari */
    box-shadow: 0 4px 15px rgba(0,0,0,0.03);
}

.main-img-wrap {
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    background: var(--th-input-bg);
    border: 1px solid var(--th-border);
    height: 380px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.main-img-wrap img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.zoom-hint {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background: rgba(15, 23, 42, 0.7);
    color: var(--th-text-light);
    font-size: 0.75rem;
    padding: 4px 8px;
    border-radius: 6px;
    backdrop-filter: blur(4px);
}

.thumbnails-grid {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 4px;
}

.thumb-item {
    width: 65px;
    height: 65px;
    border-radius: 8px;
    border: 1px solid var(--th-border);
    overflow: hidden;
    background: var(--th-input-bg);
    cursor: pointer;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: border-color 0.2s;
}

.thumb-item:hover {
    border-color: var(--th-primary);
}

.thumb-item img {
    max-width: 100%;
    max-height: 100%;
    object-fit: cover;
}

.product-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--th-text-dark) !important;
    line-height: 1.3;
}

.product-fire-badge {
    background: linear-gradient(135deg, var(--th-primary), #f97316);
    color: var(--th-text-light);
    font-size: 0.75rem;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 20px;
}

/* Modern Lightbox Modal */
.custom-image-modal {
    display: none;
    position: fixed;
    z-index: 99999;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    justify-content: center;
    align-items: center;
    padding: 2rem;
    box-sizing: border-box;
}

.modal-content-wrap {
    max-width: 900px;
    max-height: 85vh;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
}

.custom-image-modal img {
    max-width: 100%;
    max-height: 85vh;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    object-fit: contain;
}

.modal-close-btn {
    position: absolute;
    top: 20px;
    right: 30px;
    background: transparent;
    border: none;
    color: var(--th-text-light);
    font-size: 2.5rem;
    cursor: pointer;
    transition: color 0.2s ease;
    z-index: 100000;
}

.modal-close-btn:hover {
    color: var(--th-danger);
}

/* Toast Notification */
.custom-toast {
    position: fixed;
    bottom: 30px;
    right: 20px;
    background-color: var(--th-primary);
    color: var(--th-text-light);
    padding: 12px 20px;
    border-radius: var(--th-btn-radius, 8px);
    font-size: 0.9rem;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    z-index: 99999;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

/* Breadcrumb / Category Path Links */
.category-breadcrumb-link {
    color: var(--th-primary);
    text-decoration: underline;
    text-underline-offset: 2px;
    transition: opacity 0.2s ease;
}

.category-breadcrumb-link:hover {
    opacity: 0.8;
    text-decoration: underline;
}

@media (max-width: 768px) {
    .qty-input { display: none !important; }
    .qty-select { display: inline-block !important; }
    .main-img-wrap { height: 280px; }
}

/* Forțăm fundalul cardurilor de pe pagina de produs să preia culoarea temei și să aibă border */
.product-section-card,
.product-main-card,
.price-action-box,
.review-main-card {
    background-color: var(--th-bg-header, #fdfbf7) !important;
    border: 1px solid var(--th-border, #e5e0d8) !important;
    border-radius: 12px;
    padding: 1.25rem !important; /* Asigurăm padding interior constant */
}

/* Forțăm steluțele să fie roșii */
.product-rating-block .stars,
.reviews-list .text-warning,
#reviews-section .text-warning {
    color: var(--th-danger, #dc3545) !important;
}

/* Rândurile din tabelul de specificații */
.product-specs-table tr:nth-child(even) {
    background-color: rgba(0, 0, 0, 0.02);
}

.product-specs-table tr {
    border-bottom: 1px solid var(--th-border);
}

.product-specs-table,
.product-specs-table th,
.product-specs-table td {
    background-color: transparent !important;
}