/* ===============================
   Custom COD Checkout Design - Enhanced
   =============================== */

   .custom-cod-checkout {
    max-width: 460px;
    margin: 40px auto;
    padding: 26px;
    border-radius: 22px;
    background: linear-gradient(180deg, #ffffff 0%, #f3fbf6 45%, #e6f2ea 100%);
    border: 1px solid #d7e8dd;
    box-shadow:
        0 20px 50px rgba(0,0,0,0.10),
        0 0 36px rgba(214,232,221,0.5),
        inset 0 1px 0 rgba(255,255,255,0.7);
    animation: fadeUp 0.6s ease-out, pulseGlow 3s ease-in-out infinite;
    position: relative;
    overflow: hidden;
}

/* Animated background shimmer effect */
.custom-cod-checkout::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        45deg,
        transparent 30%,
        rgba(255,255,255,0.4) 50%,
        transparent 70%
    );
    animation: shimmer 3s infinite;
    pointer-events: none;
}

/* Enhanced Animations */
@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(25px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes pulseGlow {
    0%, 100% {
        box-shadow:
            0 18px 45px rgba(0,0,0,0.08),
            0 0 30px rgba(230,242,234,0.3);
    }
    50% {
        box-shadow:
            0 18px 45px rgba(0,0,0,0.08),
            0 0 40px rgba(230,242,234,0.4);
    }
}

@keyframes shimmer {
    0% {
        transform: translateX(-100%) translateY(-100%) rotate(45deg);
    }
    100% {
        transform: translateX(100%) translateY(100%) rotate(45deg);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes bounceIn {
    0% {
        opacity: 0;
        transform: scale(0.3);
    }
    50% {
        opacity: 1;
        transform: scale(1.05);
    }
    70% {
        transform: scale(0.9);
    }
    100% {
        transform: scale(1);
    }
}

/* Product Title - Premium Typography */
.custom-cod-checkout .product-title {
    text-align: center;
    font-size: 26px;
    font-weight: 900;
    line-height: 1.4;
    margin-top: 32px;
    margin-bottom: 24px;
    color: #1a1a1a;
    letter-spacing: -0.5px;
}

/* Trust Subtitle */
.custom-cod-checkout .trust-subtitle {
    text-align: center;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.5;
    color: #4a5d52;
    margin-bottom: 20px;
    letter-spacing: 0.3px;
}

/* Price Box */
.price-box {
    text-align: center;
    margin-bottom: 14px;
}

.price-box del {
    display: block;
    color: #999;
    font-size: 14px;
}

.price-box strong {
    font-size: 18px;
    color: #5a8a6f;
    font-weight: 800;
}

/* Note with animation - Aligned to form */
.cod-note {
    text-align: center;
    font-size: 15px;
    color: #4a5d52;
    margin-bottom: 24px;
    font-weight: 600;
    line-height: 1.5;
    animation: slideInLeft 0.8s ease-out 0.2s both;
    text-shadow: 0 1px 2px rgba(255,255,255,0.9);
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

/* Form */
.custom-cod-form {
    width: 100%;
}

/* Form rows with staggered animation */
.custom-cod-form .form-row {
    margin-bottom: 16px;
    animation: slideInLeft 0.6s ease-out both;
}

.custom-cod-form .form-row:nth-child(1) {
    animation-delay: 0.3s;
}

.custom-cod-form .form-row:nth-child(2) {
    animation-delay: 0.4s;
}

.custom-cod-form .form-row:nth-child(3) {
    animation-delay: 0.5s;
}

/* Labels with color */
.custom-cod-form label {
    display: block;
    margin-bottom: 6px;
    font-size: 14px;
    font-weight: 600;
    color: #3d4d44;
    transition: color 0.3s ease;
}

/* Enhanced Inputs with animations */
.custom-cod-form input {
    width: 100%;
    padding: 14px 16px;
    border-radius: 14px;
    border: 2px solid #ddd;
    font-size: 15px;
    background: #fff;
    transition: all 0.3s ease;
    position: relative;
}

.custom-cod-form input:hover {
    border-color: #a8c5b3;
    box-shadow: 0 0 0 3px rgba(238,247,241,0.5);
}

.custom-cod-form input:focus {
    outline: none;
    border-color: #8fb8a0;
    box-shadow: 
        0 0 0 4px rgba(238,247,241,0.6),
        0 4px 12px rgba(230,242,234,0.3);
    transform: translateY(-2px);
    background: #fff;
}

/* Input placeholder animation */
.custom-cod-form input::placeholder {
    color: #999;
    transition: opacity 0.3s ease;
}

.custom-cod-form input:focus::placeholder {
    opacity: 0.5;
}

/* Enhanced Button with new animations - Centered Text */
.submit-btn {
    width: 100%;
    padding: 16px;
    margin-top: 8px;
    border-radius: 16px;
    border: none;
    font-size: 17px;
    font-weight: 800;
    cursor: pointer;
    color: #fff;
    background: linear-gradient(180deg, #7ba68a 0%, #6a9780 100%);
    box-shadow:
        0 12px 25px rgba(122,166,138,0.25),
        0 0 22px rgba(122,166,138,0.2);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    animation: bounceIn 0.8s ease-out 0.6s both;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
}

.submit-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255,255,255,0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.submit-btn:hover::before {
    width: 300px;
    height: 300px;
}

.submit-btn:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow:
        0 18px 35px rgba(122,166,138,0.3),
        0 0 30px rgba(122,166,138,0.25);
    background: linear-gradient(180deg, #6a9780 0%, #7ba68a 100%);
}

.submit-btn:active {
    transform: scale(0.97) translateY(-1px);
}

/* Loading state animation */
.submit-btn.loading {
    pointer-events: none;
    opacity: 0.8;
}

.submit-btn.loading::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    top: 50%;
    left: 50%;
    margin-left: -10px;
    margin-top: -10px;
    border: 3px solid rgba(255,255,255,0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .custom-cod-checkout {
        max-width: 100%;
        margin: 20px auto;
        padding: 20px;
    }
    
    .custom-cod-checkout .product-title {
        font-size: 22px;
        margin-top: 24px;
        margin-bottom: 20px;
        line-height: 1.35;
    }
    
    .custom-cod-checkout .trust-subtitle {
        font-size: 13px;
        margin-bottom: 18px;
    }
    
    .cod-note {
        font-size: 14px;
        margin-bottom: 20px;
    }
    
    .submit-btn {
        font-size: 16px;
        padding: 14px;
    }
    
    .custom-cod-form input {
        font-size: 14px;
        padding: 12px 14px;
    }
    
    .custom-cod-form label {
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .custom-cod-checkout {
        padding: 16px;
        border-radius: 18px;
    }
    
    .custom-cod-checkout .product-title {
        font-size: 20px;
        margin-top: 20px;
        margin-bottom: 16px;
    }
    
    .custom-cod-checkout .trust-subtitle {
        font-size: 12px;
        margin-bottom: 16px;
    }
}

/* ===============================
   Horizontal Review Slider
   =============================== */

.astra-horizontal-reviews-slider {
    margin: 40px 0;
    padding: 0;
    width: 100%;
}

.reviews-slider-container {
    position: relative;
    width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
    scrollbar-width: thin;
    scrollbar-color: rgba(230,242,234,0.5) transparent;
    padding: 10px 0 20px;
    cursor: grab;
}

.reviews-slider-container.active {
    cursor: grabbing;
}

.reviews-slider-container::-webkit-scrollbar {
    height: 6px;
}

.reviews-slider-container::-webkit-scrollbar-track {
    background: transparent;
}

.reviews-slider-container::-webkit-scrollbar-thumb {
    background: rgba(230,242,234,0.5);
    border-radius: 3px;
}

.reviews-slider-container::-webkit-scrollbar-thumb:hover {
    background: rgba(230,242,234,0.7);
}

.reviews-slider-track {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 20px;
    padding: 0 10px;
    direction: rtl;
    width: max-content;
}

/* RTL Support */
[dir="rtl"] .reviews-slider-track {
    direction: rtl;
}

[dir="ltr"] .reviews-slider-track {
    direction: ltr;
}

.review-card {
    min-width: 280px;
    max-width: 280px;
    background: #ffffff;
    border-radius: 12px;
    padding: 0;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}


.review-card:hover {
    box-shadow: 0 4px 20px rgba(0,0,0,0.12);
    transform: translateY(-2px);
}

.review-card-image {
    width: 100%;
    height: 200px;
    overflow: hidden;
    background: #f5f5f5;
    display: flex;
    align-items: center;
    justify-content: center;
}

.review-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.review-card-content {
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.review-card-text {
    font-size: 14px;
    line-height: 1.6;
    color: #4a4a4a;
    flex: 1;
    min-height: 60px;
}

.review-card-footer {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-top: auto;
    padding-top: 12px;
    border-top: 1px solid #f0f0f0;
}

.review-card-name {
    font-size: 15px;
    font-weight: 700;
    color: #1a1a1a;
    line-height: 1.3;
}

.review-card-location {
    font-size: 13px;
    color: #666;
    font-weight: 500;
}

.review-card-rating {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-top: 4px;
}

.review-card-rating .star-rating {
    font-size: 14px;
    width: auto;
    height: auto;
    margin: 0;
}

.review-card-rating .star-rating::before {
    color: #d3d3d3;
}

.review-card-rating .star-rating span {
    color: #ffb900;
}

/* Review Form Image Upload Styles */
.comment-form-image-upload {
    margin: 20px 0;
}

.comment-form-image-upload label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #1a1a1a;
}

.comment-form-image-upload input[type="file"] {
    width: 100%;
    padding: 8px;
    border: 2px dashed #a8c5b3;
    border-radius: 8px;
    background: #f6fbf8;
    cursor: pointer;
}

.comment-form-location {
    margin: 15px 0;
}

.comment-form-location label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #1a1a1a;
}

.comment-form-location input {
    width: 100%;
    padding: 10px;
    border: 1px solid #a8c5b3;
    border-radius: 8px;
    font-size: 14px;
}

/* Desktop: Full width review slider below product summary */
@media (min-width: 769px) {
    .astra-horizontal-reviews-slider {
        width: 100%;
        max-width: 100%;
        margin: 40px 0;
        padding: 0;
        clear: both;
        display: block;
    }
    
    .reviews-slider-container {
        width: 100%;
        padding: 10px 20px 20px;
        max-width: 100%;
    }
    
    .reviews-slider-track {
        padding: 0 20px;
        gap: 16px;
    }
    
    /* Slightly smaller cards on desktop to show more */
    .review-card {
        min-width: 250px;
        max-width: 250px;
    }
    
    .review-card-image {
        height: 200px;
    }
}

/* Responsive Design for Review Slider */
@media (max-width: 768px) {
    .astra-horizontal-reviews-slider {
        margin: 30px 0;
    }
    
    .review-card {
        min-width: 260px;
        max-width: 260px;
    }
    
    .review-card-image {
        height: 180px;
    }
    
    .review-card-name {
        font-size: 14px;
    }
    
    .review-card-text {
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .astra-horizontal-reviews-slider {
        margin: 24px 0;
    }
    
    .reviews-slider-track {
        gap: 16px;
        padding: 0 8px;
    }
    
    .review-card {
        min-width: 260px;
        max-width: 260px;
        padding: 18px;
        border-radius: 14px;
    }
    
    .review-avatar {
        width: 48px;
        height: 48px;
    }
}


/* ===============================
   Hide Product Meta (Categories, Tags, SKU)
   =============================== */
.woocommerce div.product .product_meta {
    display: none !important;
}

/* Hide Single Product Category - Whole Website */
.single-product-category {
    display: none !important;
    visibility: hidden !important;
}

/* ===============================
   Premium Product Image Styling
   =============================== */

/* Product Image Container */
.woocommerce div.product div.images,
.woocommerce #content div.product div.images,
.woocommerce-page div.product div.images,
.woocommerce-page #content div.product div.images {
    position: relative;
    overflow: visible;
}

/* Main Product Image */
.woocommerce div.product div.images .woocommerce-product-gallery__image img,
.woocommerce div.product div.images img,
.woocommerce #content div.product div.images img,
.woocommerce-page div.product div.images img,
.woocommerce-page #content div.product div.images img {
    border-radius: 20px;
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.08),
        0 0 0 1px rgba(255, 255, 255, 0.1),
        0 0 40px rgba(123, 166, 138, 0.15);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    background: #ffffff;
    padding: 8px;
    position: relative;
    overflow: hidden;
}


/* Product Gallery Thumbnails */
.woocommerce div.product div.images .flex-control-thumbs li img,
.woocommerce div.product div.images .woocommerce-product-gallery__image img {
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    border: 2px solid transparent;
}

/* Active/Selected Thumbnail */
.woocommerce div.product div.images .flex-control-thumbs li.flex-active img,
.woocommerce div.product div.images .woocommerce-product-gallery__image.flex-active img {
    border-color: #6a9780;
    box-shadow: 
        0 4px 16px rgba(123, 166, 138, 0.25),
        0 0 0 3px rgba(123, 166, 138, 0.1);
}

/* Product Image Gallery Container */
.woocommerce-product-gallery {
    position: relative;
}

.woocommerce-product-gallery__wrapper {
    border-radius: 20px;
    overflow: hidden;
}


/* Mobile Optimizations */
@media (max-width: 768px) {
    .woocommerce div.product div.images img {
        border-radius: 16px;
        padding: 6px;
    }
}

@media (max-width: 480px) {
    .woocommerce div.product div.images img {
        border-radius: 14px;
        padding: 4px;
    }
}

/* ===============================
   Premium Variant Selector Styling
   =============================== */
.woocommerce div.product form.variations_form .variations td.value .variable-items-wrapper {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    direction: rtl;
}

.woocommerce div.product form.variations_form .variations td.value .variable-items-wrapper .variable-item {
    background: #fff;
    border: 1px solid #e3e8e2;
    border-radius: 12px;
    padding: 10px 14px;
    min-height: 48px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 2px 6px rgba(0,0,0,0.06);
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease, background-color 0.15s ease;
    width: 100%;
    text-align: right;
    position: relative;
}

.woocommerce div.product form.variations_form .variations td.value .variable-items-wrapper .variable-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 14px rgba(0,0,0,0.10);
    border-color: #cfe5d6;
}

.woocommerce div.product form.variations_form .variations td.value .variable-items-wrapper .variable-item.selected {
    background: #eef7f1;
    border-color: #bcdac8;
    box-shadow: 0 6px 16px rgba(188,218,200,0.45);
}

.woocommerce div.product form.variations_form .variations td.value .variable-item .variable-item-span,
.woocommerce div.product form.variations_form .variations td.value .variable-item span {
    font-weight: 700;
    font-size: 15px;
    color: #1f2a24;
}

.woocommerce div.product form.variations_form .variations td.value .variable-item .price,
.woocommerce div.product form.variations_form .variations td.value .variable-item .amount {
    font-weight: 800;
}

/* Subtle emphasis for the second variant (no badge text) */
/* Keep all non-selected variants white */
.woocommerce div.product form.variations_form .variations td.value .variable-items-wrapper .variable-item:not(.selected) {
    background: #fff;
    border-color: #e3e8e2;
    box-shadow: 0 2px 6px rgba(0,0,0,0.06);
}

/* Remove any plugin "best offer" badge from variants */
.woocommerce div.product form.variations_form .variations td.value .variant-popular {
    display: none !important;
}
