/* Modern Product Detail Page Styles */

.gl-product-detail-wrapper {
    background: #fff;
    border-radius: 12px;
    padding: 30px;
    margin: 30px 0;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
}

/* Gallery Section */
.gl-product-gallery-section {
    position: relative;
}

.gl-main-image-container {
    position: relative;
    width: 100%;
    height: 600px;
    background: #f8f9fa;
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 15px;
    border: 1px solid #e2e8f0;
}

.gl-main-image-container img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.gl-main-image-container:hover img {
    transform: scale(1.02);
}


.gl-thumbnails-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 8px;
}

.gl-thumbnail-item {
    height: 80px;
    background: #f8f9fa;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gl-thumbnail-item:hover {
    border-color: var(--basecolor, #3b82f6);
}

.gl-thumbnail-item.active {
    border-color: var(--basecolor, #3b82f6);
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.2);
}

.gl-thumbnail-item img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* Product Info Section */
.gl-product-info-wrapper {
    padding-left: 20px;
}

.gl-product-header {
    float:left;
    width:50%;
    height:auto;
    margin-bottom: 20px;
}

.gl-product-title-detail {
    font-size: 28px;
    font-weight: 700;
    color: #2d3748;
    margin-bottom: 10px;
    line-height: 1.3;
}

.gl-product-rating {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #ff8a00;
    font-size: 14px;
}

.gl-favorite-button {
    width: 45px;
    height: 45px;
    border-radius: 8px;
    background: #f7fafc;
    border: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    float: right;
    margin-top: -10px;
}

.gl-favorite-button:hover {
    background: #fff;
    border-color: #ff3366;
    color: #ff3366;
}

.gl-favorite-button.active {
    background: #fff5f5;
    border-color: #ff3366;
    color: #ff3366;
}

/* Countdown Timer Styles */
.gl-product-countdown {
    background: linear-gradient(135deg, #fff5f5 0%, #fff 100%);
    border: 1px solid #fee2e2;
    border-radius: 12px;
    padding: 15px;
    float:right;
    width:50%;
    height:auto;
    margin-bottom: 20px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.08);
}

.gl-product-countdown::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 100px;
    height: 100%;
    background: linear-gradient(270deg, rgba(239, 68, 68, 0.05) 0%, transparent 100%);
    pointer-events: none;
}

.countdown-label {
    font-size: 13px;
    font-weight: 700;
    color: #dc2626;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.countdown-label i {
    font-size: 14px;
    animation: pulse-red 2s infinite;
}

@keyframes pulse-red {
    0% {
        transform: scale(1);
        opacity: 1;
    }

    50% {
        transform: scale(1.1);
        opacity: 0.7;
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.countdown-timer {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}

.countdown-item {
    background: #fff;
    border: 1px solid #fee2e2;
    border-radius: 8px;
    padding: 8px;
    text-align: center;
    transition: all 0.3s ease;
}

.countdown-item:hover {
    transform: translateY(-2px);
    border-color: #f87171;
    box-shadow: 0 4px 10px rgba(239, 68, 68, 0.1);
}

.countdown-item span {
    display: block;
    font-size: 20px;
    font-weight: 800;
    color: #dc2626;
    line-height: 1;
}

.countdown-item label {
    display: block;
    font-size: 10px;
    font-weight: 600;
    color: #991b1b;
    text-transform: uppercase;
    margin-top: 4px;
    margin-bottom: 0;
}

.gl-price-section {
    display: flex;
    align-items: center;
    gap: 15px;
    width:100%;
    height:auto;
    margin: 25px 0;
    flex-wrap: wrap;
    clear: both;
}

.gl-price-current {
    font-size: 32px;
    font-weight: 700;
    color: var(--basecolor, #3b82f6);
}

.gl-price-old {
    font-size: 20px;
    color: #999;
    text-decoration: line-through;
}

.gl-discount-badge {
    padding: 6px 12px;
    border-radius: 6px;
    color: #fff;
    font-size: 14px;
    font-weight: 600;
}

.gl-discount-badge.flash {
    background: #ff6600;
}

.gl-discount-badge.sale {
    background: #fe0000;
}

.gl-bayi-price-box {
    width: 100%;
    margin: 15px 0;
    padding: 15px;
    background: #e8f5e8;
    border-radius: 8px;
    border-left: 4px solid #28a745;
}

.gl-bayi-price-label {
    color: #28a745;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 5px;
    text-transform: uppercase;
}

.gl-bayi-price-value {
    color: #28a745;
    font-weight: bold;
    font-size: 20px;
}

.gl-product-meta-table {
    width:100%;
    height:auto;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    overflow: hidden;
    margin: 20px 0;
}

.gl-meta-row {
    display: flex;
    padding: 12px 15px;
    border-bottom: 1px solid #e2e8f0;
    font-size: 14px;
}

.gl-meta-row:last-child {
    border-bottom: none;
}

.gl-meta-row:nth-child(even) {
    background: #f8f9fa;
}

.gl-meta-label {
    font-weight: 600;
    color: #4a5568;
    min-width: 120px;
}

.gl-meta-value {
    color: #2d3748;
}

.gl-stock-badge {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
}

.gl-stock-badge.low {
    background: #fee;
    color: #dc2626;
}

.gl-stock-badge.available {
    background: #ecfdf5;
    color: #059669;
}

.gl-favorite-count {
    background: #eafdc2;
    color: #86b12a;
    padding: 10px 15px;
    border-radius: 6px;
    font-size: 14px;
    margin: 10px 0;
}

.gl-cart-in-basket {
    background: #ecfbf5;
    color: #3bc188;
    padding: 10px 15px;
    border-radius: 6px;
    font-size: 13px;
    margin: 10px 0;
}

.gl-product-options {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin: 15px 0;
}

.gl-product-option-badge {
    font-size: 13px;
    padding: 5px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
}

.gl-quantity-cart-section {
    display: flex;
    gap: 12px;
    align-items: stretch;
    margin: 25px 0;
}

.gl-quantity-wrapper {
    display: inline-flex;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    overflow: hidden;
    height: 50px;
}

.gl-qty-btn {
    width: 40px;
    height: 100%;
    background: #f7fafc;
    border: none;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #2d3748;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gl-qty-btn:hover {
    background: #e2e8f0;
    color: var(--basecolor, #3b82f6);
}

.gl-qty-input {
    width: 60px;
    height: 100%;
    text-align: center;
    border: none;
    border-left: 1px solid #e2e8f0;
    border-right: 1px solid #e2e8f0;
    font-size: 16px;
    font-weight: 600;
    color: #2d3748;
    outline: none;
}

.gl-add-cart-btn {
    flex: 1;
    min-width: 200px;
    height: 50px;
    border-radius: 8px;
    border: none;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.gl-short-desc {
    width: 100%;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    padding: 15px;
    font-size: 15px;
    margin: 15px 0;
    background: #f8f9fa;
}

/* Variants Section */
.gl-variants-wrapper {
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
}

.gl-variant-group {
    margin-bottom: 20px;
}

.gl-variant-group:last-child {
    margin-bottom: 0;
}

.gl-variant-label {
    font-size: 14px;
    font-weight: 600;
    color: #4a5568;
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.gl-variant-options {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.gl-variant-option {
    position: relative;
}

.gl-variant-option input[type="radio"] {
    position: absolute;
    opacity: 0;
}

.gl-variant-option label {
    display: block;
    padding: 10px 20px;
    border: 2px solid #e2e8f0;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
    min-width: 50px;
    text-align: center;
}

.gl-variant-option input:checked+label {
    border-color: var(--basecolor, #3b82f6);
    background: rgba(59, 130, 246, 0.1);
    color: var(--basecolor, #3b82f6);
}

.gl-variant-option label:hover {
    border-color: var(--basecolor, #3b82f6);
}

/* Color variant */
.gl-variant-option.color label {
    width: 40px;
    height: 40px;
    padding: 0;
    border-radius: 50%;
}

.gl-variant-option.color input:checked+label {
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.3);
}

/* Tabs Section */
.gl-product-tabs {
    margin-top: 40px;
}

.gl-product-tabs .nav-tabs {
    border-bottom: 2px solid #e2e8f0;
}

.gl-product-tabs .nav-link {
    border: none;
    color: #718096;
    font-weight: 600;
    padding: 15px 25px;
    border-bottom: 3px solid transparent;
    transition: all 0.3s ease;
}

.gl-product-tabs .nav-link:hover {
    color: var(--basecolor, #3b82f6);
}

.gl-product-tabs .nav-link.active {
    color: var(--basecolor, #3b82f6);
    border-bottom-color: var(--basecolor, #3b82f6);
    background: transparent;
}

.gl-product-tabs .tab-content {
    padding: 30px 0;
}

/* Responsive */
@media (max-width: 991px) {
    .gl-product-info-wrapper {
        padding-left: 0;
        margin-top: 30px;
    }

    .gl-main-image-container {
        height: 600px;
    }

    .gl-product-title-detail {
        font-size: 24px;
    }

    .gl-price-current {
        font-size: 28px;
    }

    .gl-thumbnails-grid {
        grid-template-columns: repeat(6, 1fr);
    }
}

@media (max-width: 576px) {
    .gl-thumbnails-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    .gl-quantity-cart-section {
        flex-direction: column;
    }

    .gl-quantity-wrapper {
        width: 100%;
        justify-content: center;
    }

    .gl-add-cart-btn {
        width: 100%;
    }
}

/* Coupon Section Styles */
.gl-coupons-section {
    width: 100%;
    margin: 20px 0;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    overflow: hidden;
    background: #fff;
}

.gl-coupons-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    padding: 15px 20px;
    font-size: 16px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

.gl-coupons-header i {
    font-size: 18px;
}

.gl-coupons-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.gl-coupon-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    border: 2px dashed #e2e8f0;
    border-radius: 10px;
    background: #f8f9fa;
    transition: all 0.3s ease;
}

.gl-coupon-item:hover {
    border-color: #667eea;
    background: #f0f4ff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.15);
}

.gl-coupon-left {
    display: flex;
    align-items: center;
    gap: 15px;
    flex: 1;
}

.gl-coupon-icon {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 24px;
    flex-shrink: 0;
}

.gl-coupon-info {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.gl-coupon-title {
    font-size: 16px;
    font-weight: 700;
    color: #2d3748;
}

.gl-coupon-code {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.gl-code-label {
    font-size: 13px;
    color: #718096;
}

.gl-code-value {
    font-size: 14px;
    font-weight: 700;
    color: #667eea;
    background: #fff;
    padding: 4px 12px;
    border-radius: 6px;
    border: 1px solid #e2e8f0;
    font-family: 'Courier New', monospace;
    letter-spacing: 1px;
}

.gl-copy-btn {
    background: transparent;
    border: none;
    color: #667eea;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    transition: all 0.2s ease;
    font-size: 14px;
}

.gl-copy-btn:hover {
    background: #667eea;
    color: #fff;
}

.gl-coupon-validity {
    font-size: 12px;
    color: #718096;
    display: flex;
    align-items: center;
    gap: 5px;
}

.gl-coupon-validity i {
    font-size: 13px;
}

.gl-coupon-right {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.gl-coupon-discount {
    text-align: center;
    padding: 10px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 8px;
    color: #fff;
    min-width: 100px;
}

.gl-discount-value {
    display: block;
    font-size: 24px;
    font-weight: 800;
    line-height: 1;
    margin-bottom: 4px;
}

.gl-discount-label {
    display: block;
    font-size: 12px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Responsive Coupon Styles */
@media (max-width: 768px) {
    .gl-coupon-item {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }

    .gl-coupon-left {
        flex-direction: column;
        width: 100%;
    }

    .gl-coupon-right {
        width: 100%;
    }

    .gl-coupon-discount {
        width: 100%;
    }
}

/* Variant Box Styles */
.pr_switch_wrap.box {
    margin: 0 0 20px 0;
}

.pr_switch_wrap.box .switch_lable {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 12px;
    text-transform: capitalize;
}

.pr_switch_wrap.box .product_color_switch {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.pr_switch_wrap.box .product_color_switch label {
    position: relative;
    width: 40px;
    height: 40px;
    margin: 0;
    cursor: pointer;
    border: 2px solid #e2e8f0;
    border-radius: 6px;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    overflow: hidden;
}

.pr_switch_wrap.box .product_color_switch label:hover {
    border-color: #667eea;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.2);
}

.pr_switch_wrap.box .product_color_switch label input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.pr_switch_wrap.box .product_color_switch label span {
    font-size: 12px;
    font-weight: 700;
    color: #4a5568;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-align: center;
    line-height: 1;
    transition: all 0.3s ease;
}

.pr_switch_wrap.box .product_color_switch label input[type="radio"]:checked+span {
    color: #fff;
}

.pr_switch_wrap.box .product_color_switch label input[type="radio"]:checked~span {
    color: #fff;
}

.pr_switch_wrap.box .product_color_switch label:has(input[type="radio"]:checked) {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-color: #667eea;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.pr_switch_wrap.box .product_color_switch label:has(input[type="radio"]:checked) span {
    color: #fff;
}

/* Alternative for browsers that don't support :has() */
.pr_switch_wrap.box .product_color_switch label.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-color: #667eea;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.pr_switch_wrap.box .product_color_switch label.active span {
    color: #fff;
}

/* Responsive */
@media (max-width: 576px) {
    .pr_switch_wrap.box .product_color_switch {
        gap: 8px;
    }

    .pr_switch_wrap.box .product_color_switch label {
        width: 38px;
        height: 38px;
    }

    .pr_switch_wrap.box .product_color_switch label span {
        font-size: 11px;
    }
}

/* Variant Color Styles */
.pr_switch_wrap.color {
    margin: 0 0 20px 0;
}

.pr_switch_wrap.color .switch_lable {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 12px;
    text-transform: capitalize;
}

.pr_switch_wrap.color .product_color_switch {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.pr_switch_wrap.color .product_color_switch label {
    position: relative;
    cursor: pointer;
    margin: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.pr_switch_wrap.color .product_color_switch label input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

/* Color box container */
.pr_switch_wrap.color .product_color_switch label::before {
    content: '';
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background-color: var(--variant-color, #e2e8f0);
    border: 3px solid #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    display: block;
}

/* Hover effect */
.pr_switch_wrap.color .product_color_switch label:hover::before {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Selected state - outer ring */
.pr_switch_wrap.color .product_color_switch label:has(input[type="radio"]:checked)::before {
    border-color: #667eea;
    border-width: 4px;
    box-shadow: 0 4px 16px rgba(102, 126, 234, 0.4);
    transform: scale(1.05);
}

/* Alternative for browsers that don't support :has() */
.pr_switch_wrap.color .product_color_switch label.active::before {
    border-color: #667eea;
    border-width: 4px;
    box-shadow: 0 4px 16px rgba(102, 126, 234, 0.4);
    transform: scale(1.05);
}

/* Color name text */
.pr_switch_wrap.color .product_color_switch label span {
    font-size: 12px;
    font-weight: 600;
    color: #4a5568;
    text-align: center;
    transition: all 0.3s ease;
    max-width: 60px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Selected state - text */
.pr_switch_wrap.color .product_color_switch label:has(input[type="radio"]:checked) span {
    color: #667eea;
    font-weight: 700;
}

.pr_switch_wrap.color .product_color_switch label.active span {
    color: #667eea;
    font-weight: 700;
}

/* Checkmark icon for selected color */
.pr_switch_wrap.color .product_color_switch label:has(input[type="radio"]:checked)::after {
    content: '✓';
    position: absolute;
    top: 2px;
    right: 2px;
    width: 20px;
    height: 20px;
    background: #667eea;
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
    box-shadow: 0 2px 6px rgba(102, 126, 234, 0.3);
}

.pr_switch_wrap.color .product_color_switch label.active::after {
    content: '✓';
    position: absolute;
    top: 2px;
    right: 2px;
    width: 20px;
    height: 20px;
    background: #667eea;
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
    box-shadow: 0 2px 6px rgba(102, 126, 234, 0.3);
}

/* Responsive */
@media (max-width: 576px) {
    .pr_switch_wrap.color .product_color_switch {
        gap: 10px;
    }

    .pr_switch_wrap.color .product_color_switch label::before {
        width: 42px;
        height: 42px;
    }

    .pr_switch_wrap.color .product_color_switch label span {
        font-size: 11px;
        max-width: 50px;
    }
}

/* Magnific Popup Custom Styles */
.mfp-with-zoom .mfp-container,
.mfp-with-zoom.mfp-bg {
    opacity: 0;
    transition: all 0.3s ease-out;
}

.mfp-with-zoom.mfp-ready .mfp-container {
    opacity: 1;
}

.mfp-with-zoom.mfp-ready.mfp-bg {
    opacity: 0.8;
}

.mfp-with-zoom.mfp-removing .mfp-container,
.mfp-with-zoom.mfp-removing.mfp-bg {
    opacity: 0;
}

.mfp-img-mobile .mfp-image-holder {
    padding-left: 0;
    padding-right: 0;
}

.mfp-img-mobile img.mfp-img {
    padding: 0;
}

/* Magnific Popup Background */
.mfp-bg {
    background: #0b0b0b;
}

/* Magnific Popup Image Container */
.mfp-figure {
    cursor: zoom-out;
}

.mfp-figure:after {
    background: #0b0b0b;
}

/* Magnific Popup Close Button */
.mfp-close {
    color: #fff;
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

.mfp-close:hover {
    opacity: 1;
}