/* --- Single Product Section --- */
.single-product-section {
    padding: 60px 0;
    font-family: 'Segoe UI', Roboto, sans-serif;
    background-color: #ffffff;
}

.product-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 5%;
    display: grid;
    grid-template-columns: 1.3fr 1fr;
    /* වම් පස මඳක් අඩු කිරීමෙන් පින්තූරය කුඩා වේ */
    gap: 60px;
    align-items: flex-start;
}

/* -- Gallery Side -- */
.product-gallery {
    display: flex;
    gap: 20px;
    position: relative;
}

.thumbnail-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
    width: 110px;
}

.thumbnail-list .thumb {
    width: 100%;
    aspect-ratio: 3/4;
    object-fit: cover;
    cursor: pointer;
    border: 1px solid transparent;
    transition: all 0.3s ease;
}

.thumbnail-list .thumb.active {
    border-color: #000;
}

.main-image-wrapper {
    flex-grow: 1;
    background-color: #f7f7f7;
    position: relative;
    aspect-ratio: 3/4;
}

.main-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.gallery-arrow {
    display: none;
    /* Desktop වලදී සඟවා ඇත */
}

/* -- Product Details Side -- */
.product-title {
    font-size: 24px;
    font-weight: 800;
    color: #111;
    margin-bottom: 15px;
    line-height: 1.3;
}

.product-price {
    font-size: 22px;
    color: #111;
    margin-bottom: 5px;
}

.installment-info {
    font-size: 15px;
    color: #777;
    margin-bottom: 25px;
}

.size-chart-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 16px;
    color: #333;
    text-decoration: none;
    margin-bottom: 25px;
}

.size-chart-link:hover {
    text-decoration: underline;
}

/* Variants (Color & Size) */
.variant-group {
    margin-bottom: 25px;
}

.variant-label {
    display: block;
    font-size: 13px;
    color: #333;
    margin-bottom: 10px;
}

.variant-label span {
    font-weight: 600;
}

.variant-options {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.btn-color,
.btn-size {
    background: transparent;
    border: 1px solid #ddd;
    padding: 8px 15px;
    font-size: 14px;
    color: #333;
    cursor: pointer;
    min-width: 45px;
    transition: all 0.2s;
}

.btn-color.active,
.btn-size.active {
    border-color: #111;
    font-weight: 600;
}

/* Out of Stock Style (Diagonal Line) */
.btn-size.out-of-stock {
    color: #aaa;
    border-color: #eee;
    background: linear-gradient(to top left, transparent 48%, #ddd 49%, #ddd 51%, transparent 52%);
    cursor: not-allowed;
}

/* Add to Cart Area */
.cart-action-group {
    display: flex;
    gap: 15px;
    margin-bottom: 30px;
}

.quantity-selector {
    display: flex;
    border: 1px solid #ddd;
    height: 45px;
    width: 100px;
}

.qty-btn {
    background: none;
    border: none;
    width: 30px;
    font-size: 16px;
    cursor: pointer;
    color: #555;
}

.quantity-selector input {
    width: 40px;
    border: none;
    text-align: center;
    font-size: 12px;
    font-weight: 600;
    color: #111;
    pointer-events: none;
}

.btn-add-to-cart {
    flex-grow: 1;
    background-color: #0b2a4a;
    /* Dark Blue */
    color: #fff;
    border: none;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 1px;
    cursor: pointer;
    transition: background 0.3s;
}

.btn-add-to-cart:hover {
    background-color: #1a436e;
}

/* Expert & Features */
.ask-expert {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 600;
    color: #333;
    text-decoration: none;
    margin-bottom: 30px;
}

.product-features {
    list-style: none;
    padding: 0;
    margin-bottom: 30px;
}

.product-features li {
    font-size: 14px;
    color: #555;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Safe Checkout Box */
.safe-checkout-box {
    border: 1px solid #eaeaea;
    padding: 20px;
    border-radius: 4px;
    text-align: center;
    margin-bottom: 40px;
    position: relative;
}

.checkout-title {
    position: absolute;
    top: -9px;
    left: 50%;
    transform: translateX(-50%);
    background: #fff;
    padding: 0 10px;
    font-size: 10px;
    color: #555;
}

.safe-checkout-box img {
    height: 100px;
    margin-top: 10px;
    max-width: 100%;
}

/* Accordions */
.accordion-container {
    border-top: 1px solid #eaeaea;
}

.accordion-item {
    border-bottom: 1px solid #eaeaea;
}

.accordion-header {
    width: 100%;
    background: none;
    border: none;
    padding: 20px 0;
    font-size: 14px;
    font-weight: 700;
    text-align: left;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    color: #111;
}

.accordion-header .icon {
    font-size: 16px;
    font-weight: 400;
}

.accordion-body {
    display: none;
    padding-bottom: 20px;
    font-size: 14px;
    color: #555;
    line-height: 1.6;
}



/* Tablet and below (Max 992px) */
@media (max-width: 992px) {
    .single-product-section {
        padding: 40px 0;
    }

    .product-container {
        grid-template-columns: 1fr;
        gap: 30px;
        padding: 0 4%;
    }

    .product-gallery {
        flex-direction: column-reverse;
        gap: 15px;
    }

    .thumbnail-list {
        width: 100%;
        flex-direction: row;
        overflow-x: auto;
        padding-bottom: 10px;
        scroll-snap-type: x mandatory;
        gap: 10px;
    }

    .thumbnail-list::-webkit-scrollbar {
        height: 4px;
    }

    .thumbnail-list .thumb {
        width: 70px;
        flex-shrink: 0;
        scroll-snap-align: start;
    }

    .main-image-wrapper {
        width: 100%;
    }

    .gallery-arrow {
        display: flex;
        position: absolute;
        top: 50%;
        transform: translateY(-50%);
        background-color: rgba(255, 255, 255, 0.9);
        border: 1px solid #ddd;
        border-radius: 50%;
        width: 40px;
        height: 40px;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        z-index: 5;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    }

    .gallery-arrow.left-arrow {
        left: 10px;
    }

    .gallery-arrow.right-arrow {
        right: 10px;
    }

    .product-title {
        font-size: 22px;
    }

    .product-price {
        font-size: 16px;
    }
}

/* Mobile Phones (Max 768px) */
@media (max-width: 768px) {
    .single-product-section {
        padding: 30px 0;
    }

    .product-container {
        padding: 0 15px;
        gap: 25px;
    }

    .product-gallery {
        gap: 12px;
    }

    .thumbnail-list {
        gap: 8px;
    }

    .thumbnail-list .thumb {
        width: 60px;
    }

    .main-image-wrapper {
        aspect-ratio: 3/4;
    }

    .product-title {
        font-size: 18px;
        margin-bottom: 12px;
        line-height: 1.4;
    }

    .product-price {
        font-size: 16px;
        margin-bottom: 4px;
    }

    .installment-info {
        font-size: 10px;
        margin-bottom: 20px;
    }

    .size-chart-link {
        font-size: 11px;
        margin-bottom: 20px;
    }

    .variant-group {
        margin-bottom: 20px;
    }

    .variant-label {
        font-size: 10px;
        margin-bottom: 8px;
    }

    .btn-color,
    .btn-size {
        padding: 7px 12px;
        font-size: 10px;
        min-width: 40px;
    }

    .cart-action-group {
        flex-direction: column;
        gap: 12px;
        margin-bottom: 25px;
    }

    .quantity-selector {
        width: 100%;
        height: 50px;
        justify-content: space-between;
    }

    .qty-btn {
        width: 40px;
        font-size: 18px;
    }

    .quantity-selector input {
        flex-grow: 1;
        font-size: 14px;
    }

    .btn-add-to-cart {
        width: 100%;
        padding: 15px;
        font-size: 13px;
    }

    .ask-expert {
        font-size: 11px;
        margin-bottom: 25px;
    }

    .product-features {
        margin-bottom: 25px;
    }

    .product-features li {
        font-size: 10px;
        margin-bottom: 10px;
    }

    .safe-checkout-box {
        padding: 15px;
        margin-bottom: 30px;
    }

    .checkout-title {
        font-size: 9px;
        padding: 0 8px;
    }

    .safe-checkout-box img {
        height: 35px;
        margin-top: 8px;
    }

    .accordion-header {
        padding: 15px 0;
        font-size: 10px;
    }

    .accordion-body {
        font-size: 10px;
        padding-bottom: 15px;
        line-height: 1.5;
    }
}

/* Small Mobile Phones (Max 576px) */
@media (max-width: 576px) {
    .single-product-section {
        padding: 20px 0;
    }

    .product-container {
        padding: 0 12px;
        gap: 20px;
    }

    .product-gallery {
        gap: 10px;
    }

    .thumbnail-list {
        gap: 6px;
        padding-bottom: 8px;
    }

    .thumbnail-list .thumb {
        width: 55px;
    }

    .gallery-arrow {
        width: 35px;
        height: 35px;
    }

    .gallery-arrow.left-arrow {
        left: 8px;
    }

    .gallery-arrow.right-arrow {
        right: 8px;
    }

    .product-title {
        font-size: 16px;
        margin-bottom: 10px;
    }

    .product-price {
        font-size: 15px;
    }

    .installment-info {
        font-size: 9px;
        margin-bottom: 15px;
    }

    .size-chart-link {
        font-size: 10px;
        margin-bottom: 15px;
    }

    .variant-group {
        margin-bottom: 15px;
    }

    .variant-label {
        font-size: 9px;
        margin-bottom: 6px;
    }

    .btn-color,
    .btn-size {
        padding: 6px 10px;
        font-size: 9px;
        min-width: 35px;
    }

    .cart-action-group {
        gap: 10px;
        margin-bottom: 20px;
    }

    .quantity-selector {
        height: 45px;
    }

    .qty-btn {
        width: 35px;
        font-size: 16px;
    }

    .btn-add-to-cart {
        padding: 13px;
        font-size: 12px;
    }

    .ask-expert {
        font-size: 10px;
        margin-bottom: 20px;
    }

    .product-features li {
        font-size: 9px;
        margin-bottom: 8px;
    }

    .safe-checkout-box {
        padding: 12px;
        margin-bottom: 25px;
    }

    .checkout-title {
        font-size: 8px;
        padding: 0 6px;
    }

    .safe-checkout-box img {
        height: 28px;
        margin-top: 6px;
    }

    .accordion-header {
        padding: 12px 0;
        font-size: 9px;
    }

    .accordion-body {
        font-size: 9px;
        padding-bottom: 12px;
    }
}

/* Extra Small Mobile (Max 400px) */
@media (max-width: 400px) {
    .product-container {
        padding: 0 10px;
    }

    .thumbnail-list .thumb {
        width: 50px;
    }

    .product-title {
        font-size: 14px;
    }

    .product-price {
        font-size: 14px;
    }

    .btn-color,
    .btn-size {
        padding: 5px 8px;
        font-size: 8px;
        min-width: 30px;
    }

    .quantity-selector {
        height: 42px;
    }

    .btn-add-to-cart {
        padding: 12px;
        font-size: 11px;
    }
}


@media (min-width: 1400px) {

    .product-container {
        max-width: 1900px;
        gap: 80px;
    }


    .product-gallery {
        max-height: 75vh;
        align-items: flex-start;
    }


    .main-image-wrapper {
        height: 75vh;
        min-height: 550px;
        max-height: 720px;
        aspect-ratio: auto;
        width: auto;
        flex-grow: 1;
        display: flex;
        justify-content: center;
        background-color: #f7f7f7;
    }

    .main-image-wrapper img {
        width: auto;
        height: 100%;
        max-width: 100%;
        object-fit: contain;
    }


    .thumbnail-list {
        height: 75vh;
        min-height: 550px;
        max-height: 720px;
        overflow-y: auto;
        padding-right: 10px;
    }


    .thumbnail-list::-webkit-scrollbar {
        width: 4px;
    }

    .thumbnail-list::-webkit-scrollbar-thumb {
        background-color: #dddddd;
        border-radius: 4px;
    }


    .product-title {
        font-size: 32px;
        margin-bottom: 20px;
        letter-spacing: 1px;
    }

    .product-price {
        font-size: 22px;
    }

    .variant-label {
        font-size: 13px;
    }

    .btn-color,
    .btn-size {
        padding: 10px 20px;
        font-size: 13px;
    }


    .cart-action-group {
        margin-top: 20px;
    }

    .quantity-selector {
        height: 55px;
        width: 120px;
    }

    .btn-add-to-cart {
        padding: 15px 40px;
        font-size: 15px;
        letter-spacing: 2px;
    }
}








/* --- You May Also Like Section --- */
.yml-section {
    max-width: 1400px;
    margin: 80px auto 40px auto;
    padding: 0 5%;
    font-family: 'Segoe UI', Roboto, sans-serif;
}

.yml-header {
    margin-bottom: 30px;
}

.yml-header h2 {
    font-size: 16px;
    font-weight: 800;
    color: #111;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.yml-carousel-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.yml-track {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    scroll-behavior: smooth;
    scroll-snap-type: x mandatory;
    padding-bottom: 20px;
    width: 100%;
    -ms-overflow-style: none;
    /* IE & Edge */
    scrollbar-width: none;
    /* Firefox */
}

.yml-track::-webkit-scrollbar {
    display: none;
    /* Chrome & Safari */
}

.yml-card {
    flex: 0 0 calc(25% - 15px);
    /* Desktop: 4 items */
    scroll-snap-align: start;
    display: flex;
    flex-direction: column;
    background-color: #faf8f7;
    border-radius: 6px;
    overflow: hidden;
}

.yml-img-container {
    background-color: #f2f2f2;
    width: 100%;
    aspect-ratio: 3/4;
    overflow: hidden;
}

.yml-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top;
}

.yml-info {
    padding: 20px 10px;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    flex-grow: 1;
}

.yml-info h3 {
    font-size: 11px;
    font-weight: 700;
    color: #222;
    margin-bottom: 6px;
    text-transform: uppercase;
}

.yml-price {
    font-size: 11px;
    font-weight: 600;
    color: #444;
    margin-bottom: 4px;
}

.yml-installment {
    font-size: 9px;
    color: #888;
    margin-bottom: 12px;
}

.yml-colors {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
}

.yml-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 1px solid #ddd;
    cursor: pointer;
}

.yml-active-dot {
    outline: 1px solid #333;
    outline-offset: 2px;
}

.yml-more-colors {
    font-size: 9px;
    color: #555;
    margin-left: 5px;
}

/* Navigation Arrows */
.yml-nav-btn {
    position: absolute;
    top: 40%;
    transform: translateY(-50%);
    background-color: rgba(255, 255, 255, 0.9);
    border: 1px solid #eee;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.yml-prev-btn {
    left: -20px;
}

.yml-next-btn {
    right: -20px;
}


/* --- Mobile Responsiveness --- */

/* Tablets (Max 1024px) */
@media (max-width: 1024px) {
    .yml-card {
        flex: 0 0 calc(33.333% - 14px);
        /* Show 3 cards */
    }
}

/* Mobile Phones (Max 768px) */
@media (max-width: 768px) {
    .yml-section {
        padding: 0 15px;
        margin-top: 40px;
        margin-bottom: 30px;
    }

    .yml-header {
        margin-bottom: 20px;
    }

    .yml-header h2 {
        font-size: 14px;
    }

    .yml-card {

        flex: 0 0 80%;
    }

    .yml-info {
        padding: 15px 8px;
    }

    .yml-info h3 {
        font-size: 10px;
        margin-bottom: 5px;
    }

    .yml-price {
        font-size: 10px;
        margin-bottom: 3px;
    }

    .yml-installment {
        font-size: 8px;
        margin-bottom: 10px;
    }

    .yml-nav-btn {
        display: none;
    }

    .yml-track {
        gap: 15px;
    }
}

/* Small Mobile (Max 576px) */
@media (max-width: 576px) {
    .yml-section {
        padding: 0 12px;
        margin-top: 30px;
        margin-bottom: 25px;
    }

    .yml-header {
        margin-bottom: 15px;
    }

    .yml-header h2 {
        font-size: 12px;
    }

    .yml-card {
        flex: 0 0 85%;
    }

    .yml-info {
        padding: 12px 6px;
    }

    .yml-info h3 {
        font-size: 9px;
    }

    .yml-price {
        font-size: 9px;
    }

    .yml-installment {
        font-size: 7px;
        margin-bottom: 8px;
    }

    .yml-dot {
        width: 10px;
        height: 10px;
    }

    .yml-more-colors {
        font-size: 7px;
    }

    .yml-track {
        gap: 12px;
        padding-bottom: 15px;
    }
}

/* Extra Small Mobile (Max 400px) */
@media (max-width: 400px) {
    .yml-section {
        padding: 0 10px;
    }

    .yml-card {
        flex: 0 0 90%;
    }

    .yml-header h2 {
        font-size: 11px;
    }

    .yml-info h3 {
        font-size: 8px;
    }

    .yml-price {
        font-size: 8px;
    }

    .yml-installment {
        font-size: 6px;
    }
}


@media (min-width: 1400px) {

    .yml-section {
        max-width: 1900px;
    }


    .yml-card {
        flex: 0 0 calc(20% - 24px);
    }


    .yml-track {
        gap: 30px;
    }


    .yml-header h2 {
        font-size: 20px;
        margin-bottom: 40px;
        letter-spacing: 2px;
    }

    .yml-info {
        padding: 25px 15px;
    }

    .yml-info h3 {
        font-size: 13px;
        margin-bottom: 8px;
    }

    .yml-price {
        font-size: 13px;
    }

    .yml-installment {
        font-size: 11px;
        margin-bottom: 15px;
    }


    .yml-dot {
        width: 14px;
        height: 14px;
    }

    .yml-more-colors {
        font-size: 11px;
    }

    /* Arrows (බොත්තම්) වඩාත් පැහැදිලිව පෙන්වීම */
    .yml-nav-btn {
        width: 50px;
        height: 50px;
    }

    .yml-prev-btn {
        left: -25px;
    }

    .yml-next-btn {
        right: -25px;
    }
}