/* Custom Product Hover Effects */

/* ===== CARD ALIGNMENT & SIZING ===== */
.nx-portfolio-grid {
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
}

.nx-portfolio-box {
    display: flex;
    align-items: stretch;
}

.nx-product-box {
    display: flex;
    flex-direction: column;
    height: 100%;
    width: 100%;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.nx-product-box:hover {
    box-shadow: 0 10px 35px rgba(0, 0, 0, 0.15);
    transform: translateY(-5px);
}

.nx-product-box .nx-product-image {
    position: relative;
    overflow: hidden;
    height: auto;
    min-height: 180px;
    max-height: 280px;
    flex-shrink: 0;
}

.nx-product-box .nx-product-image img,
.nx-product-box .nx-product-image video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.nx-product-box .text-center.p-4 {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 60px;
    padding: 8px !important;
}

/* Ensure product titles and prices align consistently */
.nx-product-box .text-center.p-4 a {
    margin-bottom: 6px;
    line-height: 1.2;
    min-height: 1.2em;
    font-size: 16px;
}

.nx-product-box .text-center.p-4 span {
    font-weight: 600;
}

.nx-product-box .nx-product-image img {
    transition: all 0.5s ease;
}

/* Blur Effect on Hover */
.nx-product-box:hover .nx-product-image img {
    filter: blur(4px);
    transform: scale(1.1);
}

/* Custom Hover Overlay - Compact Version */
.product-hover-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    max-height: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.95), rgba(0, 0, 0, 0.85));
    display: flex;
    align-items: flex-end;
    justify-content: center;
    overflow: hidden;
    transition: max-height 0.4s ease, opacity 0.3s ease;
    z-index: 20;
    opacity: 0;
}

.product-hover-overlay.show {
    max-height: 100%;
    opacity: 1;
}

.product-hover-overlay .hover-content {
    width: 100%;
    max-height: 100%;
    overflow-y: auto;
    padding: 15px;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.3) transparent;
}

.product-hover-overlay .hover-content::-webkit-scrollbar {
    width: 4px;
}

.product-hover-overlay .hover-content::-webkit-scrollbar-track {
    background: transparent;
}

.product-hover-overlay .hover-content::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 2px;
}

.nx-product-box:hover .nx-hover-overlay {
    opacity: 1;
}

/* Keep product feeds visually consistent without changing the source assets */
.product-item {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.product-item .product-img {
    aspect-ratio: 4 / 5;
    background: #ffffff;
}

.product-item .product-img>img,
.product-item .product-img>video {
    width: 100%;
    height: 100% !important;
    display: block;
    object-fit: cover !important;
    object-position: center;
}

/* ===== B2B/B2C OVERLAY BUTTONS ===== */
.product-badge {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 10px;
    z-index: 15;
    pointer-events: none;
}

.product-badge .badge-b2b,
.product-badge .badge-b2c {
    padding: 8px 16px;
    font-size: 11px;
    font-weight: 700;
    border-radius: 25px;
    color: white;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    cursor: pointer;
    transition: all 0.3s ease;
    pointer-events: auto;
    opacity: 0.7;
    backdrop-filter: blur(5px);
    border: 2px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.product-badge .badge-b2b {
    background: linear-gradient(135deg, rgba(10, 88, 202, 0.85), rgba(30, 144, 255, 0.85));
}

.product-badge .badge-b2c {
    background: linear-gradient(135deg, rgba(25, 135, 84, 0.85), rgba(46, 204, 113, 0.85));
}

.product-badge .badge-b2b:hover,
.product-badge .badge-b2c:hover {
    opacity: 1;
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.product-badge .badge-b2b.active {
    background: linear-gradient(135deg, #0a58ca, #1e90ff);
    opacity: 1;
    border-color: white;
    box-shadow: 0 4px 15px rgba(10, 88, 202, 0.5);
}

.product-badge .badge-b2c.active {
    background: linear-gradient(135deg, #198754, #2ecc71);
    opacity: 1;
    border-color: white;
    box-shadow: 0 4px 15px rgba(25, 135, 84, 0.5);
}

/* ===== INFO BUTTON ===== */
.info-btn {
    position: absolute;
    top: 55px;
    right: 10px;
    background: rgba(0, 0, 0, 0.75);
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    line-height: 1;
    transition: all 0.3s ease;
    border: 2px solid rgba(255, 255, 255, 0.4);
    z-index: 16;
    backdrop-filter: blur(5px);
}

.info-btn:hover {
    background: #fff;
    color: #333;
    transform: scale(1.15);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* ===== B2B/B2C TABS ===== */
.nx-pricing-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.nx-pricing-tabs button {
    flex: 1;
    padding: 12px 15px;
    cursor: pointer;
    border: 2px solid rgba(255, 255, 255, 0.5);
    background: transparent;
    color: white;
    font-weight: 700;
    border-radius: 30px;
    transition: all 0.3s ease;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.nx-pricing-tabs button:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: white;
    transform: translateY(-2px);
}

.nx-pricing-tabs button.active {
    background: white;
    color: #333;
    border-color: white;
}

.nx-pricing-tabs button.active.b2b-active {
    background: linear-gradient(135deg, #0a58ca, #1e90ff);
    color: white;
    border-color: #0a58ca;
}

.nx-pricing-tabs button.active.b2c-active {
    background: linear-gradient(135deg, #198754, #2ecc71);
    color: white;
    border-color: #198754;
}

/* ===== PRICING DETAILS - COMPACT VERSION ===== */
.pricing-details {
    animation: fadeIn 0.3s ease;
    margin-top: 0;
    width: 100%;
}

.pricing-details p {
    margin: 8px 0;
    font-size: 14px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    font-family: 'Lato', sans-serif !important;
    font-style: normal !important;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.pricing-details p:first-child {
    margin-top: 0;
}

.pricing-details p:last-child {
    margin-bottom: 0;
}

.pricing-details strong {
    color: #FFD700;
    font-weight: 700;
    font-size: 14px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.pricing-details span {
    color: #FFFFFF;
    font-weight: 600;
    font-size: 14px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* Product Type and Storage in Overlay */
.overlay-product-info {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: center;
}

.overlay-product-info .product-type-badge,
.overlay-product-info .product-detail-item {
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    font-size: 11px;
    padding: 4px 10px;
}

/* Select Tab Message */
.nx-tab-hint {
    color: rgba(255, 255, 255, 0.7);
    font-style: italic;
    font-size: 13px;
    margin-top: 15px;
    margin-bottom: 5px;
}

/* ===== UTILITY CLASSES ===== */
.hidden {
    display: none !important;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== PRODUCT MODAL ===== */
.product-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    backdrop-filter: blur(8px);
}

.product-modal.show {
    display: flex;
}

.product-modal-content {
    background: white;
    width: 420px;
    max-width: 95%;
    max-height: 90vh;
    overflow-y: auto;
    border-radius: 20px;
    animation: modalSlide 0.4s ease;
}

@keyframes modalSlide {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(-30px);
    }

    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.modal-header-custom {
    background: linear-gradient(135deg, #2d5016, #4a7c23);
    padding: 25px 30px;
    color: white;
    position: relative;
    border-radius: 20px 20px 0 0;
}

.modal-header-custom h4 {
    margin: 0;
    font-size: 22px;
}

.modal-header-custom p {
    margin: 5px 0 0;
    opacity: 0.9;
    font-size: 14px;
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 28px;
    cursor: pointer;
    color: white;
    opacity: 0.8;
    transition: all 0.3s;
    background: none;
    border: none;
}

.modal-close:hover {
    opacity: 1;
    transform: rotate(90deg);
}

.modal-body-custom {
    padding: 25px 30px;
}

.modal-section {
    margin-bottom: 20px;
}

.modal-section h5 {
    color: #333;
    font-size: 15px;
    margin: 0 0 12px 0;
    padding-bottom: 8px;
    border-bottom: 2px solid #f0f0f0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.modal-section h5::before {
    content: '';
    width: 4px;
    height: 16px;
    background: linear-gradient(135deg, #2d5016, #4a7c23);
    border-radius: 2px;
}

.modal-section ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.modal-section li {
    padding: 8px 0;
    border-bottom: 1px solid #f5f5f5;
    color: #555;
    font-size: 13px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.modal-section li:last-child {
    border-bottom: none;
}

.modal-section li::before {
    content: '✓';
    color: #27ae60;
    font-weight: bold;
}

.info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.info-item {
    background: #f8f9fa;
    padding: 12px 15px;
    border-radius: 10px;
}

.info-item .label {
    font-size: 10px;
    color: #999;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 3px;
}

.info-item .value {
    font-size: 14px;
    color: #333;
    font-weight: 600;
}

/* ===== PRODUCT SPECS ROW (Type, Storage, Shelf Life) ===== */
.nx-product-specs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid rgba(200, 169, 98, 0.15);
}

.nx-spec-item {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    color: #666;
    background: rgba(200, 169, 98, 0.08);
    padding: 4px 10px;
    border-radius: 20px;
    white-space: nowrap;
}

.nx-spec-item i {
    font-size: 10px;
    color: var(--bs-secondary, #C8A962);
}

.nx-spec-item .spec-label {
    font-weight: 600;
    color: #555;
    margin-right: 2px;
}

.nx-spec-item .nx-spec-value {
    color: #777;
}

/* Type Badge (Powder/Tablet/Capsule) */
.nx-type-badge {
    display: inline-block;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 3px 10px;
    border-radius: 15px;
    margin-top: 5px;
}

.product-type-badge.powder {
    background: linear-gradient(135deg, #8B4513, #D2691E);
    color: white;
}

.product-type-badge.tablet {
    background: linear-gradient(135deg, #2d5016, #4a7c23);
    color: white;
}

.product-type-badge.premium {
    background: linear-gradient(135deg, #c8a962, #f3df9b);
    color: #3d2b0a;
}

.product-type-badge.liquid {
    background: linear-gradient(135deg, #1f6f8b, #53a9c2);
    color: white;
}

.product-type-badge.capsule {
    background: linear-gradient(135deg, #1e3a5f, #3a6ea5);
    color: white;
}

.product-type-badge.syrup {
    background: linear-gradient(135deg, #7b1fa2, #ab47bc);
    color: white;
}

.product-type-badge.oil {
    background: linear-gradient(135deg, #D4AF37, #C8A962);
    color: #333;
}

/* ===== PRODUCT DETAILS (Type & Storage Life) ===== */
.product-details {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.product-detail-item {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    color: #666;
    background: rgba(200, 169, 98, 0.1);
    padding: 4px 10px;
    border-radius: 15px;
    white-space: nowrap;
}

.product-detail-item i {
    font-size: 10px;
    color: #C8A962;
}

.product-detail-item .detail-label {
    font-weight: 600;
    color: #555;
}

.product-detail-item .detail-value {
    color: #777;
}

.shop-page .product-item .text-center.p-4 > .text-primary.me-1 {
    display: none !important;
}

.shop-page .product-item .product-details {
    margin-top: 0;
    padding-top: 0;
    border-top: 0;
}

.shop-catalog-note {
    max-width: 960px;
    margin: 0 auto 1.75rem;
    padding: 1.25rem 1.5rem;
    border-radius: 20px;
    background: linear-gradient(135deg, rgba(200, 169, 98, 0.16), rgba(45, 80, 22, 0.08));
    border: 1px solid rgba(200, 169, 98, 0.28);
    box-shadow: 0 18px 40px rgba(45, 80, 22, 0.08);
}

.shop-catalog-note__label {
    display: inline-block;
    margin-bottom: 0.55rem;
    padding: 0.3rem 0.85rem;
    border-radius: 999px;
    background: rgba(45, 80, 22, 0.12);
    color: #2d5016;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.shop-filter-group {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.75rem;
    padding-left: 0;
}

.shop-filter-group li {
    list-style: none;
}

#portfolio-flters li.active,
#portfolio-flters .btn.active,
#portfolio-flters li.active:hover,
#portfolio-flters .btn.active:hover,
#portfolio-flters li.active:focus,
#portfolio-flters .btn.active:focus,
#form-filters li.active,
#form-filters .btn.active,
#form-filters li.active:hover,
#form-filters .btn.active:hover,
#form-filters li.active:focus,
#form-filters .btn.active:focus {
    background: #0a2342 !important;
    border-color: #0a2342 !important;
    color: #ffffff !important;
    box-shadow: 0 10px 24px rgba(10, 35, 66, 0.28) !important;
}

/* Keep the selected shop filter visible even without hover */
#portfolio-flters li.active,
#portfolio-flters .btn.active,
#portfolio-flters li.active:hover,
#portfolio-flters .btn.active:hover,
#portfolio-flters li.active:focus,
#portfolio-flters .btn.active:focus,
#form-filters li.active,
#form-filters .btn.active,
#form-filters li.active:hover,
#form-filters .btn.active:hover,
#form-filters li.active:focus,
#form-filters .btn.active:focus {
    background: #0a2342 !important;
    background-image: none !important;
    border: 2px solid #0a2342 !important;
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
    opacity: 1 !important;
    visibility: visible !important;
    position: relative;
    z-index: 2;
    box-shadow: 0 10px 24px rgba(10, 35, 66, 0.28) !important;
}

#portfolio-flters li.active::before,
#portfolio-flters .btn.active::before,
#portfolio-flters li.active::after,
#portfolio-flters .btn.active::after,
#form-filters li.active::before,
#form-filters .btn.active::before,
#form-filters li.active::after,
#form-filters .btn.active::after {
    opacity: 0 !important;
}

.product-type-badge {
    display: inline-block;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 4px 12px;
    border-radius: 15px;
    color: white;
}

.product-type-badge.powder {
    background: linear-gradient(135deg, #8B4513, #D2691E);
}

.product-type-badge.tablet {
    background: linear-gradient(135deg, #2d5016, #4a7c23);
}

.product-type-badge.premium {
    background: linear-gradient(135deg, #c8a962, #f3df9b);
    color: #3d2b0a;
}

.product-type-badge.liquid {
    background: linear-gradient(135deg, #1f6f8b, #53a9c2);
}

.product-type-badge.capsule {
    background: linear-gradient(135deg, #1e3a5f, #3a6ea5);
}

.product-type-badge.cream {
    background: linear-gradient(135deg, #e91e63, #f06292);
}

.product-type-badge.oil {
    background: linear-gradient(135deg, #D4AF37, #C8A962);
}

.product-type-badge.syrup {
    background: linear-gradient(135deg, #7b1fa2, #ab47bc);
}

/* Responsive adjustments */
@media (max-width: 576px) {
    .nx-product-specs {
        flex-direction: column;
        align-items: center;
    }

    .nx-spec-item {
        width: 100%;
        justify-content: center;
    }

    .product-badge .badge-b2b,
    .product-badge .badge-b2c {
        padding: 6px 12px;
        font-size: 10px;
    }

    .info-btn {
        width: 28px;
        height: 28px;
        font-size: 14px;
        top: 50px;
    }    
    .product-hover-overlay.show {
        max-height: 100%;
    }
    
    .product-hover-overlay .hover-content {
        padding: 10px;
    }
    
    .pricing-details p {
        font-size: 11px;
        padding: 6px 10px;
        margin: 5px 0;
    }
    
    .pricing-details strong,
    .pricing-details span {
        font-size: 11px;
    }
}
