/* Loading Screen Styles */
#loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #E7F2EF;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease;
}

.loading-content {
    text-align: center;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 5px solid rgba(112, 137, 147, 0.3);
    border-top: 5px solid #708993;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

#loading-screen p {
    font-size: 18px;
    color: #19183B;
    font-weight: bold;
}

/* Product Section Styles */
.sec-pro {
    margin: 50px 100px;
    position: relative;
}

.title {
    text-align: center;
    display: inline-block;
    position: absolute;
    left: 50%;
    transform: translate(-50%);
}

.title .title-border {
    display: block;
    width: 50%;
    height: 5px;
    margin: auto;
    border-radius: 20px;
    background-color: #708993;
    transition: all 0.5s ease;
}

.title:hover .title-border {
    width: 90%;
}

.pro-body {
    margin-top: 30px;
    margin-bottom: 80px;
    width: 350px;
    height: 350px;
    border-radius: 20px;
    padding: 20px;
    background-color: #A1C2BD;
    transform: translateX(-15px);
    position: relative;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.pro-body:hover {
    transform: translate(-15px,-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.pro-body::after {
    content: "";
    background-color: rgba(29, 27, 27, 0.6);
    position: absolute;
    width: 90%;
    height: 90%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border-radius: 20px;
    text-align: center;
    z-index: 5;
    display: none;
    transition: all 0.6s ease;
}

.pro-body:hover::after {
    display: block;
}

.pro-body:hover .dis,
.pro-body:hover .stars,
.pro-body:hover .more-details {
    display: inline-block;
}

.pro-body img {
    width: 100%;
    height: 100%;
    border-radius: 20px;
    object-fit: cover;
}

.p-style {
    position: absolute;
    display: inline-block;
    bottom: -20px;
    left: 70px;
    height: 30px;
    width: 8px;
    background-color: #708993;
    border-radius: 25px 0;
    z-index: 3;
}

.p-style2 {
    position: absolute;
    display: inline-block;
    bottom: -20px;
    left: 130px;
    height: 30px;
    width: 8px;
    background-color: #708993;
    border-radius: 0 25px;
    z-index: 3;
}

.price {
    position: absolute;
    display: inline-block;
    bottom: -54px;
    left: 50px;
    min-width: 105px;
    background-color: #A1C2BD;
    padding: 10px 15px;
    border-radius: 25px;
    font-weight: bold;
    font-size: 20px;
    z-index: 2;
}

.add {
    width: 45px;
    height: 100px;
    display: inline-block;
    padding: 10px;
    background-color: #A1C2BD;
    border-radius: 25px;
    position: absolute;
    top: 10%;
    right: -60px;
}

.btnAdd {
    width: 100%;
    height: 100%;
    background-color: #708993;
    border-radius: 25px;
    border: none;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.btnAdd:hover {
    background-color: #5a7179;
}

.a-style {
    position: absolute;
    display: inline-block;
    top: 14%;
    right: -22px;
    width: 30px;
    height: 8px;
    background-color: #708993;
    border-radius: 25px 0;
    z-index: 3;
}

.a-style2 {
    position: absolute;
    display: inline-block;
    top: 32%;
    right: -22px;
    width: 30px;
    height: 8px;
    background-color: #708993;
    border-radius: 0 25px;
    z-index: 3;
}

.dis {
    text-align: center;
    border-radius: 25px;
    padding: 5px 10px;
    background-color: #708993;
    font-weight: bold;
    position: absolute;
    top: 7%;
    left: 7%;
    z-index: 8;
    color: goldenrod;
    display: none;
}

.stars {
    text-align: center;
    border-radius: 25px;
    padding: 5px 10px;
    background-color: #708993;
    font-weight: bold;
    position: absolute;
    top: 85%;
    left: 7%;
    z-index: 8;
    color: goldenrod;
    display: none;
}

.more-details {
    text-align: center;
    border-radius: 25px;
    padding: 5px 10px;
    background-color: #708993;
    font-weight: bold;
    font-size: 15px;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 8;
    cursor: pointer;
    display: none;
    border: none;
    color: goldenrod;
    transition: background-color 0.3s ease;
}

.more-details:hover {
    background-color: #5a7179;
}

.pro-items {
    display: flex;
    flex-wrap: wrap;
    gap: 70px;
    justify-content: center;
    margin-top: 80px;
}

/* Product Slide Styles */
.show-slide {
    position: fixed;
    top: 10%;
    left: 0;
    width: 400px;
    max-width: 90%;
    border-radius: 5px 40px 40px 5px;
    background-color: #708993;
    padding: 20px;
    z-index: 1000;
    transform: translateX(-100%);
    transition: transform 0.3s ease-in-out;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    max-height: 90vh;
    overflow-y: auto;
}

.show-slide.active {
    transform: translateX(0);
}

.show-img {
    width: 100%;
    height: 300px;
    border-radius: 5px 40px 40px 5px;
    object-fit: cover;
}

.show-slide h2 {
    text-align: center;
    margin: 15px 0;
    color: #19183B;
    font-size: 1.5em;
}

.show-slide p {
    padding: 0 15px;
    color: #19183B;
    line-height: 1.4;
    margin-bottom: 20px;
}

.show-price {
    display: inline-block;
    padding: 10px 15px;
    background-color: #26383f;
    border-radius: 20px;
    margin: 10px 0;
    color: white;
    font-weight: bold;
    font-size: 1.2em;
    margin-right: 30px;
}

.quantity-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 10px 0;
}

.quantity-btn {
    width: 30px;
    height: 30px;
    border: none;
    border-radius: 50%;
    background-color: #26383f;
    color: white;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.quantity-btn:hover {
    background-color: #19183B;
}

.quantity-input {
    width: 60px;
    height: 30px;
    border: 0;
    border-radius: 20px;
    text-align: center;
    margin: 0 10px;
    font-size: 1em;
}

.addcart {
    padding: 10px 20px;
    border-radius: 20px;
    border: none;
    background-color: #26383f;
    color: white;
    cursor: pointer;
    font-size: 1em;
    margin: 8px 0;
    transition: background-color 0.3s ease;
}

.addcart:hover {
    background-color: #19183B;
}

.product-bage {
    display: block;
    margin: 12px auto 0;
    padding: 10px 20px;
    border-radius: 30px;
    border: none;
    cursor: pointer;
    background-color: #26383f;
    width: 80%;
    transition: background-color 0.3s ease;
}

.product-bage:hover {
    background-color: #19183B;
}

.product-bage a {
    color: white;
    text-decoration: none;
    font-weight: bold;
    font-size: 1em;
}

/* Overlay effect */
.slide-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    display: none;
}

.slide-overlay.active {
    display: block;
}

.close-slide {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #ff4444;
    color: white;
    border: none;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    cursor: pointer;
    font-size: 18px;
    font-weight: bold;
    z-index: 1001;
}

/* Scroll to Top Button */
.scroll-top-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: #708993;
    color: white;
    border: none;
    cursor: pointer;
    font-size: 20px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    z-index: 100;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.scroll-top-btn.visible {
    opacity: 1;
    visibility: visible;
}

.scroll-top-btn:hover {
    background-color: #5a7179;
    transform: translateY(-3px);
}

/* Cart List Styles */
.cart-item-details {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
    padding: 10px;
    background-color: #A1C2BD;
    border-radius: 10px;
}

.cart-item-image {
    width: 50px;
    height: 50px;
    border-radius: 5px;
    object-fit: cover;
    margin-right: 10px;
}

.cart-item-info {
    flex: 1;
}

.cart-item-name {
    font-weight: bold;
    margin-bottom: 5px;
}

.cart-item-price {
    color: #4f6269;
    font-size: 14px;
    font-weight: bold;
}

.cart-quantity-controls {
    display: flex;
    align-items: center;
    margin-top: 5px;
}

.cart-quantity-btn {
    width: 25px;
    height: 25px;
    border: none;
    border-radius: 50%;
    background-color: #708993;
    color: white;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cart-quantity-input {
    width: 40px;
    height: 25px;
    border: 1px solid #ddd;
    border-radius: 5px;
    text-align: center;
    margin: 0 5px;
}

.cart-remove-btn {
    background: none;
    border: none;
    color: #ff4444;
    cursor: pointer;
    font-size: 16px;
    margin-left: 10px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .sec-pro {
        margin: 30px 20px;
    }
    
    .pro-body {
        width:290px;
        height: 290px;
    }
    
    .show-slide {
        width: 90%;
    }
}

/* Animation for page content */
.main-content {
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* //////////////////////////// */


/* Product Slide Styles - Fixed Version */
.show-slide {
    position: fixed;
    top: 10%;
    left: 0;
    width: 400px;
    max-width: 90%;
    max-height: 80vh; /* Changed from 90vh to 80vh for better spacing */
    border-radius: 5px 40px 40px 5px;
    background-color: #708993;
    padding: 20px;
    z-index: 1000;
    transform: translateX(-100%);
    transition: transform 0.3s ease-in-out;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    
    /* Critical fixes for scrolling */
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch; /* For iOS Safari */
    scrollbar-width: thin; /* Firefox */
    scrollbar-color: #5a7179 #708993; /* Firefox */
}

.show-slide.active {
    transform: translateX(0);
}

/* Custom Scrollbar for Webkit browsers (Chrome, Safari, Edge) */
.show-slide::-webkit-scrollbar {
    width: 8px;
}

.show-slide::-webkit-scrollbar-track {
    background: rgba(26, 56, 63, 0.2);
    border-radius: 10px;
    margin: 10px 0;
}

.show-slide::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #5a7179 0%, #26383f 100%);
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: background 0.3s ease;
}

.show-slide::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #26383f 0%, #19183B 100%);
}

.show-img {
    width: 100%;
    height: 300px;
    border-radius: 5px 40px 40px 5px;
    object-fit: cover;
    margin-bottom: 15px; /* Added margin for better spacing */
}

.show-slide h2 {
    text-align: center;
    margin: 15px 0;
    color: #19183B;
    font-size: 1.5em;
    font-weight: bold;
}

.show-slide p {
    padding: 0 15px;
    color: #19183B;
    line-height: 1.6; /* Improved line height */
    margin-bottom: 20px;
    text-align: justify;
}

.show-price {
    display: inline-block;
    padding: 12px 18px; /* Slightly increased padding */
    background-color: #26383f;
    border-radius: 20px;
    margin: 10px 0;
    color: white;
    font-weight: bold;
    font-size: 1.2em;
    margin-right: 30px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.quantity-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 15px 0; /* Increased margin */
    flex-wrap: wrap; /* Allow wrapping on small screens */
    gap: 10px;
}

.quantity-btn {
    width: 35px; /* Slightly larger */
    height: 35px;
    border: none;
    border-radius: 50%;
    background-color: #26383f;
    color: white;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.quantity-btn:hover {
    background-color: #19183B;
    transform: translateY(-1px);
}

.quantity-input {
    width: 70px; /* Slightly wider */
    height: 35px;
    border: 0;
    border-radius: 20px;
    text-align: center;
    margin: 0 10px;
    font-size: 1em;
    font-weight: bold;
    background-color: white;
    box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.1);
}

.slide-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 20px;
    padding: 0 15px; /* Added padding */
}

.addcart {
    padding: 12px 20px;
    border-radius: 25px;
    border: none;
    background-color: #26383f;
    color: white;
    cursor: pointer;
    font-size: 1em;
    font-weight: bold;
    transition: all 0.3s ease;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.2);
}

.addcart:hover {
    background-color: #19183B;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.product-bage {
    display: block;
    margin: 0;
    padding: 12px 20px;
    border-radius: 25px;
    border: none;
    cursor: pointer;
    background-color: #26383f;
    width: 100%;
    transition: all 0.3s ease;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.2);
}

.product-bage:hover {
    background-color: #19183B;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.product-bage a {
    color: white;
    text-decoration: none;
    font-weight: bold;
    font-size: 1em;
    display: block;
    width: 100%;
}

/* Close button improvements */
.close-slide {
    position: absolute;
    top: 15px; /* Adjusted position */
    right: 15px;
    background: linear-gradient(135deg, #ff4444, #cc3333);
    color: white;
    border: none;
    border-radius: 50%;
    width: 35px; /* Slightly larger */
    height: 35px;
    cursor: pointer;
    font-size: 18px;
    font-weight: bold;
    z-index: 1001;
    transition: all 0.3s ease;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.3);
}

.close-slide:hover {
    background: linear-gradient(135deg, #cc3333, #aa2222);
    transform: scale(1.1);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.4);
}

/* Overlay improvements */
.slide-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6); /* Darker overlay */
    z-index: 999;
    display: none;
    backdrop-filter: blur(2px); /* Add blur effect */
    -webkit-backdrop-filter: blur(2px);
}

.slide-overlay.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Responsive Design for slide */
@media (max-width: 768px) {
    .show-slide {
        width: 95%;
        max-width: 95%;
        top: 5%;
        max-height: 85vh; /* Adjusted for mobile */
        /* left: 50%; */
        transform: translateX(-50%) translateY(-100%);
        border-radius: 20px;
        padding: 15px;
    }
    
    .show-slide.active {
        transform: translateX(-50%) translateY(0);
    }
    
    .show-img {
        height: 250px;
        border-radius: 20px;
    }
    
    .quantity-controls {
        flex-direction: column;
        gap: 15px;
    }
    
    .quantity-controls > div {
        display: flex;
        align-items: center;
        gap: 10px;
    }
}

/* Additional fixes for different browsers */
.show-slide {
    /* Force GPU acceleration */
    will-change: transform;
    transform: translateX(-100%) translateZ(0);
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

.show-slide.active {
    transform: translateX(0) translateZ(0);
}

/* Ensure content doesn't overflow */
.show-slide * {
    box-sizing: border-box;
}

/* Fix for touch devices */
@media (hover: none) and (pointer: coarse) {
    .show-slide {
        -webkit-overflow-scrolling: touch;
        scroll-behavior: smooth;
    }
}

/* Additional padding at the bottom to ensure all content is accessible */
.show-slide::after {
    content: "";
    display: block;
    height: 20px;
    width: 100%;
}

/* Smooth scrolling animation */
@media (prefers-reduced-motion: no-preference) {
    .show-slide {
        scroll-behavior: smooth;
    }
}

/* Fix for Safari */
@supports (-webkit-appearance: none) {
    .show-slide {
        -webkit-transform: translateX(-100%);
        -webkit-transition: -webkit-transform 0.3s ease-in-out;
    }
    
    .show-slide.active {
        -webkit-transform: translateX(0);
    }
}
.price{
    color: #162830;
}