/* =================================================================== */
/* === General Styles (Keep your existing general styles here) === */
/* =================================================================== */
@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@200..1000&display=swap');

*{
    font-family: "Cairo", sans-serif;
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
    display: flex; /* Use flexbox for footer */
    flex-direction: column; /* Stack elements vertically */
    min-height: 100vh; /* Ensure body takes at least full viewport height */
}

main {
    flex: 1; /* Allow main content to grow and push footer down */
}


/* --- Navbar Styles --- */
.navbar{
    background-color:#0a565e !important;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    padding-top: 0.3rem; /* Reduce padding slightly */
    padding-bottom: 0.3rem;
}
.navbar .navbar-brand img {
     transition: transform 0.3s ease;
     max-height: 58px; /* Ensure logo doesn't exceed navbar height */
     width: auto; /* Maintain aspect ratio */
}
.navbar .navbar-brand img:hover {
    transform: scale(1.05);
}
.navbar .nav-link {
    transition: color 0.3s ease, background-color 0.3s ease;
    padding: 8px 15px !important;
    border-radius: 4px;
    margin: 0 5px;
    color: #f0f0f0 !important; /* Lighter default color */
}
.navbar .nav-link:hover,
.navbar .nav-link.active {
    color: #fff !important;
    background-color: rgba(255, 255, 255, 0.1);
}
.navbar .dropdown-menu {
    background-color: #0a565e;
    border: none;
}
.navbar .dropdown-item {
    color: #f0f0f0;
    transition: background-color 0.3s ease, color 0.3s ease;
}
.navbar .dropdown-item:hover {
    background-color: #084a51;
    color: #fff;
}
.navbar .fa-cart-shopping {
     font-size: 1.2em;
}


/* --- Offcanvas (Side Cart) Styles --- */
.offcan-title{
    color: #057d71 !important;
    font-weight: bold;
    border-bottom: 2px solid #eee;
    padding-bottom: 10px;
    margin-bottom: 15px;
}
.btn-close{
    opacity: 0.7 !important;
}
.btn-close:hover{
    color: crimson !important;
    opacity: 1 !important;
}
.offcanvas-body .cart-item {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}
.offcanvas-body img.offcan-img {
    width: 70px !important;
    height: 70px !important;
    object-fit: cover;
    margin-left: 15px;
    cursor: pointer;
    border: 1px solid #ddd;
    border-radius: 4px;
    transition: transform 0.3s ease;
}
.offcanvas-body img.offcan-img:hover{
    transform: scale(1.05);
}
.offcanvas-body .item-details {
    flex-grow: 1;
}
.offcanvas-body .item-name {
    font-weight: 600;
    margin-bottom: 5px;
    display: block;
}
.offcan-price{
    color: #0e7985;
    font-weight: bold;
    display: block;
    margin-bottom: 5px;
}
.offcan-header{ /* Total Price Section */
    color: #333 !important;
    font-size: 1.1em;
    font-weight: bold;
    margin-top: 20px;
    padding-top: 15px;
    border-top: 2px solid #ddd;
}
.offcanvas-body .text-center button { /* Checkout Button */
     background-color: #057d71;
     border-color: #057d71;
     padding: 10px 25px;
     font-weight: bold;
     margin-top: 15px;
     transition: background-color 0.3s ease, border-color 0.3s ease;
}
.offcanvas-body .text-center button:hover {
    background-color: crimson !important;
    border-color: crimson !important;
}


/* --- Homepage Carousel Styles --- */
#carouselExampleCaptions .carousel-item img{
    height: calc(100vh - 70px); /* Adjust height based on navbar height */
    object-fit: cover;
    min-height: 400px; /* Minimum height */
}
.carousel-caption{
    background-color:rgba(0, 0, 0, 0.5);
    border-radius: 0;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 30px 50px;
    text-align: right;
    width: 100%;
}
.carousel-indicators button{
    height: 12px !important;
    width: 12px !important;
    border-radius: 50% !important;
    background-color: rgba(255, 255, 255, 0.5) !important;
    border: none !important;
    opacity: 0.7 !important;
    margin: 0 5px !important;
    transition: background-color 0.3s ease, opacity 0.3s ease;
}
.carousel-indicators button.active {
    opacity: 1 !important;
    background-color: #fff !important;
}
.carousel-caption h2{
    font-size: 2.5em;
    color: #fff;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.8);
    margin-bottom: 10px;
}
.carousel-caption p{
    font-size: 1.1em;
    margin-bottom: 15px;
    color: #f0f0f0;
}
.carousel-caption .btn-dark{
    padding: 12px 30px;
    font-size: 1em;
    background-color: #fff;
    color: #333;
    border: none;
    border-radius: 4px;
    transition: all 0.3s ease; /* Moved transition here */
}
.carousel-caption .btn-dark:hover{
    background-color: crimson !important;
    color: #fff !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}


/* --- Contact Section Styles --- */
.contact{
    padding: 60px 0;
    background: url(../images/wis2.jpg) no-repeat center center fixed;
    background-size: cover;
    color: #fff;
}
.contact .container > div {
    background-color: rgba(0, 0, 0, 0.65);
    padding: 40px;
    border-radius: 8px;
}
.contact h2.bluers {
    background-color: transparent !important;
    color: #fff;
    padding: 0;
    margin-bottom: 25px;
    font-size: 1.8em;
    text-align: center;
    border-bottom: 2px solid #0c957c;
    padding-bottom: 10px;
    display: inline-block;
}
.contact .inputcontact{
    border-radius: 4px !important;
    background-color: rgba(255,255,255,0.9);
    border: 1px solid #ccc;
    color: #333;
}
.contact button{
    width: auto;
    padding: 10px 25px;
    border-radius: 4px !important;
    background-color: #057d71;
    border: none;
    color: #fff;
    font-weight: bold;
    transition: background-color 0.3s ease;
}
.contact button:hover {
    background-color: crimson;
}

/* --- Product Listing Styles (Homepage) --- */
#products .text-header{
    border-bottom: 3px solid crimson;
    padding-bottom: 8px;
    margin-bottom: 30px;
    display: inline-block;
    font-size: 1.6em;
    font-weight: 600;
}
#products .card{
    overflow: hidden;
    border: 1px solid #e0e0e0;
    box-shadow: 0 3px 8px rgba(0,0,0,0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border-radius: 5px;
    background-color: #fff;
    height: 100%; /* Ensure cards in a row have same height */
    display: flex; /* Use flexbox for card content */
    flex-direction: column; /* Stack card content vertically */
}
#products .card:hover {
    transform: translateY(-6px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.12);
}
#products .card img{
    height: 220px;
    width: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}
#products .card img:hover{
    transform: scale(1.05);
}
#products .card-body {
    padding: 15px;
    flex-grow: 1; /* Allow body to grow */
    display: flex; /* Use flexbox inside body */
    flex-direction: column; /* Stack elements */
}
#products .card-title {
    font-size: 1.1em;
    font-weight: 600;
    margin-bottom: 10px;
    color: #333;
}
#products .card-text { /* Product Price */
    font-size: 1.2em;
    font-weight: bold;
    color: #057d71;
    margin-bottom: 15px;
}
#products .star-rating {
    margin-bottom: 15px; /* Add space below stars */
}
#products .star-rating .bluecimon { /* Stars */
    color: #ffc107;
    font-size: 0.9em;
    margin-right: 2px;
}
#products .card-buttons {
    margin-top: auto; /* Push buttons to the bottom */
}
#products .btn-primary{
    background-color: #057d71;
    border: none;
    padding: 8px 15px;
    font-size: 0.95em;
    margin-right: 5px;
    transition: background-color 0.3s ease, border-radius 0.3s ease; /* Added border-radius */
}
#products .btn-primary:hover{
    background-color: crimson !important;
    border-radius: 5px;
}
#products .btn-secondary {
     background-color: #6c757d;
     border: none;
     padding: 8px 15px;
     font-size: 0.95em;
     transition: background-color 0.3s ease, border-radius 0.3s ease; /* Added border-radius */
}
#products .btn-secondary:hover {
    background-color: #5a6268 !important;
    border-radius: 5px;
}

.blue{
    color: #057d71 !important;
}


/* --- Accordion Styles --- */
.accordion .accordion-item {
    border: 1px solid #e0e0e0;
    margin-bottom: 8px;
    border-radius: 4px;
    overflow: hidden;
}
.accordion .accordion-button{
    background-color: #0c867a !important;
    color: white !important;
    text-align: right !important;
    justify-content: space-between !important;
    font-weight: 600;
    border-radius: 0;
    box-shadow: none !important;
}
.accordion .accordion-button:not(.collapsed) {
    background-color: #0a565e !important;
}
.accordion-button::after{
    margin-right: auto;
    margin-left: 0;
    filter: brightness(0) invert(1);
}
.accordion .accordion-body {
    background-color: #fff;
    padding: 20px;
    font-size: 0.95em;
}


/* --- Footer Styles --- */
.footer{
    background-color: #0a565e;
    color: #d0d0d0;
    padding-top: 40px; /* Adjusted padding */
    padding-bottom: 0;
    margin-top: auto; /* Push footer to bottom if content is short */
}
.footer .footer-heading { /* Added class for footer headings */
    font-size: 1.2rem;
    margin-bottom: 1.2rem;
    padding-bottom: 8px;
    border-bottom: 2px solid #77bbb4;
    display: inline-block;
    color: #fff;
}
.footer p {
    font-size: 0.9em;
    margin-bottom: 0.7rem;
}
.footer ul {
    list-style: none;
    padding: 0;
    margin: 0;
}
.footer ul li {
    margin-bottom: 8px;
}
.footer .footer-link { /* Added class for footer links */
    color: #a8dadc;
    text-decoration: none;
    transition: color 0.3s ease;
}
.footer .footer-link:hover {
    color: #fff;
    text-decoration: underline;
}
.footer .footer-icon { /* Added class for footer icons */
    color: #a8dadc; /* Match link color */
}
.social-media{
    display: flex;
    gap: 0.8rem;
    margin-top: 1rem;
}
.social-icon{
    width: 38px;
    height: 38px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    text-decoration: none;
    font-size: 1.2em;
    transition: background-color 0.3s ease, transform 0.3s ease;
}
.social-icon:hover {
    background-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.custom-divider{
    border-right: 1px solid #1d6a73;
    padding-right: 15px;
}
.footer .footer-bottom { /* Added class for bottom bar */
    background-color: rgba(0, 0, 0, 0.2);
    padding: 15px 0 !important;
    margin-top: 30px; /* Adjusted space */
    font-size: 0.85em;
    color: #ccc;
}

@media (max-width: 767px) {
    .custom-divider {
        border-right: none;
        padding-right: 0;
        margin-top: 30px;
        padding-top: 20px;
        border-top: 1px solid #1d6a73;
    }
    .footer .text-md-end { /* Target columns aligned right on medium+ */
        text-align: center !important; /* Center align on small screens */
    }
     .footer .justify-content-md-end { /* Target social icons */
        justify-content: center !important; /* Center align on small screens */
    }
    .footer .footer-heading {
        display: block; /* Make heading block for centering */
        text-align: center;
        border-bottom: none; /* Remove border on small screens */
        padding-bottom: 0;
        margin-bottom: 0.8rem;
    }
}


/* --- Scrollbar Styles --- */
::-webkit-scrollbar {
    width: 10px;
}
::-webkit-scrollbar-track {
    background: #e0e0e0;
    border-radius: 10px;
}
::-webkit-scrollbar-thumb {
    background: #0a565e;
    border-radius: 10px;
    border: 2px solid #e0e0e0;
}
::-webkit-scrollbar-thumb:hover {
    background: #084a51;
}


/* =================================================================== */
/* === Styles specifically for Product Details Page (categories.html) === */
/* =================================================================== */

#main.container {
    background-color: #fff;
    padding: 30px;
    margin-top: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

/* --- Product Name Heading --- */
#product-name.product-name-heading { /* More specific selector */
    font-size: 2em;
    font-weight: 700;
    color: #0a565e;
    margin-bottom: 25px;
    text-align: center;
    border-bottom: 2px solid #eee;
    padding-bottom: 15px;
}

/* --- Container for Images (Carousel + Thumbnails) --- */
.product-images-section {
    width: 100%;
    margin-bottom: 30px;
    /* Removed flex settings from here, apply to children if needed */
}

/* --- Carousel Image Container & Sizing --- */
.product-images-section .carousel-container { /* Specific selector */
    position: relative;
    width: 100%;
    max-width: 550px; /* Adjust max width as needed */
    margin: 0 auto 15px auto; /* Center carousel */
    overflow: hidden; /* Keep overflow hidden */
    border: 1px solid #e0e0e0;
    background-color: #fdfdfd; /* Light background */
    border-radius: 5px;
}

.product-images-section .carousel-slide { /* Specific selector */
    display: flex; /* Use flex for image alignment */
    position: relative;
    width: 100%;
    /* --- Aspect Ratio Control --- */
    aspect-ratio: 4 / 3; /* Maintain a 4:3 aspect ratio */
     /* Remove fixed height/padding-bottom if using aspect-ratio */
     overflow: hidden; /* Still needed */
}

.product-images-section .carousel-slide img { /* Specific selector */
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;   /* Fill container width */
    height: 100%;  /* Fill container height */
    object-fit: contain; /* Contain image within aspect ratio, no cropping */
    opacity: 0;
    transition: opacity 0.6s ease-in-out; /* Smoother fade */
    backface-visibility: hidden; /* May help rendering */
}

.product-images-section .carousel-slide img.active {
   opacity: 1;
   z-index: 1; /* Ensure active image is on top */
}

/* --- Carousel Prev/Next Buttons --- */
.product-images-section .prev,
.product-images-section .next { /* Specific selectors */
    cursor: pointer;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    padding: 0; /* Remove padding */
    color: white;
    font-weight: bold;
    font-size: 24px; /* Slightly larger icons */
    transition: background-color 0.4s ease; /* Use background-color transition */
    border-radius: 50%;
    user-select: none;
    background-color: rgba(0, 0, 0, 0.35); /* Adjust transparency */
    border: none;
    z-index: 10;
    width: 45px; /* Slightly larger button */
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.product-images-section .next {
    right: 15px; /* Adjust position */
}
.product-images-section .prev {
    left: 15px; /* Adjust position */
}
.product-images-section .prev:hover,
.product-images-section .next:hover {
     background-color: rgba(0, 0, 0, 0.6);
}


/* --- Thumbnail Image Sizing & Styling --- */
.product-images-section .product-thumbnails { /* Specific selector */
    text-align: center;
    margin-top: 20px; /* Increase space */
    padding: 5px 0; /* Add some padding */
}

.product-images-section .product-thumbnails img { /* Specific selector */
    display: inline-block;
    width: 80px;      /* Adjust thumbnail width */
    height: 60px;     /* Adjust thumbnail height */
    object-fit: cover; /* Cover maintains aspect ratio while filling */
    margin: 0 5px 5px 5px; /* Adjust spacing */
    cursor: pointer;
    border: 3px solid #eee; /* Lighter default border */
    padding: 2px;
    background-color: #fff;
    vertical-align: middle;
    transition: border-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease; /* Added box-shadow */
    border-radius: 4px;
}
.product-images-section .product-thumbnails img:hover {
    border-color: #bbb;
    transform: scale(1.05);
    box-shadow: 0 2px 5px rgba(0,0,0,0.1); /* Add subtle shadow on hover */
}
.product-images-section .product-thumbnails img.thumb-active {
    border-color: #057d71;
    transform: scale(1.05);
    box-shadow: 0 2px 5px rgba(0,0,0,0.2); /* Stronger shadow for active */
}


/* --- Product Info Section (Below Images) --- */
.product-info-section {
    width: 100%;
    background-color: #fff; /* White background */
    padding: 30px; /* Increase padding */
    border: none; /* Remove border */
    border-radius: 5px;
    margin-top: 30px; /* Increase space above */
    box-shadow: 0 1px 4px rgba(0,0,0,0.04); /* Add very subtle shadow */
}

/* --- Section Titles (الوصف, المميزات, etc.) --- */
.product-info-section .section-title {
    font-size: 1.4em; /* Larger section titles */
    font-weight: 600;
    color: #0a565e;
    margin-bottom: 15px;
    padding-bottom: 8px;
    border-bottom: 2px solid #eee; /* Separator */
}

/* --- Main Description & Features --- */
.product-info-section #product-description {
    margin-bottom: 25px; /* Increase space */
    font-size: 1.05em;
    line-height: 1.7;
    color: #555;
}

.product-info-section #product-features {
    list-style: none;
    padding: 0;
    margin-bottom: 30px; /* Increase space */
}

.product-info-section #product-features li {
    margin-bottom: 12px; /* Increase space */
    padding-right: 25px;
    position: relative;
    font-size: 1em;
    color: #444;
}
.product-info-section #product-features li::before {
    content: '✔';
    color: #057d71;
    position: absolute;
    right: 0;
    top: 2px; /* Adjust vertical position */
    font-weight: bold;
}

/* --- Additional Info Section Styling (Country, Materials) --- */
.product-extra-info {
    margin-bottom: 25px;
    padding: 15px; /* Add padding */
    background-color: #f9f9f9; /* Light background */
    border-radius: 4px;
    border-left: 4px solid #0c867a; /* Accent border */
}
.product-extra-info:last-of-type { /* Target the last extra info block */
     margin-bottom: 30px; /* Ensure space before price section */
}

.product-extra-info h4 {
    font-size: 1.1em;
    font-weight: 600;
    color: #0a565e;
    margin-top: 0; /* Remove top margin */
    margin-bottom: 8px; /* Adjust space */
}
.product-extra-info p {
    font-size: 0.95em;
    color: #666;
    margin-bottom: 0;
}

/* --- Price Section --- */
.product-info-section .price-section {
    margin-top: 20px; /* Reduced top margin as extra info adds space */
    padding: 25px; /* Increase padding */
    background-color: #f0faf9; /* Even lighter theme background */
    border: 1px solid #d1ece8;
    border-radius: 5px;
    text-align: center;
}
.product-info-section .price-label { /* Added class for "السعر:" */
     display: block;
     margin: 0 0 5px 0;
     color: #444; /* Darker label */
     font-weight: 600;
     font-size: 1.1em;
}
.product-info-section #product-price.product-price-value { /* Added class for price value */
    font-size: 2em; /* Larger price */
    font-weight: 700;
    color: #28a745; /* Green color for price */
    display: block;
    margin-bottom: 20px; /* Increase space */
}

/* --- Add to Cart Button --- */
.product-info-section .add-to-cart-button { /* Added class for button */
    display: inline-block;
    padding: 14px 40px; /* Larger button */
    font-size: 1.15em;
    font-weight: bold;
    color: #fff;
    background-color: #057d71;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    margin-top: 0;
    transition: background-color 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease;
    text-align: center;
}
.product-info-section .add-to-cart-button i {
    margin-left: 10px; /* More space for icon */
}
.product-info-section .add-to-cart-button:hover {
    background-color: #0a565e;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}


/* --- Responsive Adjustments for Product Details Page --- */
@media (max-width: 767px) {
    #product-name.product-name-heading {
        font-size: 1.6em; /* Smaller heading on mobile */
    }
    .product-images-section .carousel-container {
        max-width: 100%; /* Full width on mobile */
    }
    .product-images-section .product-thumbnails img {
        width: 60px; /* Smaller thumbnails on mobile */
        height: 45px;
        margin: 0 3px 3px 3px;
    }
     .product-info-section .price-section #product-price.product-price-value {
         font-size: 1.6em; /* Smaller price on mobile */
     }
     .product-info-section .add-to-cart-button {
        padding: 12px 30px; /* Adjust button size */
        font-size: 1.05em;
     }
}




.btn-outline-primary {
    --bs-btn-color: #030303;
    --bs-btn-border-color: #eff0f2;
    --bs-btn-hover-color: #fff;
    --bs-btn-hover-bg: #0a565e !important;
    --bs-btn-hover-border-color: #0a565e !important;
    --bs-btn-focus-shadow-rgb: 13, 110, 253;
    --bs-btn-active-color: #fff;
    --bs-btn-active-bg: #eaeaea;
    --bs-btn-active-border-color: #c31a1a;
    --bs-btn-active-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);
    --bs-btn-disabled-color: #c71919;
    --bs-btn-disabled-bg: transparent;
    --bs-btn-disabled-border-color: #971414;
    --bs-gradient: none;
}

a {
    color: #0a565e;
    text-decoration: underline;
    text-align: center;
    font-size: 20px;
    font-weight: bold;
}

.text-dark {
    --bs-text-opacity: 1;
    color: #0a565e !important;
    font-size: 20px;
}



