/* ========================================
   Modal Compact Layout - Sâm Lâm Thịnh
   Optimized to reduce whitespace and reposition contact section
   ======================================== */

.modal-content.modal-compact {
    max-width: 850px;
    padding: 20px;
}

.modal-compact .modal-body {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 25px;
    align-items: start;
}

.modal-compact .modal-image {
    display: flex;
    flex-direction: column;
    padding-right: 15px;
    border-right: 1px solid #f0f0f0;
}

.modal-image-wrapper {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.modal-image-wrapper img#modalImg {
    flex: 1;
    min-width: 0;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.modal-gallery {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 65px;
    flex-shrink: 0;
}

.modal-gallery img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: 4px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.2s ease;
}

.modal-gallery img:hover {
    border-color: #2E7D32;
}

.modal-gallery img.active {
    border-color: #1B5E20;
}

/* Contact Section Under Image - Repositioned for optimization */
.modal-contact-section {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #f0f0f0;
    text-align: center;
}

.modal-contact-section .btn-contact-compact {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    background: linear-gradient(135deg, #1B5E20 0%, #2E7D32 100%);
    color: #fff;
    padding: 10px 15px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 13px;
    text-transform: uppercase;
    text-decoration: none;
    margin-bottom: 12px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(27, 94, 32, 0.2);
}

.modal-contact-section .btn-contact-compact:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(27, 94, 32, 0.3);
}

.modal-contact-section .social-contact-row {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-top: 0;
}

.modal-contact-section .social-icon-btn {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 15px;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.modal-contact-section .social-icon-btn:hover {
    transform: translateY(-3px) scale(1.1);
}

/* Product Info Column Optimization */
.modal-compact .modal-info {
    padding-top: 0;
}

.modal-compact .modal-product-title {
    font-size: 22px;
    color: #1B5E20;
    margin-bottom: 5px;
    line-height: 1.2;
}

.modal-compact .product-meta-block {
    margin-bottom: 8px;
}

.modal-compact .meta-item strong {
    color: #555;
    font-weight: 600;
}

/* Compact Detail Blocks - "Scientific" Style */
.product-details-section.compact {
    margin-top: 15px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.product-details-section.compact .detail-block {
    padding: 12px 18px;
    background: #fcfcfc;
    border-radius: 8px;
    border-left: 4px solid #eee;
    margin-bottom: 0;
    transition: all 0.2s ease;
}

.product-details-section.compact .detail-block:hover {
    background: #fff;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

.product-details-section.compact #blkIngredients {
    border-left-color: #2E7D32;
}

.product-details-section.compact #blkUsage {
    border-left-color: #D4A017;
}

.product-details-section.compact #blkStorage {
    border-left-color: #C62828;
}

.product-details-section.compact .detail-block h4 {
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 5px;
    display: flex;
    align-items: center;
    gap: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.product-details-section.compact .detail-block p {
    font-size: 13.5px;
    color: #444;
    line-height: 1.6;
    margin: 0;
}

/* Variant Pills Adjustment */
.variant-pill {
    padding: 6px 14px !important;
    font-size: 13px !important;
    border-radius: 4px !important;
    border: 1px solid #ddd !important;
    background: #fff;
    color: #333;
    font-weight: 500;
    transition: all 0.2s ease;
}

.variant-pill:hover {
    border-color: #2E7D32 !important;
    color: #2E7D32;
}

.variant-pill.active {
    background: #1B5E20 !important;
    color: #fff !important;
    border-color: #1B5E20 !important;
    box-shadow: 0 2px 6px rgba(27, 94, 32, 0.2);
}

/* Scrollbar for long content */
.modal-compact .modal-body {
    max-height: 80vh;
    overflow-y: auto;
    padding-right: 5px;
}

.modal-compact .modal-body::-webkit-scrollbar {
    width: 6px;
}

.modal-compact .modal-body::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.modal-compact .modal-body::-webkit-scrollbar-thumb {
    background: #ddd;
    border-radius: 10px;
}

.modal-compact .modal-body::-webkit-scrollbar-thumb:hover {
    background: #ccc;
}

@media (max-width: 768px) {
    .modal-compact .modal-body {
        grid-template-columns: 1fr;
        max-height: 85vh;
    }

    .modal-compact .modal-image {
        border-right: none;
        padding-right: 0;
        border-bottom: 1px solid #f0f0f0;
        padding-bottom: 15px;
    }
}