/* ========================================
   MODERN PRODUCT PAGE v2
   Clean, compact, fully responsive
   ======================================== */

/* Page wrapper */
.modern-prod-page {
    padding: 24px 0 0;
    background: #f5f5f5;
}

.modern-prod-page .container {
    max-width: 1200px;
}

/* Breadcrumbs */
.modern-prod-page .modern-breadcrumb {
    padding: 0 0 16px;
    margin-bottom: 0;
}

.modern-prod-page .modern-breadcrumb a {
    color: #6c757d;
    text-decoration: none;
    font-size: 13px;
    transition: color 0.2s ease;
}

.modern-prod-page .modern-breadcrumb a:hover {
    color: #2c2c2c;
}

.modern-prod-page .modern-breadcrumb .breadcrumb-sep {
    color: #ccc;
    margin: 0 6px;
    font-size: 14px;
}

/* ========================================
   MAIN PRODUCT CARD
   ======================================== */
.prod-main-card {
    background: #fff;
    border-radius: 12px;
    padding: 28px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    margin-bottom: 20px;
}

.prod-layout {
    display: flex;
    gap: 36px;
    align-items: flex-start;
}

/* ========================================
   GALLERY - Left side
   ======================================== */
.prod-gallery {
    flex: 0 0 48%;
    max-width: 48%;
}

.prod-main-image {
    position: relative;
    border: 1px solid #eee;
    border-radius: 10px;
    overflow: hidden;
    background: #fafafa;
    margin-bottom: 12px;
    min-height: 150px;
}

/* Force image container visibility - override any FancyBox or legacy CSS */
.modern-prod-page .prod-main-image a,
.modern-prod-page .prod-main-image a[data-fancybox],
.modern-prod-page .prod-main-image a#mainImageLink,
.modern-prod-page .prod-main-image a.fancybox {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    height: auto !important;
    min-height: 50px !important;
    overflow: visible !important;
    line-height: 0;
    text-decoration: none;
    position: relative !important;
    top: auto !important;
    left: auto !important;
    z-index: 1 !important;
    max-width: 100% !important;
    transform: none !important;
}

/* Force image display - override any global rules */
.modern-prod-page .prod-main-image img,
.modern-prod-page .prod-main-image img#mainImage,
.modern-prod-page #mainImage {
    width: 100% !important;
    height: auto !important;
    min-height: 50px !important;
    display: block !important;
    max-width: 100% !important;
    visibility: visible !important;
    opacity: 1 !important;
    cursor: zoom-in;
    position: relative !important;
    top: auto !important;
    left: auto !important;
    z-index: 1 !important;
    object-fit: contain;
}

.prod-img-nav {
    position: absolute;
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(0,0,0,0.6);
    border-radius: 20px;
    padding: 6px 14px;
}

.prod-img-prev,
.prod-img-next {
    width: 30px;
    height: 30px;
    border: none;
    background: rgba(255,255,255,0.15);
    color: #fff;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    transition: background 0.2s;
}

.prod-img-prev:hover,
.prod-img-next:hover {
    background: rgba(255,215,0,0.5);
}

.prod-img-counter {
    color: #fff;
    font-size: 13px;
    font-weight: 500;
    min-width: 30px;
    text-align: center;
}

/* Thumbnails row */
.prod-thumbs-row {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 4px 0;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
}

.prod-thumbs-row::-webkit-scrollbar {
    height: 4px;
}

.prod-thumbs-row::-webkit-scrollbar-track {
    background: #f0f0f0;
    border-radius: 2px;
}

.prod-thumbs-row::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 2px;
}

.prod-thumb-item {
    flex: 0 0 auto;
    width: 72px;
    height: 56px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.2s ease;
    display: block;
}

.prod-thumb-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.prod-thumb-item:hover {
    border-color: #ffd700;
    transform: translateY(-2px);
    box-shadow: 0 3px 8px rgba(0,0,0,0.1);
}

.prod-thumb-item.active {
    border-color: #ffd700;
    box-shadow: 0 0 0 2px rgba(255,215,0,0.3);
}

/* ========================================
   PRODUCT INFO - Right side
   ======================================== */
.prod-info {
    flex: 1;
    min-width: 0;
}

.prod-title {
    font-size: 26px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 8px;
    line-height: 1.3;
}

.prod-sku {
    font-size: 13px;
    color: #999;
    font-weight: 500;
    margin-bottom: 20px;
}

.prod-sku span {
    color: #666;
    font-weight: 600;
}

/* Price box */
.prod-price-box {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #f8f9fa;
    border-radius: 10px;
    padding: 18px 20px;
    margin-bottom: 20px;
    border: 1px solid #e9ecef;
}

.prod-price {
    font-size: 32px;
    font-weight: 800;
    color: #e53935;
    line-height: 1;
}

.prod-price-per {
    font-size: 16px;
    font-weight: 500;
    color: #888;
}

.prod-stock {
    font-size: 13px;
    font-weight: 600;
    padding: 6px 14px;
    border-radius: 20px;
    white-space: nowrap;
}

.prod-stock.in-stock {
    background: #e8f5e9;
    color: #2e7d32;
}

.prod-stock.out-of-stock {
    background: #fce4ec;
    color: #c62828;
}

.prod-stock i {
    margin-right: 4px;
}

/* Add to Cart section */
.prod-add-to-cart {
    display: flex;
    align-items: flex-end;
    gap: 14px;
    margin-bottom: 24px;
}

.prod-qty {
    flex: 0 0 auto;
}

.prod-qty label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
}

.prod-qty-selector {
    display: flex;
    align-items: center;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    overflow: hidden;
    height: 50px;
    background: #fff;
}

.qty-btn {
    width: 42px;
    height: 100%;
    border: none;
    background: #f5f5f5;
    color: #333;
    font-size: 20px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.15s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    user-select: none;
}

.qty-btn:hover {
    background: #ffd700;
    color: #1a1a1a;
}

.qty-btn:active {
    background: #ffed4e;
}

.qty-input {
    width: 50px;
    height: 100%;
    border: none;
    border-left: 1px solid #e0e0e0;
    border-right: 1px solid #e0e0e0;
    text-align: center;
    font-size: 17px;
    font-weight: 700;
    color: #1a1a1a;
    background: transparent;
    outline: none;
    font-family: inherit;
}

.prod-cart-btn {
    flex: 1;
    height: 50px;
    background: linear-gradient(135deg, #e53935 0%, #c62828 100%);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.2s ease;
    box-shadow: 0 4px 14px rgba(229, 57, 53, 0.3);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.prod-cart-btn:hover {
    background: linear-gradient(135deg, #c62828 0%, #b71c1c 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(229, 57, 53, 0.4);
}

.prod-cart-btn:active {
    transform: translateY(0);
}

/* Quick Order (WhatsApp + Phone) */
.prod-quick-order {
    margin-top: 16px;
    padding: 16px;
    background: #f0faf0;
    border-radius: 10px;
    border: 1px solid #c8e6c9;
    text-align: center;
}

.prod-quick-order.prod-quick-oos {
    background: #fff8e1;
    border-color: #ffe082;
}

.prod-quick-label {
    display: block;
    font-size: 12px;
    color: #666;
    margin-bottom: 10px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.prod-quick-buttons {
    display: flex;
    gap: 10px;
}

.prod-whatsapp-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 16px;
    background: #25D366;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 3px 10px rgba(37, 211, 102, 0.3);
}

.prod-whatsapp-btn:hover {
    background: #1DA851;
    transform: translateY(-2px);
    box-shadow: 0 5px 16px rgba(37, 211, 102, 0.4);
    color: #fff;
    text-decoration: none;
}

.prod-whatsapp-btn:active {
    transform: translateY(0);
}

.prod-whatsapp-btn i {
    font-size: 20px;
}

.prod-phone-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 16px;
    background: #fff;
    color: #2c2c2c;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.prod-phone-btn:hover {
    border-color: #4CAF50;
    color: #4CAF50;
    text-decoration: none;
}

.prod-phone-btn i {
    font-size: 16px;
}

/* Mobile Sticky - WhatsApp button */
.sticky-cart-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.sticky-wa-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    background: #25D366;
    color: #fff;
    border-radius: 10px;
    font-size: 22px;
    text-decoration: none;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.sticky-wa-btn:hover,
.sticky-wa-btn:active {
    background: #1DA851;
    color: #fff;
    text-decoration: none;
}

/* Trust signals */
.prod-trust {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    padding: 18px;
    background: #f8f9fa;
    border-radius: 10px;
    border: 1px solid #e9ecef;
}

.trust-row {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #555;
}

.trust-row i {
    color: #ffd700;
    font-size: 14px;
    width: 16px;
    text-align: center;
    flex-shrink: 0;
}

.trust-row a {
    color: #e53935;
    text-decoration: none;
    font-weight: 600;
}

.trust-row a:hover {
    text-decoration: underline;
}

/* ========================================
   TABS CARD
   ======================================== */
.prod-tabs-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    margin-bottom: 20px;
    overflow: hidden;
}

.prod-tabs-nav {
    display: flex;
    border-bottom: 2px solid #e9ecef;
    background: #fafafa;
}

.prod-tab {
    padding: 14px 24px;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    color: #888;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: inherit;
}

.prod-tab:hover {
    color: #333;
    background: #f0f0f0;
}

.prod-tab.active {
    color: #1a1a1a;
    border-bottom-color: #ffd700;
    font-weight: 600;
    background: #fff;
}

.prod-tab i {
    font-size: 13px;
}

.prod-tab-content {
    display: none;
    padding: 24px 28px;
    line-height: 1.7;
    font-size: 15px;
    color: #555;
}

.prod-tab-content.active {
    display: block;
}

.prod-tab-content h4 {
    margin: 0 0 14px;
    color: #1a1a1a;
    font-weight: 600;
}

.prod-tab-content ul {
    padding-left: 20px;
}

.prod-tab-content ul li {
    margin-bottom: 8px;
}

.prod-tab-content img {
    max-width: 100%;
    height: auto;
}

/* ========================================
   RECOMMENDED PRODUCTS - Premium Design
   ======================================== */
.prod-recommended {
    margin-bottom: 40px;
    background: #f8f9fa;
    border-radius: 16px;
    padding: 28px 24px 24px;
    border: 1px solid #eee;
}

.prod-section-title {
    font-size: 20px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 22px;
    padding-bottom: 14px;
    border-bottom: none;
    display: flex;
    align-items: center;
    gap: 10px;
    position: relative;
}

.prod-section-title::after {
    content: '';
    flex: 1;
    height: 2px;
    background: linear-gradient(90deg, #ffd700, transparent);
    border-radius: 1px;
}

.prod-rec-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

/* Override product cards inside recommended section */
.prod-rec-grid .modern-product-card {
    min-height: auto;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    border: 1px solid #eee;
    transition: all 0.3s ease;
}

.prod-rec-grid .modern-product-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.1);
    border-color: #ffd700;
}

.prod-rec-grid .modern-product-image {
    height: 200px;
    background: #fff;
}

.prod-rec-grid .modern-product-image img {
    padding: 12px;
}

.prod-rec-grid .modern-product-info {
    padding: 14px 12px;
}

.prod-rec-grid .modern-product-title {
    font-size: 13px;
    min-height: 36px;
    margin-bottom: 8px;
    line-height: 1.4;
    -webkit-line-clamp: 2;
}

.prod-rec-grid .modern-product-sku {
    display: none;
}

.prod-rec-grid .modern-product-price {
    padding-top: 8px;
}

.prod-rec-grid .modern-price-current {
    font-size: 18px;
}

.prod-rec-grid .modern-price-currency {
    font-size: 14px;
}

.prod-rec-grid .modern-add-to-cart {
    padding: 9px 8px;
    font-size: 12px;
    border-radius: 7px;
    margin-top: 8px;
}

.prod-rec-grid .modern-add-to-cart span {
    display: none;
}

.prod-rec-grid .modern-add-to-cart i {
    font-size: 14px;
}

.prod-rec-grid .modern-add-to-cart::after {
    content: 'Adaugă';
    font-size: 12px;
    font-weight: 600;
}

/* ========================================
   MOBILE STICKY CART
   ======================================== */
.mobile-sticky-cart {
    display: none;
}

@media (max-width: 767px) {
    .mobile-sticky-cart {
        display: flex;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        background: #fff;
        box-shadow: 0 -4px 20px rgba(0,0,0,0.12);
        align-items: center;
        justify-content: space-between;
        padding: 10px 16px;
        z-index: 998;
        transform: translateY(100%);
        transition: transform 0.3s ease;
    }

    .mobile-sticky-cart.visible {
        transform: translateY(0);
    }

    .sticky-cart-price {
        font-size: 20px;
        font-weight: 800;
        color: #e53935;
    }

    .sticky-cart-btn {
        background: linear-gradient(135deg, #e53935, #c62828);
        color: #fff;
        border: none;
        padding: 12px 24px;
        border-radius: 10px;
        font-size: 14px;
        font-weight: 700;
        cursor: pointer;
        display: flex;
        align-items: center;
        gap: 8px;
        box-shadow: 0 3px 10px rgba(229,57,53,0.3);
    }

    .sticky-cart-btn:active {
        transform: scale(0.97);
    }
}

/* ========================================
   RESPONSIVE - Tablet
   ======================================== */
@media (max-width: 991px) {
    .prod-layout {
        gap: 24px;
    }

    .prod-gallery {
        flex: 0 0 45%;
        max-width: 45%;
    }

    .prod-title {
        font-size: 22px;
    }

    .prod-price {
        font-size: 28px;
    }

    .prod-trust {
        grid-template-columns: 1fr;
    }

    .prod-rec-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .prod-recommended {
        padding: 22px 18px 18px;
    }
}

/* ========================================
   RESPONSIVE - Mobile
   ======================================== */
@media (max-width: 767px) {
    .modern-prod-page {
        padding: 12px 0 0;
    }

    .modern-prod-page .container {
        padding-left: 10px;
        padding-right: 10px;
    }

    .modern-prod-page .modern-breadcrumb {
        padding: 0 0 10px;
        font-size: 12px;
    }

    .modern-prod-page .modern-breadcrumb a {
        font-size: 12px;
    }

    .prod-main-card {
        padding: 16px;
        border-radius: 10px;
        margin-bottom: 12px;
    }

    .prod-layout {
        flex-direction: column;
        gap: 16px;
    }

    .prod-gallery {
        flex: 1 1 100%;
        max-width: 100%;
    }

    .prod-main-image {
        border-radius: 8px;
        margin-bottom: 10px;
    }

    .prod-thumbs-row {
        gap: 6px;
    }

    .prod-thumb-item {
        width: 64px;
        height: 50px;
        border-radius: 6px;
    }

    .prod-info {
        width: 100%;
    }

    .prod-title {
        font-size: 20px;
        margin-bottom: 6px;
    }

    .prod-sku {
        margin-bottom: 14px;
    }

    .prod-price-box {
        padding: 14px 16px;
        margin-bottom: 16px;
    }

    .prod-price {
        font-size: 26px;
    }

    .prod-stock {
        font-size: 12px;
        padding: 5px 10px;
    }

    /* Stack cart controls on mobile */
    .prod-add-to-cart {
        flex-direction: column;
        gap: 10px;
        margin-bottom: 16px;
    }

    .prod-qty {
        width: 100%;
    }

    .prod-qty-selector {
        width: 100%;
        height: 48px;
    }

    .qty-input {
        flex: 1;
    }

    .prod-cart-btn {
        width: 100%;
        height: 52px;
        font-size: 15px;
    }

    .prod-trust {
        grid-template-columns: 1fr;
        gap: 8px;
        padding: 14px;
    }

    /* Quick order mobile */
    .prod-quick-order {
        padding: 14px;
        margin-top: 12px;
    }

    .prod-quick-buttons {
        flex-direction: column;
        gap: 8px;
    }

    .prod-whatsapp-btn {
        padding: 14px 16px;
        font-size: 15px;
    }

    .prod-whatsapp-btn i {
        font-size: 22px;
    }

    .prod-phone-btn {
        padding: 12px 16px;
        font-size: 14px;
    }

    /* Tabs mobile */
    .prod-tabs-card {
        border-radius: 10px;
        margin-bottom: 12px;
    }

    .prod-tabs-nav {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .prod-tab {
        padding: 12px 16px;
        font-size: 13px;
        white-space: nowrap;
    }

    .prod-tab-content {
        padding: 16px 14px;
        font-size: 14px;
    }

    /* Recommended */
    .prod-recommended {
        padding: 18px 14px 14px;
        border-radius: 12px;
        margin-bottom: 20px;
    }

    .prod-section-title {
        font-size: 16px;
        margin-bottom: 14px;
        padding-bottom: 10px;
        gap: 8px;
    }

    .prod-rec-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .prod-rec-grid .modern-product-image {
        height: 150px;
    }

    .prod-rec-grid .modern-product-info {
        padding: 10px;
    }

    .prod-rec-grid .modern-product-title {
        font-size: 12px;
        min-height: 32px;
        margin-bottom: 6px;
    }

    .prod-rec-grid .modern-price-current {
        font-size: 15px;
    }

    .prod-rec-grid .modern-add-to-cart {
        padding: 8px 6px;
        font-size: 11px;
    }
}

/* Small mobile */
@media (max-width: 479px) {
    .prod-main-card {
        padding: 12px;
    }

    .prod-title {
        font-size: 18px;
    }

    .prod-price {
        font-size: 24px;
    }

    .prod-price-box {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
        padding: 12px 14px;
    }

    .prod-thumb-item {
        width: 56px;
        height: 44px;
    }

    .prod-rec-grid {
        gap: 8px;
    }

    .prod-recommended {
        padding: 14px 10px 10px;
    }

    .prod-rec-grid .modern-product-image {
        height: 130px;
    }

    .prod-rec-grid .modern-product-image img {
        padding: 8px;
    }
}
