/* ==========================================
   Product Detail Page Styles
   ========================================== */

/* Gallery ảnh chính và ảnh phụ */
.product-slider-container {
    position: relative;
}

.prod-thumbnail.owl-dots {
    display: flex;
    gap: 10px;
    margin-top: 15px;
    flex-wrap: wrap;
}

.prod-thumbnail .owl-dot {
    width: 75px;
    height: 75px;
    border: 2px solid #e7e7e7;
    cursor: pointer;
    border-radius: 8px;
    overflow: hidden;
    padding: 0;
    background: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0.65;
    position: relative;
    box-shadow: 0 2px 4px rgba(0,0,0,0.02);
}

.prod-thumbnail .owl-dot img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.prod-thumbnail .owl-dot:hover {
    opacity: 1;
    transform: translateY(-2px);
    border-color: #ccc;
    box-shadow: 0 4px 8px rgba(0,0,0,0.08);
}

.prod-thumbnail .owl-dot:hover img {
    transform: scale(1.08);
}

.prod-thumbnail .owl-dot.active {
    opacity: 1;
    border-color: #f1641e !important;
    border-width: 2px !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(241, 100, 30, 0.2);
}

.prod-thumbnail .owl-dot.active img {
    transform: scale(1.02);
}

/* Nút điều hướng Owl Carousel ảnh lớn */
.product-slider-container .owl-nav {
    position: static;
}

.product-slider-container .owl-nav button.owl-prev,
.product-slider-container .owl-nav button.owl-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%) scale(0.9);
    width: 44px;
    height: 44px;
    border-radius: 50% !important;
    background: rgba(255, 255, 255, 0.8) !important;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    color: #222529 !important;
    font-size: 16px !important;
    display: flex !important;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    opacity: 0;
    z-index: 10;
    border: 1px solid rgba(255, 255, 255, 0.3) !important;
}

.product-slider-container .owl-nav button.owl-prev {
    left: 15px;
}

.product-slider-container .owl-nav button.owl-next {
    right: 15px;
}

.product-slider-container:hover .owl-nav button.owl-prev,
.product-slider-container:hover .owl-nav button.owl-next {
    opacity: 1;
    transform: translateY(-50%) scale(1);
}

.product-slider-container .owl-nav button.owl-prev:hover,
.product-slider-container .owl-nav button.owl-next:hover {
    background: #f1641e !important;
    color: #fff !important;
    box-shadow: 0 4px 15px rgba(241, 100, 30, 0.4);
}

/* CSS zoom cho image gallery on hover */
.product-single-gallery figure {
    overflow: hidden;
    position: relative;
}
.product-single-image {
    transition: transform 0.15s ease-out;
}
.product-single-gallery .product-item:hover .product-single-image {
    transform: scale(1.05);
}

/* Process Steps Timeline */
.process-step {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #222529;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 10px;
    font-size: 15px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.15);
}

.process-label {
    display: block;
    font-size: 12px;
    color: #666;
    line-height: 1.4;
}

/* Animations máy bay & returns slide */
@keyframes flyAcrossSteps {
  0% {
    left: 8%;
    opacity: 0;
  }
  5% {
    opacity: 1;
  }
  90% {
    left: 88%;
    opacity: 1;
  }
  95% {
    opacity: 0;
  }
  100% {
    left: 8%;
    opacity: 0;
  }
}

.icon-fly-across {
  animation: flyAcrossSteps 8s ease-in-out infinite;
}

@keyframes slideThenHide {
  0% {
    transform: translateX(-150px);
    opacity: 0;
  }
  5% {
    opacity: 1;
  }
  85% {
    transform: translateX(350px);
    opacity: 1;
  }
  90% {
    opacity: 0;
  }
  100% {
    transform: translateX(-150px);
    opacity: 0;
  }
}

.move-icon {
  animation: slideThenHide 12s ease-in-out infinite;
}

/* Related Products Zoom */
.product-default:hover {
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}

.products-slider .product-default:hover {
    box-shadow: none !important;
    transform: none !important;
}

.product-default:hover img {
    transform: scale(1.025);
}

/* CSS cho Lightbox Modal Zoom */
.product-lightbox-modal {
    display: none;
    position: fixed;
    z-index: 99999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background-color: rgba(10, 10, 10, 0.95);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.product-lightbox-modal.show {
    display: flex;
    opacity: 1;
}

.lightbox-content {
    max-width: 85%;
    max-height: 85%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    user-select: none;
}

.lightbox-content img {
    max-width: 100%;
    max-height: 85vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    transform: scale(0.95);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.product-lightbox-modal.show .lightbox-content img {
    transform: scale(1);
}

.lightbox-close {
    position: absolute;
    top: 25px;
    right: 30px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 40px;
    font-weight: 300;
    background: none;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    z-index: 100001;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.lightbox-close:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
    transform: rotate(90deg);
}

.lightbox-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.8);
    font-size: 18px;
    width: 54px;
    height: 54px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100000;
    user-select: none;
}

.lightbox-btn:hover {
    background: #f1641e;
    color: #fff;
    border-color: #f1641e;
    box-shadow: 0 4px 15px rgba(241, 100, 30, 0.4);
}

.lightbox-prev {
    left: 30px;
}

.lightbox-next {
    right: 30px;
}

.lightbox-counter {
    position: absolute;
    bottom: 25px;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
    font-family: 'Poppins', sans-serif;
    background: rgba(255, 255, 255, 0.1);
    padding: 6px 16px;
    border-radius: 20px;
    backdrop-filter: blur(4px);
}

/* ─── Product Variant Selection Dropdowns ─── */
.product-filters-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 20px;
}

.product-single-filter {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.filter-label {
    font-weight: 600;
    font-size: 13.5px;
    color: #333;
    margin: 0;
}

.variant-select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='none' stroke='%23333' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m3 5 3 3 3-3'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    background-size: 12px;
    background-color: #fff;
    padding: 10px 32px 10px 14px !important;
    font-size: 16px !important; /* Ngăn chặn auto-zoom trên thiết bị iOS */
    line-height: 24px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    color: #1f2937;
    width: 100%;
    cursor: pointer;
    box-shadow: 0 1px 2px rgba(0,0,0,0.02);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.variant-select:focus {
    border-color: #f1641e;
    box-shadow: 0 0 0 3px rgba(241, 100, 30, 0.15);
    outline: none;
}

@media (max-width: 576px) {
    .product-filters-container {
        grid-template-columns: 1fr;
        gap: 12px;
    }
}

/* ─── Custom Select Component ─── */
.custom-select-wrapper {
    position: relative;
    user-select: none;
    width: 100%;
}

.custom-select-trigger {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 16px;
    font-size: 15px;
    font-weight: 500;
    color: #1f2937;
    background: #ffffff;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 1px 2px rgba(0,0,0,0.02);
}

.custom-select-trigger:hover {
    border-color: #f1641e;
}

.custom-select-wrapper.open .custom-select-trigger {
    border-color: #f1641e;
    box-shadow: 0 0 0 3px rgba(241, 100, 30, 0.15);
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
}

.custom-select-trigger .arrow {
    width: 12px;
    height: 12px;
    background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='none' stroke='%23333' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m3 5 3 3 3-3'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    transition: transform 0.2s ease;
}

.custom-select-wrapper.open .custom-select-trigger .arrow {
    transform: rotate(180deg);
}

/* Options Container */
.custom-options {
    position: absolute;
    display: block;
    top: 100%;
    left: 0;
    right: 0;
    background: #ffffff;
    border: 1px solid #f1641e;
    border-top: none;
    border-radius: 0 0 6px 6px;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    z-index: 1000;
    max-height: 250px;
    overflow-y: auto;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-5px);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.custom-select-wrapper.open .custom-options {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.custom-option {
    position: relative;
    display: flex;
    align-items: center;
    padding: 10px 16px;
    font-size: 15px;
    color: #4b5563;
    cursor: pointer;
    transition: all 0.15s ease;
}

.custom-option:first-child {
    color: #9ca3af;
}

.custom-option:hover {
    background: #fff8f5;
    color: #f1641e;
    padding-left: 20px;
}

.custom-option.selected {
    background: #f1641e;
    color: #ffffff !important;
    font-weight: 600;
}

