/* Modern Single Product Page Styles */
:root {
    --primary: #1a1a1a;
    --accent: #ff3b3b;
    --text-muted: #666;
    --bg-light: #ffffff; /* Changed from #f8f9fa to white */
    --border: #e0e0e0;
}

.single-product-container {
    background-color: #ffffff; /* Explicitly white */
    overflow-x: hidden; /* Prevent horizontal scroll on the whole page */
    width: 100%;
}

/* মূল কন্টেইনার - Specificity increased to override style.css */
.single-product-container .product.product-container {
    max-width: 100%; /* Changed from 1200px to ensure it fits mobile */
    width: 1200px;
    margin: 0 auto;
    display: flex !important;
    flex-direction: column;
    gap: 20px;
    background: transparent;
    box-shadow: none;
    opacity: 1 !important;
    visibility: visible !important;
    min-height: 500px;
    overflow: hidden; /* Ensure children don't overflow */
}

@media (max-width: 1200px) {
    .single-product-container .product.product-container {
        width: 100%;
        padding-left: 15px;
        padding-right: 15px;
    }
}

/* ডেস্কটপ ভিউর জন্য লেআউট */
@media (min-width: 768px) {
    .single-product-container .product.product-container {
        flex-direction: row;
        align-items: flex-start;
        padding: 40px 0;
        gap: 40px;
    }
    .product-gallery-section, .product-details-section {
        flex: 1;
        width: 50%;
    }
    .product-details-section {
        position: sticky;
        top: 100px; /* Adjusted for header */
    }
}

/* মোবাইল ভিউর জন্য অতিরিক্ত ফিক্স */
@media (max-width: 767px) {
    .single-product-container .product.product-container {
        display: flex !important;
        opacity: 1 !important;
        visibility: visible !important;
    }
}

/* ইমেজ গ্যালারী সেকশন */
.product-gallery-section {
    position: relative;
    background: #fff;
    border-radius: 24px;
    overflow: hidden;
    width: 100%;
    max-width: 100%;
}

.swiper {
    width: 100% !important;
    height: auto;
    border-radius: 24px;
    max-width: 100%;
}

.swiper-wrapper {
    display: flex;
    width: 100%;
}

.swiper-slide {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f1f1f1;
    aspect-ratio: 1 / 1;
    width: 100% !important;
    max-width: 100%;
}

.swiper-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.sale-badge {
    position: absolute;
    top: 20px;
    left: 20px;
    background: var(--accent);
    color: #fff;
    padding: 8px 16px;
    border-radius: 50px;
    font-weight: 700;
    font-size: clamp(12px, 2vw, 14px);
    text-transform: uppercase;
    z-index: 10;
}

/* প্রোডাক্ট ডিটেইলস সেকশন */
.product-details-section {
    display: flex;
    flex-direction: column;
    gap: 20px;
    background: #fff;
    padding: 20px; /* Reduced from 30px for better mobile fit */
    border-radius: 24px;
    width: 100%;
    max-width: 100%;
}

@media (min-width: 768px) {
    .product-details-section {
        padding: 40px;
    }
}

.product-title {
    font-size: clamp(24px, 4vw, 36px);
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 0;
}

.product-price {
    font-size: clamp(22px, 3vw, 28px);
    font-weight: 700;
    color: var(--accent);
}

/* WooCommerce price override */
.product-price .woocommerce-Price-amount {
    color: var(--accent);
}

.product-desc {
    color: var(--text-muted);
    line-height: 1.6;
    font-size: clamp(14px, 2vw, 16px);
}

/* ভেরিয়েশন সিলেক্ট */
.variation-select {
    margin-top: 10px;
}

.variation-select label {
    display: block;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    color: #333;
    margin-bottom: 8px;
}

.variation-select select {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid var(--border);
    border-radius: 12px;
    outline: none;
    appearance: none;
    font-size: 15px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E") no-repeat right 15px center;
    background-size: 18px;
    cursor: pointer;
    transition: border-color 0.3s;
}

.variation-select select:focus {
    border-color: var(--primary);
}

/* কার্ট অ্যাকশন এবং বাটন */
.cart-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 10px;
}

.quantity-wrapper {
    display: flex;
    align-items: center;
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    background: #fff;
    height: 54px;
}

.qty-btn {
    background: none;
    border: none;
    padding: 0 15px;
    height: 100%;
    cursor: pointer;
    font-size: 20px;
    color: var(--text-muted);
    transition: background 0.2s;
}

.qty-btn:hover {
    background: var(--bg-light);
}

.qty-input {
    width: 50px;
    text-align: center;
    border: none;
    outline: none;
    font-weight: 600;
    font-size: 16px;
}

/* WooCommerce Quantity wrapper */
.quantity {
    display: flex !important;
    align-items: center;
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    background: #fff;
    height: 54px;
    width: auto !important;
    margin-right: 15px;
    padding: 0 !important;
}

.quantity .qty-btn {
    background: none;
    border: none;
    padding: 0 15px;
    height: 100%;
    cursor: pointer;
    font-size: 20px;
    color: var(--text-muted);
    transition: background 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.quantity .qty-btn:hover {
    background: var(--bg-light);
}

.quantity input.qty {
    width: 50px !important;
    text-align: center;
    border: none !important;
    outline: none !important;
    font-weight: 600;
    font-size: 16px;
    height: 100% !important;
    padding: 0 !important;
    background: transparent !important;
    -moz-appearance: textfield;
}

.quantity input.qty::-webkit-outer-spin-button,
.quantity input.qty::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.cart {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 15px;
    margin-top: 10px;
}

/* Swiper কাস্টমাইজেশন */
.swiper-pagination-bullet-active {
    background: var(--primary) !important;
}
.swiper-button-next, .swiper-button-prev {
    color: var(--primary) !important;
    background: rgba(255, 255, 255, 0.9);
    width: 40px !important;
    height: 40px !important;
    border-radius: 50%;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}
.swiper-button-next:after, .swiper-button-prev:after {
    font-size: 16px !important;
    font-weight: bold;
}

/* WooCommerce Variation specific styles */
.variations_form {
    margin-bottom: 10px; /* Reduced from 20px */
    padding: 10px; /* More compact */
    background: #fdfdfd;
    border: 1px solid #f0f0f0;
    border-radius: 16px;
}

.variations {
    width: 100%;
    border-collapse: collapse;
}

.variations tbody tr {
    display: flex;
    align-items: center;
    gap: 8px; /* Tighter gap */
    margin-bottom: 5px; /* Tighter gap */
}

.variations label {
    flex: 0 0 50px;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    color: var(--primary);
    margin-bottom: 0;
    letter-spacing: 0.5px;
}

.variations td.value {
    flex: 1;
    position: relative;
    display: flex;
    align-items: center;
}

.variations select {
    width: 100%;
    padding: 6px 10px; /* Even more compact */
    border: 1px solid var(--border);
    border-radius: 8px;
    outline: none;
    appearance: none;
    font-size: 14px;
    font-weight: 600;
    background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E") no-repeat right 10px center;
    background-size: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.variations select:focus {
    border-color: var(--accent);
}

.reset_variations {
    position: absolute;
    right: -25px;
    color: #ccc;
    font-size: 14px;
    text-decoration: none;
    transition: 0.3s;
}

.reset_variations:hover {
    color: var(--accent);
}

.single_variation_wrap {
    margin-top: 0;
    padding-top: 0;
    border-top: none;
    animation: fadeInVariation 0.4s ease forwards;
}

@keyframes fadeInVariation {
    from { opacity: 0; transform: translateY(5px); }
    to { opacity: 1; transform: translateY(0); }
}

.woocommerce-variation.single_variation {
    margin-bottom: 0;
    padding: 0;
}

/* Hide only the variation price specifically */
.woocommerce-variation-price {
    display: none !important;
}

/* Hide variation description if any to save space */
.woocommerce-variation-description {
    display: none !important;
}

/* Ensure the main price section looks identical to our variation price when updated */
.main-product-price {
    font-size: 23px !important; /* Fixed 23px for all devices */
    font-weight: 700;
    color: var(--accent) !important;
    margin-bottom: 15px; /* Added some gap below price */
    line-height: 1.2;
}

.main-product-price .woocommerce-Price-amount {
    font-size: 23px !important;
    color: var(--accent);
}

.main-product-price del {
    font-size: 16px !important; /* Slightly smaller for old price */
    color: #bbb !important;
    font-weight: 500;
    margin-right: 10px;
    text-decoration: line-through;
}

.main-product-price del .woocommerce-Price-amount {
    font-size: 16px !important;
    color: #bbb !important;
}

.main-product-price ins {
    text-decoration: none;
}

.main-product-price ins .woocommerce-Price-amount {
    font-size: 23px !important;
}

.main-product-price ins {
    text-decoration: none;
}

.woocommerce-variation-availability {
    font-size: 12px;
    font-weight: 700;
    margin-bottom: 0; /* Removed gap */
    padding: 3px 8px;
    background: #f0fdf4;
    color: #166534;
    display: inline-block;
    border-radius: 6px;
}

.woocommerce-variation-availability .out-of-stock {
    background: #fef2f2;
    color: #991b1b;
}

.woocommerce-variation-add-to-cart {
    display: flex;
    flex-wrap: nowrap !important; /* Force inline */
    gap: 10px;
    align-items: center;
    width: 100%;
    margin-top: 10px; /* Small gap from selector */
}

.quantity {
    flex: 0 0 110px !important; /* Slightly wider to accommodate buttons */
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    background: #fff;
    height: 50px !important;
    width: 110px !important;
    margin-right: 0 !important;
    padding: 0 !important;
    position: relative;
}

.quantity .qty-btn {
    flex: 0 0 30px; /* Fixed width */
    width: 30px !important;
    height: 100%;
    background: #f8f9fa !important;
    border: none !important;
    padding: 0 !important;
    font-size: 16px !important; /* Balanced size */
    color: var(--primary) !important;
    cursor: pointer;
    display: flex !important;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
    z-index: 2;
    -webkit-appearance: none;
}

.quantity .qty-btn:hover {
    background: #e9ecef !important;
}

.quantity input.qty {
    flex: 1;
    width: 30px !important; /* Slightly narrower to give buttons more room */
    height: 100% !important;
    border: none !important;
    outline: none !important;
    text-align: center !important;
    font-size: 16px !important;
    font-weight: 700 !important;
    color: var(--primary) !important;
    background: transparent !important;
    padding: 0 !important;
    margin: 0 !important;
    -moz-appearance: textfield;
}

.quantity input.qty::-webkit-outer-spin-button,
.quantity input.qty::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.single_add_to_cart_button {
    flex: 1;
    background: var(--primary) !important;
    color: white !important;
    border: none !important;
    padding: 0 20px !important;
    height: 50px !important;
    border-radius: 12px !important;
    font-weight: 700 !important;
    font-size: 16px !important;
    cursor: pointer !important;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    white-space: nowrap;
}

@media (max-width: 480px) {
    .woocommerce-variation-add-to-cart {
        gap: 8px;
    }
    .quantity {
        flex: 0 0 100px !important; /* Increased from 90px to fit plus icon */
        width: 100px !important;
    }
    .single_add_to_cart_button {
        font-size: 14px !important;
        padding: 0 10px !important;
    }
}

.single_add_to_cart_button:hover {
    background: var(--accent) !important;
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(255, 59, 59, 0.2);
}

.single_add_to_cart_button:disabled,
.single_add_to_cart_button.disabled {
    background: #ccc !important;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

/* WooCommerce Notices Custom Design */
.woocommerce-message, 
.woocommerce-error, 
.woocommerce-info,
.single-product-container .woocommerce-message,
.single-product-container .woocommerce-error,
.single-product-container .woocommerce-info {
    background-color: #f0fdf4 !important;
    color: #166534 !important;
    border: 0 none !important; /* Zero border and none style */
    border-top: 0 none !important;
    border-bottom: 0 none !important;
    border-left: 0 none !important;
    border-right: 0 none !important;
    outline: 0 none !important;
    border-radius: 12px !important;
    padding: 15px 20px !important;
    margin-bottom: 30px !important;
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 15px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.03) !important;
    font-size: 15px !important;
    font-weight: 500 !important;
    list-style: none !important;
}

/* Ensure no border from any pseudo-elements */
.woocommerce-message::after,
.woocommerce-error::after,
.woocommerce-info::after {
    display: none !important;
}

/* Ensure wrapper doesn't add any border */
.woocommerce-notices-wrapper {
    border: none !important;
    outline: none !important;
}

.woocommerce-message::before,
.woocommerce-info::before {
    color: #22c55e !important;
    font-family: "Font Awesome 6 Free" !important;
    font-weight: 900 !important;
    content: "\f058" !important; /* Circle check icon */
    margin-right: 10px !important;
    font-size: 18px !important;
    position: static !important;
}

.woocommerce-error {
    background-color: #fef2f2 !important;
    color: #991b1b !important;
}

.woocommerce-error::before {
    color: #ef4444 !important;
    font-family: "Font Awesome 6 Free" !important;
    font-weight: 900 !important;
    content: "\f06a" !important; /* Exclamation circle */
    margin-right: 10px !important;
    font-size: 18px !important;
    position: static !important;
}

/* Notice Button (View Cart) */
.woocommerce-message .button,
.woocommerce-info .button,
.woocommerce-error .button {
    background-color: var(--primary) !important;
    color: #ffffff !important;
    padding: 8px 18px !important;
    border-radius: 8px !important;
    font-weight: 700 !important;
    font-size: 13px !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    transition: all 0.3s ease !important;
    border: none !important;
    margin-left: auto !important;
    order: 2;
}

.woocommerce-message .button:hover {
    background-color: var(--accent) !important;
    transform: translateY(-1px);
}

@media (max-width: 600px) {
    .woocommerce-message, 
    .woocommerce-error, 
    .woocommerce-info {
        padding: 12px 15px !important;
        font-size: 14px !important;
    }
    
    .woocommerce-message .button {
        width: 100% !important;
        text-align: center !important;
        margin-top: 5px !important;
    }
}

/* Hide original summary layout */
.product-main-content {
    display: none;
}

