/* Enhanced Product Detail Page Styles */
.tf-product-detail {
    padding: 60px 0;
}

.product-media-wrap {
    position: sticky;
    top: 100px;
}

.product-media-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 80px;
    margin-right: 20px;
}

.product-media-item {
    width: 80px;
    height: 80px;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.product-media-item.active,
.product-media-item:hover {
    border-color: var(--primary-color);
}

.product-media-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-media-main {
    flex: 1;
    max-width: calc(100% - 100px);
}

.product-media-main img {
    width: 100%;
    height: auto;
    border-radius: 12px;
}

.product-infor {
    padding-left: 40px;
}

.product-price {
    display: flex;
    align-items: center;
    gap: 15px;
    margin: 20px 0;
}

.price-on-sale {
    font-size: 32px;
    font-weight: 700;
    color: var(--primary-color);
}

.compare-at-price {
    font-size: 24px;
    text-decoration: line-through;
    color: #666;
}

.variant-picker {
    margin: 30px 0;
}

.variant-picker-label {
    font-weight: 600;
    margin-bottom: 10px;
    display: block;
}

.variant-picker-values {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.variant-picker-item {
    padding: 8px 16px;
    border: 2px solid #e5e5e5;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: white;
}

.variant-picker-item:hover,
.variant-picker-item.active {
    border-color: var(--primary-color);
    background: var(--primary-color);
    color: white;
}

/* Color Swatches */
.tf-product-info-variant-picker .variant-picker-item.color-swatch {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    padding: 0;
    position: relative;
    border: 3px solid #e5e5e5;
}

.tf-product-info-variant-picker .variant-picker-item.color-swatch.active {
    border-color: var(--primary-color);
    transform: scale(1.1);
}

.tf-product-info-variant-picker .variant-picker-item.color-swatch::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: inherit;
}

.product-form {
    margin: 30px 0;
}

.product-form-buttons {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.quantity-selector {
    display: flex;
    align-items: center;
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
    width: fit-content;
}

.quantity-selector button {
    border: none;
    background: #f8f9fa;
    width: 40px;
    height: 40px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.quantity-selector button:hover {
    background: var(--primary-color);
    color: white;
}

.quantity-selector input {
    border: none;
    text-align: center;
    width: 60px;
    height: 40px;
    outline: none;
}

/* Sticky Add to Cart */
.tf-sticky-atc {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    border-top: 1px solid #e5e5e5;
    padding: 15px 20px;
    z-index: 1000;
    transform: translateY(100%);
    transition: transform 0.3s ease;
    box-shadow: 0 -2px 20px rgba(0,0,0,0.1);
}

.tf-sticky-atc.show {
    transform: translateY(0);
}

.tf-sticky-atc-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1200px;
    margin: 0 auto;
}

.tf-sticky-atc-product {
    display: flex;
    align-items: center;
    gap: 15px;
}

.tf-sticky-atc-product img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 8px;
}

.tf-sticky-atc-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.product-tabs {
    margin-top: 80px;
}

.tab-nav {
    display: flex;
    border-bottom: 1px solid #e5e5e5;
    margin-bottom: 40px;
}

.tab-nav-item {
    padding: 15px 20px;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all 0.3s ease;
}

.tab-nav-item.active {
    border-bottom-color: var(--primary-color);
    color: var(--primary-color);
}

.tab-content {
    display: none;
}

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

.related-products {
    margin-top: 80px;
}

/* Zoom Effect */
.tf-image-zoom {
    cursor: zoom-in;
    transition: transform 0.3s ease;
}

.tf-image-zoom:hover {
    transform: scale(1.05);
}

/* Product Buy Button Responsive Styles */
.tf-product-info-buy-button {
    margin-top: 30px;
}

.tf-product-info-buy-button form {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    align-items: center;
}

.tf-product-info-buy-button .btn-add-to-cart {
    flex: 1;
    min-height: 50px;
    border-radius: 8px;
    transition: all 0.3s ease;
    margin-right: 10px;
}

.tf-product-info-buy-button .btn-icon-action {
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 50px;
    width: 50px;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    background: white;
}

.tf-product-info-buy-button .btn-icon-action:hover {
    background-color: var(--primary-color, #007bff) !important;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
    border-color: var(--primary-color, #007bff);
}

.tf-product-info-buy-button .tf-product-btn-wishlist {
    background: white;
}

/* Mobile Responsive Adjustments */
@media (max-width: 768px) {
    .tf-product-info-buy-button form {
        flex-direction: column;
        gap: 10px;
    }
    
    .tf-product-info-buy-button .btn-add-to-cart {
        width: 100%;
        margin-right: 0;
        margin-bottom: 10px;
    }
    
    .tf-product-info-buy-button .btn-icon-action {
        width: 100%;
        max-width: none;
    }
}

@media (max-width: 576px) {
    .tf-product-info-buy-button .btn-add-to-cart {
        font-size: 14px;
        min-height: 45px;
    }
    
    .tf-product-info-buy-button .btn-icon-action {
        min-height: 45px;
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    .tf-product-info-buy-button .btn-icon-action {
        padding: 8px !important;
        min-height: 40px;
    }
    
    .tf-product-info-buy-button .btn-add-to-cart {
        min-height: 40px;
        font-size: 13px;
    }
}

/* Product Info Badges */
.tf-product-info-badges {
    display: flex;
    gap: 8px;
    margin-bottom: 15px;
}

.badges {
    background: linear-gradient(135deg, var(--primary-color, #007bff), #2c3e50);
    color: white;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.25);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255,255,255,0.2);
    position: relative;
    z-index: 2;
    text-shadow: 0 1px 2px rgba(0,0,0,0.5);
    min-width: 60px;
    text-align: center;
    display: inline-block;
}

.badges.sale {
    background: linear-gradient(135deg, #ff4757, #ff3838);
    color: white;
    animation: pulse 2s infinite;
    box-shadow: 0 4px 20px rgba(255, 71, 87, 0.4);
    border: 2px solid rgba(255,255,255,0.3);
}

.badges:not(.sale) {
    background: linear-gradient(135deg, #2ed573, #1dd1a1);
    box-shadow: 0 4px 20px rgba(46, 213, 115, 0.3);
}

@keyframes pulse {
    0% { 
        transform: scale(1); 
        box-shadow: 0 4px 20px rgba(255, 71, 87, 0.4);
    }
    50% { 
        transform: scale(1.05); 
        box-shadow: 0 6px 25px rgba(255, 71, 87, 0.6);
    }
    100% { 
        transform: scale(1); 
        box-shadow: 0 4px 20px rgba(255, 71, 87, 0.4);
    }
}

.badges-on-sale {
    background: linear-gradient(135deg, #ffa726, #ff9800);
    color: white;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 1px;
    box-shadow: 0 4px 12px rgba(255, 167, 38, 0.4);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255,255,255,0.2);
    animation: glow 2s ease-in-out infinite alternate;
    text-shadow: 0 1px 2px rgba(0,0,0,0.5);
    text-align: center;
    display: inline-block;
    min-width: 80px;
}

@keyframes glow {
    from { 
        box-shadow: 0 4px 12px rgba(255, 167, 38, 0.4);
        transform: translateY(0);
    }
    to { 
        box-shadow: 0 6px 20px rgba(255, 167, 38, 0.7);
        transform: translateY(-2px);
    }
}

/* Product Variant Selection Styles */
.tf-product-variant-selection {
    margin: 20px 0;
}

.tf-compare-color-bottom {
    margin-bottom: 15px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.tf-compare-color-color {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.tf-color-list-color {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 2px solid #dee2e6;
    display: inline-block;
}

.tf-color-list-color.bg-color-beige {
    background-color: #f5f5dc;
}

.tf-color-list-color.bg-color-grey {
    background-color: #6c757d;
}

.selected-variant-text {
    font-weight: 600;
    color: #495057;
}

.tf-select {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid #ced4da;
    border-radius: 6px;
    background-color: white;
    font-size: 14px;
    transition: all 0.3s ease;
}

.tf-select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
}

.tf-select option {
    padding: 8px;
}

/* Enhanced Add to Cart Button */
.btn-add-to-cart {
    position: relative;
    overflow: hidden;
}

.btn-add-to-cart::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s;
}

.btn-add-to-cart:hover::before {
    left: 100%;
}

/* Product Trust Elements */
.tf-product-info-trust-seal {
    margin-top: 30px;
    padding-top: 30px;
    border-top: 1px solid #e5e5e5;
}

.tf-product-trust-mess {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
}

.tf-payment {
    display: flex;
    gap: 10px;
    align-items: center;
}

.tf-payment img {
    height: 30px;
}

/* Product Delivery Info */
.tf-product-info-delivery-return {
    margin-top: 30px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
}

.tf-product-delivery {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 15px;
}

.tf-product-delivery:last-child {
    margin-bottom: 0;
}

.tf-product-delivery .icon {
    color: var(--primary-color);
    font-size: 20px;
}

/* Product Image Gallery Responsive Styles */
.tf-product-media-wrap {
    width: 100%;
    max-width: 100%;
}

.thumbs-slider {
    display: flex;
    gap: 15px;
    width: 100%;
    align-items: flex-start;
}

/* Vertical scrollable thumbnail column */
.tf-product-media-thumbs {
    width: 90px;
    flex-shrink: 0;
    /* Height matches the main image — overridden by JS after main swiper renders */
    height: 600px;
    overflow: hidden;
    position: relative;
}

.tf-product-media-thumbs .swiper-wrapper {
    flex-direction: column;
}

.tf-product-media-thumbs .swiper-slide {
    width: 80px !important;
    height: 80px !important;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    transition: border-color 0.3s ease;
    flex-shrink: 0;
}

.tf-product-media-thumbs .swiper-slide:hover,
.tf-product-media-thumbs .swiper-slide.swiper-slide-thumb-active {
    border-color: var(--primary-color, #007bff);
}

.tf-product-media-thumbs .swiper-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 6px;
}

/* Scrollbar for thumb strip */
.tf-product-media-thumbs .swiper-scrollbar {
    position: absolute;
    right: 2px;
    top: 0;
    width: 4px;
    height: 100%;
    background: rgba(0,0,0,0.08);
    border-radius: 4px;
    z-index: 50;
}

.tf-product-media-thumbs .swiper-scrollbar-drag {
    background: var(--primary-color, #007bff);
    border-radius: 4px;
    opacity: 0.7;
}

.tf-product-media-main {
    flex: 1;
    width: calc(100% - 105px);
    position: relative;
}

.tf-product-media-main .swiper-slide {
    width: 100%;
    height: auto;
    position: relative;
}

.tf-product-media-main .swiper-slide img {
    width: 100%;
    height: auto;
    max-height: 600px;
    object-fit: cover;
    border-radius: 12px;
    display: block;
}

.tf-product-media-main .swiper-button-next,
.tf-product-media-main .swiper-button-prev {
    color: var(--primary-color, #007bff);
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    margin-top: -20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.tf-product-media-main .swiper-button-next:after,
.tf-product-media-main .swiper-button-prev:after {
    font-size: 16px;
    font-weight: bold;
}

/* Image Zoom Effect */
.tf-image-zoom {
    cursor: zoom-in;
    transition: transform 0.3s ease;
    width: 100%;
    height: auto;
}

.tf-image-zoom:hover {
    transform: scale(1.02);
}

@media (max-width: 768px) {
    .product-infor {
        padding-left: 0;
        margin-top: 30px;
    }
    
    .product-media-list {
        flex-direction: row;
        width: 100%;
        margin-right: 0;
        margin-bottom: 15px;
    }
    
    .product-media-main {
        max-width: 100%;
    }
    
    .product-form-buttons {
        flex-direction: column;
    }
    
    .tf-sticky-atc-content {
        flex-direction: column;
        gap: 15px;
        align-items: stretch;
    }
    
    .tf-sticky-atc-actions {
        justify-content: center;
    }
    
    /* Mobile Image Gallery Styles */
    .thumbs-slider {
        flex-direction: column;
        gap: 10px;
    }
    
    .tf-product-media-thumbs {
        width: 100% !important;
        height: 90px !important;
        order: 2;
        margin-top: 15px;
    }
    
    .tf-product-media-thumbs .swiper-wrapper {
        flex-direction: row !important;
    }
    
    .tf-product-media-thumbs .swiper-slide {
        width: 60px !important;
        height: 60px !important;
        flex-shrink: 0;
    }

    .tf-product-media-thumbs .swiper-scrollbar {
        display: none;
    }
    
    .tf-product-media-main {
        width: 100% !important;
        order: 1;
    }
    
    .tf-product-media-main .swiper-slide img {
        max-height: 400px;
        border-radius: 8px;
    }
    
    .tf-product-media-main .swiper-button-next,
    .tf-product-media-main .swiper-button-prev {
        width: 35px;
        height: 35px;
        margin-top: -17px;
    }
    
    .tf-product-media-main .swiper-button-next:after,
    .tf-product-media-main .swiper-button-prev:after {
        font-size: 14px;
    }
}

@media (max-width: 576px) {
    .tf-product-media-thumbs .swiper-slide {
        width: 50px !important;
        height: 50px !important;
    }
    
    .tf-product-media-main .swiper-slide img {
        max-height: 300px;
        border-radius: 6px;
    }
    
    .thumbs-slider {
        gap: 8px;
    }
    
    .tf-product-media-thumbs .swiper-wrapper {
        gap: 6px;
    }
    
    .tf-product-media-main .swiper-button-next,
    .tf-product-media-main .swiper-button-prev {
        width: 30px;
        height: 30px;
        margin-top: -15px;
    }
    
    .tf-product-media-main .swiper-button-next:after,
    .tf-product-media-main .swiper-button-prev:after {
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    .tf-product-media-thumbs .swiper-slide {
        width: 45px !important;
        height: 45px !important;
    }
    
    .tf-product-media-main .swiper-slide img {
        max-height: 280px;
    }
    
    .thumbs-slider {
        gap: 6px;
    }
    
    .tf-product-media-wrap {
        margin-bottom: 20px;
    }
}
