.product-page-wrapper {
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    padding: 0 15px;
}

@media (min-width: 1400px) {
    .product-page-wrapper { padding: 0 30px; }
}

@media (min-width: 1920px) {
    .product-page-wrapper { padding: 0 50px; }
}

.product-detail-card {
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 5px 30px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    margin-bottom: 15px;
    border: 1px solid #e9ecef;
}

.product-detail-body { padding: 30px; }

@media (max-width: 768px) {
    .product-detail-body { padding: 20px 15px; }
}

.gallery-main-container {
    position: relative;
    border-radius: 15px;
    overflow: hidden;
    border: 1px solid #e9ecef;
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 400px;
}

.gallery-main-container img {
    width: 100%;
    height: 100%;
    max-height: 380px;
    object-fit: contain;
    cursor: zoom-in;
    transition: transform 0.3s ease;
    position: relative;
    z-index: 2;
}

.gallery-main-container img:hover { transform: scale(1.02); }

.gallery-thumbnails-row {
    margin-top: 15px;
    max-width: 100%;
    width: 100%;
}

.gallery-thumbnails-row .owl-stage-outer { overflow: hidden; max-width: 100%; }
.gallery-thumbnails-row .owl-stage { display: flex; align-items: center; }
.gallery-thumbnails-row .owl-item { display: flex; justify-content: center; align-items: center; max-width: 100%; }
.gallery-thumbnails-row .item { width: 80px; height: 80px; display: flex; justify-content: center; align-items: center; }

.gallery-thumb-item {
    width: 80px;
    height: 80px;
    min-width: 80px;
    max-width: 80px;
    flex: 0 0 80px;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gallery-thumb-item:hover,
.gallery-thumb-item.active {
    border-color: #006FF9;
    box-shadow: 0 0 0 3px rgba(0, 111, 249, 0.2);
}

.gallery-thumb-item img { width: 100%; height: 100%; object-fit: contain; }

.gallery-thumb-item.video-thumb { position: relative; background: #000; }
.gallery-thumb-item.video-thumb::after {
    content: '\F4F4';
    font-family: 'bootstrap-icons';
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    color: #fff; font-size: 1.6rem;
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.6);
    pointer-events: none;
}
.gallery-thumb-item.video-thumb img { opacity: 0.65; }

.product-title-main {
    font-size: clamp(1.5rem, 2.5vw, 2.2rem);
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 10px;
    line-height: 1.3;
}

.product-meta-row {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
    margin-bottom: 10px;
}

.manufacturer-logo-block {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 5px;
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 14px;
    margin-bottom: 10px;
    transition: all 0.3s ease;
    max-width: 100%;
}
.manufacturer-logo-block:hover {
    border-color: #006FF9;
    box-shadow: 0 6px 20px rgba(0, 111, 249, 0.15);
    transform: translateY(-1px);
}
.manufacturer-logo-block a { display: inline-flex; align-items: center; justify-content: center; text-decoration: none; }
.manufacturer-logo-block img { display: block; max-height: 80px; max-width: 220px; width: auto; height: auto; object-fit: contain; }

@media (max-width: 576px) {
    .manufacturer-logo-block { display: none; padding: 10px 16px; margin-bottom: 14px; }
    .manufacturer-logo-block img { max-height: 50px; max-width: 160px; }
}

.sku-copy-block {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #f8f9fa;
    padding: 8px 12px;
    border-radius: 8px;
    border: 1px solid #e9ecef;
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
}
.sku-copy-block:hover { background: #e9ecef; border-color: #006FF9; }
.sku-copy-block .sku-text { font-weight: 600; color: #495057; }
.sku-copy-block .copy-icon { font-size: 1rem; }
.sku-copy-block .copy-tooltip {
    position: absolute;
    top: -30px; left: 50%;
    transform: translateX(-50%);
    background: #333; color: #fff;
    padding: 4px 8px; border-radius: 4px;
    font-size: 0.75rem; opacity: 0;
    pointer-events: none; transition: opacity 0.3s;
    white-space: nowrap;
}
.sku-copy-block .copy-tooltip.show { opacity: 1; }

.manufacturer-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: #f8f9fa;
    padding: 8px 12px;
    border-radius: 8px;
    border: 1px solid #e9ecef;
    color: #495057;
    text-decoration: none;
    transition: all 0.3s;
}
.manufacturer-badge:hover { border-color: #006FF9; box-shadow: 0 2px 8px rgba(0, 111, 249, 0.2); color: #006FF9; }
.manufacturer-badge img { max-height: 24px; max-width: 100px; object-fit: contain; border-radius: 4px; }
.manufacturer-badge .badge-text { font-weight: 600; color: inherit; }

.badge-container { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.badge-item { padding: 6px 14px; border-radius: 20px; font-size: 0.85rem; font-weight: 600; }

.price-section {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 15px;
    padding: 20px;
    margin: 0 0 10px 0;
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}
.price-main { font-size: clamp(2rem, 3vw, 2.5rem); font-weight: 700; color: #006FF9; line-height: 1; }
.price-old { font-size: 1.1rem; color: #6c757d; text-decoration: line-through; }
.price-discount { background: #dc3545; color: #fff; padding: 5px 12px; border-radius: 20px; font-size: 0.9rem; font-weight: 600; }

.stocks-container { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 15px; margin-bottom: 10px; }
.stock-card { background: #f8f9fa; border-radius: 12px; padding: 15px; display: flex; align-items: center; gap: 12px; border: 1px solid #e9ecef; }
.stock-icon { width: 45px; height: 45px; background: linear-gradient(135deg, #006FF9, #4D9AFF); border-radius: 10px; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 1.2rem; flex-shrink: 0; }
.stock-details { flex: 1; display: flex; gap: 5px; align-items: baseline; }
.stock-label { font-size: 0.8rem; color: #6c757d; margin-bottom: 3px; }
.stock-value { font-weight: 600; color: #28a745; }
.stock-truck-icon { color: #006FF9; cursor: pointer; transition: transform 0.2s; }
.stock-truck-icon:hover { transform: scale(1.2); }

.delivery-info-block {
    display: flex;
    align-items: center;
    gap: 14px;
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    border: 1px solid #93c5fd;
    border-radius: 12px;
    padding: 10px 15px;
}
.delivery-info-icon { width: 45px; height: 45px; background: linear-gradient(135deg, #006FF9, #4D9AFF); border-radius: 10px; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 1.3rem; flex-shrink: 0; }
.delivery-info-text { display: flex; align-items: baseline; gap: 10px; }
.delivery-info-label { font-size: 0.8rem; color: #6c757d; text-transform: uppercase; letter-spacing: 0.3px; }
.delivery-info-value { font-size: 1rem; font-weight: 600; color: #1e40af; }
.delivery-info-note { font-size: 0.78rem; color: #64748b; }

.actions-row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.actions-icons-group { display: flex; gap: 8px; flex-shrink: 0; }

.btn-main-cart {
    flex: 1; min-width: 180px; padding: 12px 25px;
    font-size: 1rem; font-weight: 600;
    border-radius: 12px;
    background: linear-gradient(135deg, #006FF9 0%, #0052cc 100%);
    color: #fff; border: none; transition: all 0.3s;
    position: relative; overflow: hidden;
    height: 48px; display: flex; align-items: center; justify-content: center; gap: 8px;
}
.btn-main-cart:hover:not(:disabled) { transform: translateY(-2px); box-shadow: 0 8px 25px rgba(0, 111, 249, 0.3); }
.btn-main-cart:disabled { opacity: 0.7; cursor: not-allowed; }

.btn-buy-now {
    flex: 1; min-width: 180px; padding: 12px 25px;
    font-size: 1rem; font-weight: 600;
    border-radius: 12px;
    background: linear-gradient(135deg, #28a745 0%, #1e7e34 100%);
    color: #fff; border: none; transition: all 0.3s;
    height: 48px; display: flex; align-items: center; justify-content: center; gap: 8px;
}
.btn-buy-now:hover { transform: translateY(-2px); box-shadow: 0 8px 25px rgba(40, 167, 69, 0.3); }

.btn-icon-action {
    width: 48px; height: 48px;
    border-radius: 12px;
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; transition: all 0.3s;
    font-size: 1.2rem; color: #495057; flex-shrink: 0;
}
.btn-icon-action:hover { color: #048f1e !important; border-color: #048f1e; transform: translateY(-2px); }
.btn-icon-action.active { color: #fff; border-color: #048f1e; }

.cart-quantity-wrapper { display: flex; align-items: center; animation: fadeInScale 0.3s ease; flex: 1; min-width: 180px; }
.cart-quantity-wrapper .input-group { display: flex; align-items: center; border-radius: 12px; overflow: hidden; width: 100%; }
#productQuantity { border: none !important; }
.cart-quantity-wrapper .btn-qty-minus,
.cart-quantity-wrapper .btn-qty-plus {
    width: 48px; height: 48px;
    background: #fff; border: none;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; transition: all 0.2s;
    font-size: 1.2rem; background: #006FF9; padding: 0; color: #fff; flex-shrink: 0;
}
.cart-quantity-wrapper .btn-qty-minus:hover,
.cart-quantity-wrapper .btn-qty-plus:hover { background: #055ac3; color: #fff; }

.cart-quantity-wrapper .qty-input {
    width: 60px; height: 48px; text-align: center;
    border: none; border-left: 1px solid #e9ecef; border-right: 1px solid #e9ecef;
    font-weight: 700; font-size: 1.1rem; color: #2c3e50;
    background: #fff; padding: 0; flex-shrink: 0;
}
.cart-quantity-wrapper .qty-input:focus { outline: none; background: #f8f9fa; border: none; }

.in-cart-btn {
    flex: 1; min-width: 180px; padding: 12px 25px;
    font-size: 1rem; font-weight: 600;
    border-radius: 12px; background: #006FF9;
    color: #fff; border: none; transition: all 0.3s;
    height: 48px; display: flex; align-items: center; justify-content: center; gap: 8px; cursor: pointer;
}
.in-cart-btn:hover { background: #0052cc; }

@keyframes fadeInScale {
    from { opacity: 0; transform: scale(0.8); }
    to { opacity: 1; transform: scale(1); }
}

.flying-product {
    position: fixed; z-index: 9999;
    pointer-events: none; border-radius: 50%;
    transition: all 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}
.flying-product img { width: 60px; height: 60px; object-fit: contain; border-radius: 50%; background: white; padding: 5px; }

@keyframes cartBounce {
    0% { transform: scale(1); }
    30% { transform: scale(1.3); }
    50% { transform: scale(0.9); }
    70% { transform: scale(1.1); }
    100% { transform: scale(1); }
}
.cart-icon-animate { animation: cartBounce 0.6s ease; }

.product-card {
    transition: all 0.3s ease;
    border-radius: 16px !important;
    overflow: hidden;
    border: 2px solid #f0f0f0 !important;
    height: 100%; background: #fff; position: relative;
}
.product-card:hover { border-color: #006FF9 !important; box-shadow: 0 10px 30px rgba(0, 111, 249, 0.15) !important; transform: translateY(-4px); }

.product-card .product-image-wrapper {
    height: 200px; overflow: hidden;
    display: flex; align-items: center; justify-content: center;
    position: relative;
    padding: 15px; min-width: 250px;
}
.product-card .product-image-wrapper img { max-height: 170px; max-width: 90%; object-fit: contain; transition: transform 0.4s ease; }


.product-card .card-body { padding: 5px 10px 0px 10px; flex: 1; }
.product-card .product-name {
    font-size: 0.9rem; font-weight: 600; color: #2c3e50;
    line-height: 1.4; height: 60px;
    overflow: hidden; display: -webkit-box;
    -webkit-line-clamp: 3; -webkit-box-orient: vertical; margin-bottom: 8px;
}
.product-card .product-name a { color: #2c3e50; text-decoration: none; transition: color 0.2s; }
.product-card .product-name a:hover { color: #006FF9; }

.product-sku-copy {
    display: inline-flex; align-items: center; gap: 5px;
    font-size: 0.8rem; color: #95a5a6; cursor: pointer; transition: all 0.2s;
    padding: 3px 8px; border-radius: 6px; background: #f8f9fa; border: 1px solid #e9ecef; position: relative;
}
.product-sku-copy:hover { color: #006FF9; background: #e8f0fe; border-color: #006FF9; }
.product-sku-copy .copy-icon-mini { font-size: 0.7rem; opacity: 0.7; }
.product-sku-copy .copy-tooltip-mini {
    position: absolute; top: -25px; left: 50%; transform: translateX(-50%);
    background: #333; color: #fff; padding: 3px 6px; border-radius: 4px;
    font-size: 0.7rem; opacity: 0; pointer-events: none; transition: opacity 0.2s; white-space: nowrap; z-index: 20;
}
.product-sku-copy .copy-tooltip-mini.show { opacity: 1; }

.product-card .product-price { display: flex; gap: 4px; margin-top: 10px; padding: 0; }
.product-card .current-price { font-size: 1.3rem; font-weight: 700; color: #006FF9; }
.product-card .old-price { font-size: 0.85rem; color: #95a5a6; text-decoration: line-through; }

.product-card .card-footer { padding: 0 10px 5px !important; background: transparent !important; border: none !important; margin-top: 5px; }
.product-card .btn-add-cart {
    border-radius: 10px; font-weight: 600; font-size: 0.9rem;
    transition: all 0.3s;
    background: linear-gradient(135deg, #006FF9 0%, #0052cc 100%);
    border: none; color: #fff; width: 100%; height: 37px;
}
.product-card .btn-add-cart:hover:not(:disabled) { box-shadow: 0 5px 15px rgba(0, 111, 249, 0.3); transform: translateY(-2px); }

.product-card .cart-quantity-wrapper { width: 100%; }
.product-card .cart-quantity { width: 100%; }
.product-card .input-group { border-radius: 10px; overflow: hidden; border: 2px solid #006FF9; margin: 0; }
.product-card .btn-qty-minus,
.product-card .btn-qty-plus {
    background: #f8f9fa; border: none; color: #006FF9; font-weight: 700;
    width: 40px !important; height: 33px !important;
    display: flex; align-items: center; justify-content: center; cursor: pointer; transition: all 0.2s;
}
.product-card .btn-qty-minus:hover,
.product-card .btn-qty-plus:hover { background: #006FF9; color: #fff; }
.product-card .qty-input {
    text-align: center; border: none; border-left: 1px solid #e9ecef; border-right: 1px solid #e9ecef;
    font-weight: 700; color: #2c3e50; background: #fff;
    width: 50px !important; height: 33px !important;
}
.product-card .qty-input:focus { outline: none; box-shadow: none; }

.img-placeholder { background-color: #f8f9fa; object-fit: contain; padding: 20px; }
.image-placeholder { display: flex; align-items: center; justify-content: center; background-color: #f8f9fa; color: #6c757d; }
.gallery-main-container .image-placeholder { position: absolute; top: 0; left: 0; width: 100%; height: 100%; z-index: 1; min-height: 400px; max-height: 600px; font-size: 12rem; }
.gallery-thumb-item .image-placeholder { width: 100%; height: 100%; font-size: 2rem; }
.product-image-wrapper .image-placeholder { max-height: 170px; max-width: 90%; font-size: 7rem; }

.gallery-main-container img.img-placeholder { width: 100%; height: 100%; max-height: 400px; object-fit: contain; background-color: #f8f9fa; }
.gallery-thumb-item img.img-placeholder { width: 100%; height: 100%; object-fit: contain; background-color: #f8f9fa; }
.product-image-wrapper img.img-placeholder { max-height: 170px; max-width: 90%; object-fit: contain; background-color: #f8f9fa; }

.product-info-section {
    background: #fff; border-radius: 20px;
    box-shadow: 0 5px 30px rgba(0, 0, 0, 0.08);
    padding: 20px; margin-bottom: 15px;
    border: 1px solid #e9ecef;
}

.section-heading {
    font-size: 1.5rem; font-weight: 700; color: #2c3e50;
    margin-bottom: 20px; padding-bottom: 15px;
    border-bottom: 2px solid #f8f9fa; position: relative;
}
.section-heading::after { content: ''; position: absolute; bottom: -2px; left: 0; width: 60px; height: 2px; background: #006FF9; }

.product-full-description { color: #2c3e50; line-height: 1.6; font-size: 1rem; }
.product-full-description p { margin-bottom: 1rem; }
.product-full-description ul,
.product-full-description ol { margin-bottom: 1rem; padding-left: 1.5rem; }
.product-full-description li { margin-bottom: 0.5rem; }
.product-full-description h1,
.product-full-description h2,
.product-full-description h3,
.product-full-description h4,
.product-full-description h5,
.product-full-description h6 { margin: 1.5rem 0 1rem; font-weight: 600; }
.product-full-description table { width: 100%; margin-bottom: 1rem; border-collapse: collapse; }
.product-full-description table td,
.product-full-description table th { padding: 0.75rem; border: 1px solid #dee2e6; }
.product-full-description img { max-width: 100%; height: auto; border-radius: 8px; margin: 1rem 0; }
.product-full-description a { color: #006FF9; text-decoration: none; }
.product-full-description a:hover { text-decoration: underline; }

.specs-table-wrap { overflow-x: auto; }
.specs-table { width: 100%; border-collapse: collapse; }
.specs-table tr { border-bottom: 1px solid #f8f9fa; transition: background 0.2s; }
.specs-table tr:hover { background: #f8f9fa; }
.specs-table td { padding: 12px 15px; }
.specs-table td:first-child { color: #6c757d; width: 30%; font-weight: 500; }
.specs-table td:last-child { font-weight: 600; color: #2c3e50; }

.video-carousel .item { height: auto; width: 100%; padding: 0 5px; box-sizing: border-box; }
.video-item { background: #f8f9fa; border-radius: 14px; overflow: hidden; border: 1px solid #e9ecef; transition: all 0.3s; height: 100%; width: 100%; display: flex; flex-direction: column; }
.video-item:hover { border-color: #006FF9; box-shadow: 0 8px 24px rgba(0, 111, 249, 0.15); }
.video-item .video-wrapper { position: relative; padding-bottom: 56.25%; height: 0; background: #000; width: 100%; }
.video-item .video-wrapper iframe,
.video-item .video-wrapper video { position: absolute; top: 0; left: 0; width: 100%; height: 100%; border: 0; }
.video-item .video-caption { padding: 12px 16px; font-size: 0.9rem; font-weight: 600; color: #2c3e50; }

.documents-list { display: flex; flex-direction: column; gap: 10px; max-height: 259px; overflow-x: auto; padding: 0 5px; }
.document-item { display: flex; align-items: center; gap: 14px; padding: 10px 15px; background: #f8f9fa; border: 1px solid #e9ecef; border-radius: 12px; transition: all 0.25s; text-decoration: none; color: inherit; }
.document-item:hover { background: #e8f0fe; border-color: #006FF9; transform: translateX(4px); color: inherit; }
.document-icon { width: 44px; height: 44px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 1.3rem; flex-shrink: 0; color: #fff; }
.document-icon.pdf { background: linear-gradient(135deg, #dc3545, #b02a37); }
.document-icon.doc { background: linear-gradient(135deg, #006FF9, #0052cc); }
.document-icon.xls { background: linear-gradient(135deg, #198754, #146c43); }
.document-icon.zip { background: linear-gradient(135deg, #6f42c1, #59359a); }
.document-icon.other { background: linear-gradient(135deg, #6c757d, #495057); }
.document-info { flex: 1; min-width: 0; }
.document-name { font-weight: 600; color: #2c3e50; font-size: 0.95rem; margin-bottom: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.document-meta { font-size: 0.78rem; color: #6c757d; display: flex; gap: 10px; flex-wrap: wrap; }
.document-download-btn { display: inline-flex; align-items: center; gap: 6px; padding: 8px 16px; background: #fff; border: 1.5px solid #006FF9; color: #006FF9; border-radius: 10px; font-size: 0.82rem; font-weight: 600; text-decoration: none; transition: all 0.25s; flex-shrink: 0; cursor: pointer; }
.document-download-btn:hover { background: #006FF9; color: #fff; }
@media (max-width: 576px) {
    .document-item { flex-wrap: wrap; }
    .document-download-btn { width: 100%; justify-content: center; }
}

.carousel-section { position: relative; padding: 0 20px; max-width: 100%; overflow: hidden; }
.carousel-nav { position: absolute; top: 50%; transform: translateY(-50%); z-index: 10; width: 45px; height: 45px; border-radius: 50%; background: #fff; border: 2px solid #e9ecef; display: flex; align-items: center; justify-content: center; cursor: pointer; transition: all 0.3s; box-shadow: 0 2px 10px rgba(0,0,0,0.1); font-size: 1.2rem; color: #495057; }
.carousel-nav:hover { background: #006FF9; border-color: #006FF9; color: #fff; }
.carousel-nav.prev-btn { left: 0; }
.carousel-nav.next-btn { right: 0; }
@media (max-width: 768px) {
    .carousel-nav { display: none; }
    .carousel-section { padding: 0; }
}

.owl-carousel .product-card { margin: 0 10px; height: 100%; }
.owl-carousel .owl-stage { display: flex; align-items: stretch; }
.img-meta { flex-direction: column; align-items: baseline; gap: 5px; }
.owl-carousel .owl-item { display: flex; height: auto; }
.gallery-thumbnails-row .owl-nav button { font-size: 1.2rem; }

@media (min-width: 1920px) {
    .related-products-carousel .owl-item,
    .alternative-products-carousel .owl-item,
    .upsell-products-carousel .owl-item,
    .recently-viewed-carousel .owl-item { width: 280px !important; max-width: 280px !important; }
}

.stock-indicator-container { display: flex; align-items: flex-start; gap: 8px; padding: 2px 3px; border-radius: 10px; background: #f8f9fa; border: 1px solid #e9ecef; transition: all 0.3s; }
.stock-indicator-container:hover { border-color: #dee2e6; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05); }
.stock-indicator-icon { font-size: 1.1rem; flex-shrink: 0; margin-top: 1px; }
.stock-indicator-info { display: flex; flex-direction: column; gap: 0px; flex: 1; min-width: 0; padding: 2px 5px; }
.stock-indicator-label { font-size: 0.85rem; line-height: 1.2; padding: 0px 3px; }
.product-stock.mt-2 { margin-bottom: 1px; }
.stock-indicator-detail { display: flex; align-items: center; gap: 5px; font-size: 0.78rem; color: #6c757d; line-height: 1.3; }
.stock-indicator-detail i { font-size: 0.7rem; opacity: 0.7; }
.stock-indicator-detail strong { font-weight: 600; color: #495057; }
.stock-indicator-container.in-stock-high { background: #f0fdf4; border-color: #86efac; }
.stock-indicator-container.in-stock-medium { background: #eff6ff; border-color: #93c5fd; }
.stock-indicator-container.in-stock-low { background: #fffbeb; border-color: #fcd34d; }
.stock-indicator-container.in-stock-last { background: #fef2f2; border-color: #fca5a5; }
.stock-indicator-container.out-of-stock { background: #fef2f2; border-color: #fca5a5; }

.stock-indicator-container.in-stock-low .stock-indicator-icon,
.stock-indicator-container.in-stock-last .stock-indicator-icon { animation: stockPulse 2s infinite; }
@keyframes stockPulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.7; transform: scale(1.1); }
}
.stock-indicator-container.in-stock-last .stock-indicator-icon { animation: stockPulseDanger 1.5s infinite; }
@keyframes stockPulseDanger {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.6; transform: scale(1.2); }
}

@media (max-width: 576px) {
    .actions-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
    .btn-main-cart { flex: 1 1 100%; order: 1; min-width: 100%; }
    .btn-buy-now { flex: 1 1 calc(100% - 168px); order: 3; }
    .actions-icons-group { order: 4; width: auto; margin-left: auto; }
    .in-cart-btn { flex: 1 1 100%; order: 1; min-width: 100%; }
    .cart-quantity-wrapper { flex: 1 1 100%; order: 2; min-width: 100%; }
    .btn-main-cart.d-none,
    .cart-quantity-wrapper.d-none,
    .in-cart-btn.d-none { display: none !important; }
    .in-cart-btn[style*="display: flex"],
    .in-cart-btn[style*="display:flex"] { display: flex !important; flex: 1 1 100%; order: 1; min-width: 100%; }
    .btn-buy-now[style*="display: none"],
    .btn-buy-now[style*="display:none"] { display: none !important; }
}

#galleryLightbox .modal-dialog { max-width: 95vw; margin: 1.75vh auto; }
#galleryLightbox .modal-content { background: transparent; border: none; }
#galleryLightbox .modal-body { padding: 0; display: flex; align-items: center; justify-content: center; min-height: 80vh; }
#lightboxImage { max-width: 95vw; max-height: 85vh; object-fit: contain; border-radius: 8px; }
#galleryLightbox .btn-close { z-index: 1061; }
#galleryLightbox .gallery-nav-prev,
#galleryLightbox .gallery-nav-next { z-index: 1060; }

.col-xl-5 .gallery-main-container,
.col-xl-5 .carousel-section,
.col-xl-5 .gallery-thumbnails-row { max-width: 100%; }

button.carousel-nav.prev-btn.gallery-prev,
button.carousel-nav.next-btn.gallery-next { width: 30px; height: 30px; font-size: 1.5rem; background: none; border: none; box-shadow: none; }
button.carousel-nav.prev-btn.gallery-prev:hover,
button.carousel-nav.next-btn.gallery-next:hover { color: #495057; }
button.carousel-nav.prev-btn.gallery-prev { left: -10px; }
button.carousel-nav.next-btn.gallery-next { right: -9px; }

.product-tabs-section { padding: 0 !important; overflow: hidden; }
.product-tabs-nav { display: flex; flex-wrap: wrap; gap: 5px; border-bottom: 2px solid #e9ecef; padding: 15px 20px 0 20px; background: #fff; border-radius: 20px 20px 0 0; }
.product-tab { padding: 12px 20px; font-weight: 600; font-size: 0.95rem; color: #6c757d; cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -2px; transition: all 0.25s ease; white-space: nowrap; user-select: none; }
.product-tab:hover { color: #006FF9; background: #f8f9fa; border-radius: 8px 8px 0 0; }
.product-tab.active { color: #006FF9; border-bottom-color: #006FF9; }
.product-tabs-content { padding: 25px 20px 20px 20px; }
.product-tab-pane { display: none; animation: fadeInTab 0.3s ease; }
.product-tab-pane.active { display: block; }
@keyframes fadeInTab {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 576px) {
    .btn-icon-action { width: 45px !important; }
    .product-tabs-nav { padding: 10px 10px 0 10px; gap: 2px; flex-wrap: nowrap; -webkit-overflow-scrolling: touch; }
    .product-tab { padding: 10px 14px; font-size: 0.85rem; }
    .product-tabs-content { padding: 15px 10px; }
}

.btn-icon-action.btn-share:hover { color: #006FF9 !important; border-color: #006FF9; }

.share-menu { position: absolute; z-index: 1050; background: #fff; border: 1px solid #e9ecef; border-radius: 12px; box-shadow: 0 8px 28px rgba(0, 0, 0, 0.15); padding: 6px; min-width: 220px; display: none; animation: fadeInScale 0.15s ease; }
.share-menu.show { display: block; }
.share-menu-item { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 8px; color: #2c3e50; text-decoration: none; cursor: pointer; font-size: 0.9rem; font-weight: 500; transition: background 0.15s; border: none; background: none; width: 100%; text-align: left; font-family: inherit; }
.share-menu-item:hover { background: #f0f6ff; color: #006FF9; }
.share-menu-item i { font-size: 1.1rem; width: 20px; text-align: center; flex-shrink: 0; }
.share-menu-item .share-icon-vk { color: #0077FF; }
.share-menu-item .share-icon-tg { color: #29A9EB; }
.share-menu-item .share-icon-wa { color: #25D366; }
.share-menu-item .share-icon-ok { color: #EE8208; }
.share-menu-item .share-icon-copy { color: #6c757d; }

/* Стили для галереи в слайдерах */
.owl-carousel .product-image-wrapper {
    position: relative;
    height: 200px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}
.owl-carousel .product-image-wrapper .slider-gallery-img {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(1);
    max-height: 170px;
    max-width: 90%;
    object-fit: contain;
    opacity: 0;
    transition: opacity 0.3s ease-in-out, transform 0.4s ease;
    z-index: 1;
    pointer-events: none;
}
.owl-carousel .product-image-wrapper .slider-gallery-img.active {
    opacity: 1;
    z-index: 2;
    pointer-events: auto;
}
.owl-carousel .product-card:hover .product-image-wrapper .slider-gallery-img.active {
    transform: translate(-50%, -50%) scale(1.08);
}
.owl-carousel .product-card .gallery-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 28px;
    height: 28px;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid #eee;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    opacity: 0;
    transition: opacity 0.2s;
    color: #333;
    font-size: 0.8rem;
}
.owl-carousel .product-card:hover .gallery-nav-btn { opacity: 1; }
.owl-carousel .product-card .gallery-nav-btn.prev-btn { left: 5px; }
.owl-carousel .product-card .gallery-nav-btn.next-btn { right: 5px; }
.owl-carousel .product-card .gallery-nav-btn:hover { background: #fff; color: #006FF9; }
.owl-carousel .product-card .gallery-dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.2);
    cursor: pointer;
    transition: background 0.2s, transform 0.2s;
}
.owl-carousel .product-card .gallery-dot.active { background: #006FF9; transform: scale(1.2); }

@media (max-width: 991.98px) {
    .owl-carousel .product-card .gallery-nav-btn,
    .owl-carousel .product-card .gallery-dots { display: none !important; }
    .owl-carousel .product-image-wrapper .slider-gallery-img { display: none; }
    .owl-carousel .product-image-wrapper .slider-gallery-img.active { display: block; }
}
@media (max-width: 576px) {
    .actions-row {
        display: flex;
        flex-wrap: wrap;
        gap: 10px;
        align-items: center;
        width: 100%;
    }

    .btn-main-cart {
        flex: 1 1 100%;
        min-width: 100%;
        order: 1;
    }

    .btn-buy-now {
        flex: 1 1 auto;
        min-width: 0;
        order: 2;
        margin-top: 0;
    }

    .actions-icons-group {
        flex: 0 0 auto;
        order: 3;
        margin-left: 0;
        display: flex;
        gap: 8px;
    }

    .btn-icon-action {
        width: 48px !important;
        height: 48px;
        border-radius: 12px;
        font-size: 1.2rem;
    }

    .cart-quantity-wrapper {
        flex: 1 1 100%;
        order: 1;
        min-width: 100%;
        height: 48px;
        display: flex;
    }

    .in-cart-btn {
        flex: 1 1 100%;
        order: 1;
        min-width: 100%;
        height: 48px;
        margin: 0;
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 12px 25px;
    }

    .in-cart-btn ~ .btn-buy-now,
    .in-cart-btn + .btn-buy-now {
        order: 2;
    }

    .in-cart-btn ~ .actions-icons-group,
    .in-cart-btn + .actions-icons-group {
        order: 3;
    }

    .cart-quantity-wrapper ~ .btn-buy-now,
    .cart-quantity-wrapper + .btn-buy-now {
        order: 2;
    }

    .cart-quantity-wrapper ~ .actions-icons-group,
    .cart-quantity-wrapper + .actions-icons-group {
        order: 3;
    }

    .btn-main-cart.d-none,
    .cart-quantity-wrapper.d-none,
    .in-cart-btn.d-none {
        display: none !important;
    }

    .btn-buy-now[style*="display: none"],
    .btn-buy-now[style*="display:none"] {
        display: none !important;
    }
    button#inCartBtn {
        flex: 1 1 auto;
        min-width: 0;
        order: 2;
    }
}