/* ===== Product Detail Page - Mobile-First Design ===== */

/* Mobile: Full-width product image section */
@media (max-width: 991.98px) {
    .product-image-wrapper {
       
        background-color: #f8f9fa;
    }
    
    .product-gallery {
        border-radius: 0;
    }
    
    .product-gallery .carousel-inner {
        border-radius: 0;
    }
    
    .product-gallery .carousel-item {
        aspect-ratio: 7 / 8;
    }
    
    
}

.product-details-sticky {
    position: -webkit-sticky; /* For Safari */
    position: sticky;
   
    z-index: 1019; /* Below navbar */
}

.product-gallery {
    position: relative;
   
    overflow: hidden;
}

.gallery-main {
    flex-grow: 0;
    min-width: 0; /* Prevents flexbox overflow */
}

/* --- Product Gallery Styles --- */
.product-gallery {
    border: none;
    box-shadow: none;
}

.product-gallery .carousel-inner {
    border-radius: 1rem;
}

.product-gallery .carousel-item {
    background-color: #fff;
    padding: 0;
}

.product-gallery .carousel-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-gallery-controls {
    position: absolute;
    top: 1rem;
    right: 1rem;
    z-index: 2;
}

/* Carousel Navigation Arrows */
.product-gallery .carousel-control-prev,
.product-gallery .carousel-control-next {
    width: 40px;
    height: 40px;
    background-color: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    top: 50%;
    transform: translateY(-50%);
    opacity: 0.8;
    transition: all 0.3s ease;
}

.product-gallery .carousel-control-prev {
    left: 1rem;
}

.product-gallery .carousel-control-next {
    right: 1rem;
}

.product-gallery .carousel-control-prev:hover,
.product-gallery .carousel-control-next:hover {
    opacity: 1;
    background-color: rgba(255, 255, 255, 1);
}

.product-gallery .carousel-control-prev-icon,
.product-gallery .carousel-control-next-icon {
    filter: invert(1);
}

/* Mobile: Smaller arrow buttons */
@media (max-width: 991.98px) {
    .product-gallery .carousel-control-prev,
    .product-gallery .carousel-control-next {
        width: 32px;
        height: 32px;
    }
    
    .product-gallery .carousel-control-prev-icon,
    .product-gallery .carousel-control-next-icon {
        width: 16px;
        height: 20px;
    }
}

/* Carousel Dots - Mobile Style */
.product-gallery .carousel-indicators {
    margin-bottom: 0;
    position: absolute;
    bottom: -2rem;
}

.product-gallery .carousel-indicators [data-bs-target] {
    width: 8px;
    height: 10px;
    border-radius: 50%;
    margin: 0 4px;
    background-color: rgba(0,0,0,0.3);
    border: none;
    opacity: 0.8;
}

.product-gallery .carousel-indicators .active {
    background-color: #212529;
    opacity: 1;
    width: 20px;
    border-radius: 2px;
}

/* Size selection radio buttons */
.size-options {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.size-options .btn {
    min-width: 65px;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    font-weight: 500;
    border: 1px solid #dee2e6;
    background-color: #fff;
    color: #212529;
}

.size-options .btn-check:checked + .btn {
    background-color: #212529;
    border-color: #212529;
    color: #fff;
}

/* Color Swatches - Circular Design */
.color-swatches {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

.color-swatches .swatch-lg {
    display: block;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 2px solid #e0e0e0;
    transition: all 0.2s ease;
    cursor: pointer;
    text-decoration: none;
}

.color-swatches .swatch-lg:hover {
    transform: scale(1.1);
}

.color-swatches .swatch-lg.active {
    border: 3px solid #212529;
    box-shadow: 0 0 0 2px #fff, 0 0 0 4px #212529;
}

/* WhatsApp Button Styling */
#waBuyBtn {
    background-color: #25D366 !important;
    border-color: #25D366 !important;
    color: #fff !important;
    font-weight: 600;
    padding: 0.875rem 1.5rem;
    border-radius: 0.75rem;
    transition: all 0.2s ease;
}

#waBuyBtn:hover:not([disabled]) {
    background-color: #20BA5A !important;
    border-color: #20BA5A !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.3);
}

#waBuyBtn[disabled] {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Accordion styling */
.accordion-button {
    font-weight: 600;
    background-color: #fff;
}

.accordion-button:not(.collapsed) {
    background-color: #f8f9fa;
    color: #212529;
    box-shadow: none;
}

.accordion-button:focus {
    box-shadow: none;
    border-color: rgba(0,0,0,.125);
}

.accordion-body {
    padding: 1.25rem;
    font-size: 0.95rem;
    line-height: 1.6;
}

/* Mobile: Product info section styling */
@media (max-width: 991.98px) {
    .product-details-sticky {
        position: static;
        background-color: #fff;
        border-radius: 2rem 2rem 0 0;
        margin-top: -1.5rem;
        padding: 1.5rem;
        position: relative;
        z-index: 10;
    }
    
    .product-details-sticky h1.h2 {
        font-size: 1.5rem;
        font-weight: 700;
        margin-bottom: 0.25rem;
    }
    
    .price-display {
        font-size: 1.75rem;
        font-weight: 700;
        margin: 1rem 0;
    }
}

/* Desktop adjustments */
@media (min-width: 992px) {
    .product-gallery .carousel-item {
        aspect-ratio: 8 / 9;
        background-color: #f8f9fa;
        padding: 0.5rem;
    }
    
    .product-gallery .carousel-item img {
        object-fit: cover;
    }
    
    .product-gallery {
        border: 1px solid rgba(0,0,0,0.05);
        box-shadow: 0 0.5rem 1.5rem rgba(0,0,0,0.07);
    }
    
    .product-details-sticky h1.h2 {
        font-size: 1.75rem;
    }
}

/* Size Guide Link */
.size-guide-link {
    color: #007bff;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
}

.size-guide-link:hover {
    text-decoration: underline;
}

/* Product Title / Price Mobile Optimization */
.product-price {
    color: #212529;
    font-weight: 700;
}

/* Share and Wishlist buttons in header */
.product-top-actions {
    position: absolute;
    top: 1rem;
    right: 1rem;
    left: 1rem;
    display: flex;
    justify-content: space-between;
    z-index: 20;
}

.product-top-actions .btn {
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(255,255,255,0.9);
    border: none;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.product-top-actions .btn:hover {
    background-color: #fff;
}

/* ===== Responsive Footer UI ===== */
/* Note: These general styles might be better placed in a global stylesheet. */

.site-footer {
    background-color: #212529; /* Dark background */
    color: #f8f9fa;           /* Light text */
    padding: 2.5rem 0 1.5rem;
    font-size: 0.9rem;
    line-height: 1.6;
}

.site-footer .footer-widgets {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 2rem;
    margin-bottom: 2.5rem;
}

.site-footer .footer-widget {
    flex: 1;
    min-width: 220px;
}

.site-footer .footer-widget h4 {
    font-weight: 600;
    margin-bottom: 1rem;
    color: #fff;
}

.site-footer .footer-widget ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.site-footer .footer-widget ul li {
    margin-bottom: 0.5rem;
}

.site-footer .footer-widget a {
    color: #ced4da;
    text-decoration: none;
    transition: color 0.2s ease-in-out;
}

.site-footer .footer-widget a:hover {
    color: #fff;
    text-decoration: underline;
}

.site-footer .footer-bottom {
    text-align: center;
    border-top: 1px solid #495057;
    padding-top: 1.5rem;
    font-size: 0.85rem;
    color: #adb5bd;
}

/* Mobile: Stack footer widgets for better readability */
@media (max-width: 767.98px) {
    .site-footer .footer-widgets {
        flex-direction: column;
        gap: 2.5rem;
    }

    .site-footer {
        padding: 2rem 0;
    }
}