/* General styles */
body {
    font-family: Arial, sans-serif;
    background-color: #f0f2f5;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

main {
    flex: 1;
}

/* Navbar */
.navbar {
    background-color: white;
    padding: 15px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #ddd;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.burger {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #143e95;
    padding: 5px;
}

.logo-link img {
    height: 40px;
    transition: opacity 0.3s;
}

.logo-link img:hover {
    opacity: 0.8;
}

/* Buttons */
.nav-button, .cart-link, .button-blue {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: #143e95;
    color: white;
    padding: 10px 18px;
    border-radius: 5px;
    font-weight: bold;
    text-decoration: none;
    transition: background-color 0.3s;
    border: none;
    cursor: pointer;
}

.nav-button:hover, .cart-link:hover, .button-blue:hover {
    background-color: #040444;
}

.button-blue.full-width {
    display: block;
    width: 100%;
    max-width: 300px;
    margin: 20px auto 0;
    text-align: center;
}


/* Plus/Minus Buttons */
.button-yellow, .button-green {
    background-color: #143e95;
    color: white;
    width: 36px;
    height: 36px;
    padding: 0;
    font-size: 20px;
    font-weight: bold;
    line-height: 1;
    border-radius: 50%;
    text-align: center;
    border: none;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.button-yellow:hover, .button-green:hover {
    background-color: #040444;
}

/* Ukloni Button */
.button-red {
    background-color: #ff6f00;
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: bold;
    border: none;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.button-red:hover {
    background-color: #ff6f00;
}

.cart-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background-color: #ff6f00;
    color: white;
    font-size: 12px;
    font-weight: bold;
    border-radius: 50%;
    padding: 2px 6px;
}

/* Sidebar */
.categories-list {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    width: 220px;
    display: none;
    position: absolute;
    top: 70px;
    left: 30px;
    z-index: 1001;
}

.categories-list.show-categories {
    display: block;
}

.categories-list h2 {
    font-size: 20px;
    margin-bottom: 15px;
    color: #143e95;
}

.categories-list ul {
    list-style: none;
    padding: 0;
}

.categories-list li {
    margin-bottom: 12px;
}

.categories-list a {
    text-decoration: none;
    color: #333;
    font-weight: bold;
}

.categories-list a:hover {
    color: #143e95;
}

/* Carousel */
.carousel {
    flex: 1;
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.carousel img {
    max-width: 100%;
    height: 300px;
    object-fit: contain;
    border-radius: 8px;
}

.slide {
    display: none;
    opacity: 0;
    transition: opacity 1s ease-in-out;
}

.slide.active {
    display: block;
    opacity: 1;
}

.prev, .next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: white;
    color: #143e95;
    font-size: 18px;
    padding: 10px;
    border-radius: 50%;
    cursor: pointer;
    border: none;
}

.prev:hover, .next:hover {
    background-color: white;
}

.prev { left: 10px; }
.next { right: 10px; }

/* Item Card */
.items-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 30px;
    padding: 30px;
    flex: 1;
}

.item-card img {
    width: auto;
    max-width: 100%;
    height: 200px;
    object-fit: contain;
    display: block;
    margin: 0 auto 15px;
}

.item-card:hover {
    transform: translateY(-5px);
}

.item-card img {
    width: 100%;
    height: 200px;
    object-fit: contain;
    border-radius: 8px;
    margin-bottom: 15px;
}

.item-card h3 {
    margin: 10px 0;
    color: #143e95;
    font-size: 20px;
}

.item-card p {
    color: #555;
    margin-bottom: 10px;
    font-size: 14px;
}

.item-actions, .form-center {
    margin-top: 15px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: center;
}

.form-inline {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
}

.input-quantity {
    width: 20px;
    padding: 8px;
    font-size: 16px;
    border: 1px solid #ccc;
    border-radius: 5px;
}

/* Cart & Checkout */
.cart-container, .checkout-container {
    background: white;
    width: 90%;
    max-width: 1000px;
    margin: 40px auto;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.05);
}

.cart-item, .checkout-list li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 0;
    border-bottom: 1px solid #eee;
    flex-wrap: wrap;
}

.cart-item img {
    width: auto;
    max-width: 80px;
    height: 80px;
    object-fit: contain;
    display: block;
    margin: 0 auto;
}

.cart-item-details {
    flex: 1;
    text-align: left;
    margin-left: 20px;
}

.cart-item-name {
    font-size: 18px;
    font-weight: bold;
    color: #333;
}

.cart-item-price {
    color: #143e95;
    font-weight: bold;
}

.cart-item-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
}

.cart-item-actions form button {
    min-width: 40px;
    height: 40px;
    padding: 0;
    font-size: 18px;
    line-height: 1;
    border-radius: 50%;
}

/* Checkout Form */
.checkout-form {
    max-width: 600px;
    margin: 0 auto;
}

.checkout-form input {
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 16px;
    width: 100%;
    margin-bottom: 10px;
}

.cart-total, .checkout-total {
    margin-top: 20px;
    font-size: 20px;
    font-weight: bold;
    text-align: right;
    color: #143e95;
}

/* Item detail page */
.item-detail-container {
    max-width: 600px;
    margin: 40px auto;
    padding: 20px;
}

.item-detail-card {
    background: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    text-align: center;
}

.item-detail-image {
    width: 100%;
    height: auto;
    border-radius: 8px;
}

.item-detail-title {
    margin-top: 20px;
    font-size: 28px;
    color: #143e95;
}

.item-detail-description {
    margin-top: 15px;
    font-size: 18px;
    color: #555;
    line-height: 1.6;
}

.item-detail-quantity {
    margin-top: 20px;
    font-size: 24px;
    color: #555;
    font-weight: bold;
}

.item-detail-price {
    margin-top: 20px;
    font-size: 24px;
    color: #143e95;
    font-weight: bold;
}

/* Footer */
footer {
    background-color: #143e95;
    color: white;
    padding: 20px;
    text-align: center;
    font-size: 14px;
}

/* Responsive Fixes */
@media (max-width: 768px) {
    .main-content, .cart-main, .checkout-main {
        padding: 10px;
        margin: 0;
    }

    .categories-list {
        position: fixed;
        top: 60px;
        left: 0;
        width: 100%;
        max-width: 100%;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    }

    .carousel img {
        height: 200px;
    }

    .form-inline {
        flex-direction: column;
        align-items: stretch;
    }

    .button-blue, .button-red, .button-green, .button-yellow,
    input[type="number"], input[type="text"], input[type="email"], input[type="tel"] {
        width: 100%;
    }
}
.cart-item-actions {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 10px;
}

.cart-item-actions form {
    margin: 0;
}

.cart-item-actions button {
    padding: 8px 12px;
    font-size: 16px;
    font-weight: bold;
    border: none;
    cursor: pointer;
    border-radius: 5px;
    transition: background-color 0.2s ease;
}

.cart-item-actions .button-yellow,
.cart-item-actions .button-green {
    width: 36px;
    height: 36px;
    padding: 0;
    font-size: 20px;
    line-height: 1;
    border-radius: 50%;
    text-align: center;
}

.cart-item-actions .button-red {
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
}
/* Improved mobile cart layout */
@media (max-width: 768px) {
    .cart-item {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .cart-item img {
        margin-bottom: 10px;
    }

    .cart-item-details {
        margin-left: 0;
        text-align: center;
    }

    .cart-item-actions {
        justify-content: center;
        flex-wrap: wrap;
        margin-top: 10px;
        gap: 10px;
    }

    .cart-item-actions form button {
        min-width: 36px;
        height: 36px;
        font-size: 18px;
        line-height: 1;
        border-radius: 50%;
        padding: 0;
        margin: 0;
    }

    .button-red {
        padding: 8px 18px;
        border-radius: 20px;
        font-size: 14px;
    }
}
.categories-list {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    width: 220px;
    display: none;
    position: absolute;
    top: 70px;
    left: 30px;
    z-index: 1001;
}

.categories-list.show-categories {
    display: block;
}

.categories-list h2 {
    font-size: 20px;
    margin-bottom: 15px;
    color: #143e95;
}

.categories-list ul {
    list-style: none;
    padding-left: 0;
    margin: 0;
}

.categories-list li {
    margin-bottom: 12px;
}

.categories-list a {
    text-decoration: none;
    color: #333;
    font-weight: bold;
}

.categories-list a:hover {
    color: #143e95;
}

@media (max-width: 768px) {
    .categories-list {
        position: fixed;
        top: 60px;
        left: 0;
        width: 100%;
        max-width: 100%;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    }
}

/* Section wrapper */
.subcategory-cards {
    margin: 30px 0;
}

/* Section heading */
.subcategory-cards h3 {
    font-size: 22px;
    color: #143e95;
    margin-bottom: 20px;
}

/* Always 2 columns with responsive wrapping */
.subcategory-card-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

/* Card style */
.subcategory-card {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    text-align: center;
    font-weight: bold;
    color: #143e95;
    text-decoration: none;
    transition: transform 0.2s, box-shadow 0.2s;
    word-wrap: break-word;
}

/* Hover effect */
.subcategory-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    background-color: #f7faff;
}

.carousel {
    position: relative;
    background: white;
    padding: 40px 20px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.carousel-inner {
    position: relative;
    width: 100%;
    max-width: 600px;
    height: 500px; /* fixed height for stable layout */
    margin: 0 auto;
}

/* Slide behavior */
.slide {
    display: none;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 20px;
    box-sizing: border-box;
}

.slide.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Slide content */
.slide-content {
    max-width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.slide-content img {
    width: auto;
    max-width: 100%;
    height: 200px;
    max-height: 100%;
    object-fit: contain;
    display: block;
    margin: 0 auto 15px;
}

.slide-content h3 {
    font-size: 20px;
    color: #143e95;
    margin: 10px 0;
}

.slide-content p {
    font-size: 14px;
    color: #555;
    margin-bottom: 8px;
}

.slide-content .button-blue {
    margin-top: 10px;
    padding: 10px 18px;
}

/* Arrows */
.carousel .prev,
.carousel .next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: white;
    color: #143e95;
    font-size: 18px; /* #ff6f00uced from 24px */
    padding: 6px;     /* #ff6f00uced from 10px */
    border-radius: 50%;
    border: none;
    cursor: pointer;
    z-index: 10;
}

.carousel .prev:hover,
.carousel .next:hover {
    background-color: white; /* or remove this if you want it transparent */
    color: #040444;
    box-shadow: none; /* Remove any glow */
}

.carousel .prev {
    left: 3px;
}

.carousel .next {
    right: 3px;
}

.carousel-wrapper {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 0; /* adds top and bottom spacing */
}


/* Responsive */
@media (max-width: 768px) {
    .carousel-inner {
        max-width: 100%;
        height: auto;
        min-height: 400px;
    }

    .slide-content img {
        height: 180px;
    }

    .slide-content {
        max-width: 90%;
    }
}

.checkout-container {
    display: flex;
    flex-direction: column;
    align-items: center; /* ✅ centers content horizontally */
    background: white;
    width: 90%;
    max-width: 1000px;
    margin: 40px auto;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.05);
    text-align: center; /* ✅ center-align text and headings */
}

.checkout-form {
    max-width: 600px;
    width: 100%;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: center;
    text-align: center;
}

.checkout-form input {
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 16px;
    width: 100%;
    max-width: 400px;
}

.checkout-total {
    margin-top: 20px;
    font-size: 20px;
    font-weight: bold;
    color: #143e95;
    text-align: center;
}

.cart-header h1 {
    text-align: center;
    font-size: 28px;
    color: #143e95;
    margin: 0;
}

.carousel-header h1 {
    text-align: center;
    font-size: 28px;
    color: #143e95;
    margin: 0;
}

.input-quantity {
    width: 38px;       /* #ff6f00uced width */
    padding: 6px;      /* Compact padding */
    font-size: 14px;   /* Slightly smaller font size */
    border: 1px solid #ccc;
    border-radius: 5px;
    text-align: center;
    background-color: #fafafa;
    margin-right: 8px;  /* Space between input and button */
    transition: border-color 0.3s, background-color 0.3s;
}

.input-quantity:focus {
    border-color: #143e95;
    background-color: #f0f8ff;
}

.input-quantity:hover {
    border-color: #040444;
}

.form-inline, .add-to-cart-form {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;  /* Consistent gap */
    margin-top: 15px;  /* Add space above form */
}

.add-to-cart-form .button-blue {
    padding: 8px 12px;  /* Adjusted for compact layout */
    font-size: 14px;
}

.item-detail-container .add-to-cart-form {
    justify-content: center;
}

.item-actions .add-to-cart-form {
    justify-content: center;
}

@media (max-width: 768px) {
    .input-quantity {
        width: 30px;  /* Further #ff6f00uced for mobile */
        padding: 5px;
        margin-right: 6px;
    }

    .add-to-cart-form .button-blue {
        padding: 6px 10px;
        font-size: 13px;
    }
}

/* Search Icon */
.search-icon {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #143e95;
    padding: 5px;
    margin-left: 10px;
}

.search-icon:hover {
    color: #040444;
}

/* Search Overlay */
.search-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}

.search-overlay.active {
    display: flex;
}

.search-form-overlay {
    display: flex;
    align-items: center;
    gap: 10px;
    background-color: #ffffff;
    padding: 15px;
    border-radius: 8px;
    width: 90%;
    max-width: 600px;
}

.search-input-overlay {
    flex-grow: 1;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 16px;
    outline: none;
}

.search-input-overlay:focus {
    border-color: #143e95;
}

.search-button-overlay {
    background-color: #143e95;
    color: #ffffff;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
}

.search-button-overlay:hover {
    background-color: #040444;
}

.close-search {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    font-size: 24px;
    color: #ffffff;
    cursor: pointer;
}

.close-search:hover {
    color: #ff4d4d;
}

@media (max-width: 768px) {
    .search-form-overlay {
        width: 95%;
        max-width: 400px;
        flex-direction: column;
        gap: 10px;
    }

    .search-input-overlay {
        width: 100%;
    }

    .search-button-overlay {
        width: 100%;
    }

    .close-search {
        font-size: 28px;
    }
}

/* Search Heading */
.search-heading {
    font-size: 24px;
    color: #143e95;
    font-weight: bold;
    margin-bottom: 20px;
    padding-left: 15px;
}

/* Items Container */
.items-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 30px;
    padding: 30px;
}

.item-card {
    background-color: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s;
    text-align: center;
}

.item-card:hover {
    transform: translateY(-5px);
}

.item-card img {
    width: 100%;
    height: 200px;
    object-fit: contain;
    margin-bottom: 15px;
}

.item-card h3 {
    font-size: 18px;
    color: #143e95;
    margin-bottom: 10px;
}

.item-card p {
    font-size: 14px;
    color: #555;
    margin-bottom: 10px;
}

.item-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: center;
}

.input-quantity {
    width: 60px;
    padding: 8px;
    text-align: center;
}

.no-results {
    font-size: 16px;
    color: #555;
    text-align: center;
    margin-top: 30px;
}

/* Mobile - Single Column */
@media (max-width: 768px) {
    .items-container, .items-grid {
        grid-template-columns: 1fr;  /* Single column */
        gap: 20px;
        padding: 15px;
    }

    .item-card {
        width: 100%;
    }

    .item-card img {
        height: 150px;  /* Adjust for smaller screens */
    }

    .item-card h3 {
        font-size: 16px;
    }

    .item-card p {
        font-size: 14px;
    }

    .input-quantity {
        width: 50px;
        padding: 5px;
    }
}

/* Desktop Grid Layout */
.items-container, .items-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 30px;
    padding: 30px;
    justify-content: center;   /* Centers the grid items */
    align-content: center;
}

/* Centering the Item Cards */
.item-card {
    position: relative;
    background-color: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    text-align: center;
    width: 250px;  /* Consistent width */
    box-sizing: border-box;
    transition: transform 0.2s;
}

.item-card:hover {
    transform: translateY(-5px);
}

.item-card img {
    width: 100%;
    height: 200px;
    object-fit: contain;
    margin-bottom: 15px;
}

.item-card h3 {
    font-size: 18px;
    color: #143e95;
    margin-bottom: 10px;
}

.item-card p {
    font-size: 14px;
    color: #555;
    margin-bottom: 10px;
}

/* Mobile - Single Column Centering */
@media (max-width: 768px) {
    .items-container, .items-grid {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 15px;
        justify-content: center;
    }

    .item-card {
        width: 100%;
        max-width: 300px;  /* Center the item card */
        margin: 0 auto;
    }
}

/* Navbar */
.navbar {
    background-color: white;
    padding: 15px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #ddd;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.burger {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #143e95;
    padding: 5px;
    margin-right: 10px;
}

.logo-container {
    flex-grow: 1;
    display: flex;
    justify-content: center;  /* Center the logo */
}

.logo-link img {
    height: 40px;
    transition: opacity 0.3s;
}

.logo-link img:hover {
    opacity: 0.8;
}

.navbar-actions {
    display: flex;
    align-items: center;
    gap: 15px;  /* Space between search and cart */
}

.search-icon {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #143e95;
    padding: 5px;
}

.search-icon:hover {
    color: #040444;
}

.nav-button {
    background-color: #143e95;
    color: white;
    padding: 10px 18px;
    border-radius: 5px;
    font-weight: bold;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.nav-button:hover {
    background-color: #040444;
}

.cart-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background-color: #ff6f00;
    color: white;
    font-size: 12px;
    font-weight: bold;
    border-radius: 50%;
    padding: 2px 6px;
}

@media (max-width: 768px) {
    .navbar {
        padding: 10px 15px;
        flex-wrap: nowrap;  /* Keep in one row */
        justify-content: space-between;  /* Distribute space */
    }

    .burger {
        order: 1;
        margin-right: 15px;
    }

    .logo-container {
        order: 2;
        flex-grow: 1;
        justify-content: start;  /* Align to the left */
        margin-bottom: 0;
    }

    .logo-link {
        display: flex;
        align-items: center;
    }

    .navbar-actions {
        order: 3;
        gap: 10px;
        flex-grow: 0;
    }
    .search-icon {
        margin-left: 0;
    }

    .nav-button {
        padding: 8px 12px;
        font-size: 14px;
    }
}

@media (min-width: 769px) {
    .navbar {
        display: grid;
        grid-template-columns: 1fr auto 1fr; /* Left | Center | Right */
        align-items: center;
    }

    .burger {
        grid-column: 1;
        justify-self: start;
    }

    .logo-container {
        grid-column: 2;
        justify-self: center;
    }

    .navbar-actions {
        grid-column: 3;
        justify-self: end;
    }
}


/* OUT OF STOCK STYLING - GRAY THEME */
.item-card.out-of-stock {
    background-color: #f6f6f6;
    border: 2px solid #ddd;
    box-shadow: 0 0 8px rgba(0, 0, 0, 0.05);
    transition: transform 0.2s ease-in-out, opacity 0.3s ease-in-out;
}

.item-card.out-of-stock:hover {
    transform: scale(1.02);
    background-color: #e9e9e9;
}

.item-card.out-of-stock img {
    opacity: 0.5;
    filter: grayscale(60%);
}

/* STOCK STATUS */
.stock-status-row {
    margin-bottom: 8px;
}

.stock-status {
    font-weight: bold;
    font-size: 18px;
    margin: 0;
}

.stock-status.in-stock {
    color: #6c757d; /* Green */
}

.stock-status.out-of-stock {
    color: #6c757d; /* Gray for cross and label */
}

.item-stock-status {
    margin: 15px 0 10px;
}

.stock-status {
    font-weight: bold;
    font-size: 18px;
    margin: 0;
}

.stock-status.in-stock {
    color: #6c757d; /* Green */
}

.stock-status.out-of-stock {
    color: #6c757d; /* Gray */
}

.subcategory-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
    padding: 0 30px;
}

.subcategory-cards h1 {
    font-size: 28px;
    color: #143e95;
    margin-bottom: 30px;
    text-align: center;
}


@media (min-width: 1024px) {
    .subcategory-card-grid {
        grid-template-columns: repeat(3, 1fr); /* Use more horizontal space on large screens */
    }
}

.search-icon {
    background-color: #143e95;
    border: none;
    width: 40px;           /* Button size */
    height: 40px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 0;
    transition: background-color 0.3s ease;
}

.search-icon:hover {
    background-color: #040444;
}

.search-icon-img {
    width: 13px;           /* Icon size */
    height: 13px;
    display: block;
}

@media (max-width: 768px) {
    .nav-button {
        height: 40px;
        padding: 0 14px; /* balance the text without changing height */
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .search-icon {
        width: 40px;
        height: 40px;
    }
}

.no-linkify {
    pointer-events: none;
    text-decoration: none;
    color: inherit;
}

.stock-status {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: bold;
    font-size: 16px;
    color: #6c757d;
    margin: 0;
}

.stock-icon {
    width: 22px !important;
    height: 22px !important;
    object-fit: contain;
    vertical-align: middle;
    position: relative;
    top: 6px; /* Adjust this value up/down until it aligns perfectly */
}

.item-stock-status {
    display: flex;
    justify-content: center; /* horizontally center */
    margin: 15px 0;
}

.stock-status-detail {
    display: inline-flex;
    align-items: center; /* aligns icon & text vertically */
    gap: 8px;
    font-weight: bold;
    font-size: 18px;
    color: #6c757d;
    margin: 0;
}

.stock-icon-detail {
    width: 28px !important;
    height: 28px !important;
    object-fit: contain;
    display: inline-block;
}

.in-stock {
    color: #6c757d;
}

.out-of-stock {
    color: #6c757d;
}

.quantity-control {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.quantity-control .button-yellow,
.quantity-control .button-green {
    width: 36px;
    height: 36px;
    font-size: 20px;
    line-height: 1;
    padding: 0;
    border-radius: 50%;
    text-align: center;
}

.quantity-control .input-quantity {
    width: 40px; /* smaller */
    padding: 6px;
    text-align: center;
    font-size: 14px;
    border: 1px solid #ccc;
    border-radius: 5px;
    background-color: #fafafa;
    transition: border-color 0.3s, background-color 0.3s;
}

.quantity-control input.input-quantity {
    margin: 0 4px; /* even spacing between buttons */
}


.add-to-cart-form {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.add-to-cart-button-wrapper {
    margin-top: 10px;
    display: flex;
    justify-content: center;
}

/* Hide number input arrows for Chrome, Safari, Edge, Opera */
input[type=number]::-webkit-inner-spin-button,
input[type=number]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.footer-wrapper {
    background-color: #143e95;
    color: white;
    font-size: 14px;
    text-align: center;
    padding-top: 20px;
}

.footer-top {
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    padding-bottom: 10px;
    margin-bottom: 10px;
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
}

.footer-links li a {
    color: white;
    text-decoration: none;
    font-weight: bold;
    transition: color 0.3s;
}

.footer-links li a:hover {
    color: #ffcc00;
}

.footer-bottom {
    padding: 10px 0 20px;
}

/* Ensure the main layout stacks vertically on small screens */
@media (max-width: 768px) {
    .main-content {
        flex-direction: column;
    }

    .privacy-policy-container {
        padding: 1em;
        font-size: 1rem;
    }

    .privacy-policy-content {
        line-height: 1.6;
        font-size: 0.95rem;
    }

    h1, h2 {
        font-size: 1.3rem;
        margin-top: 1em;
    }
}

.original-price {
    text-decoration: line-through;
    color: #999;
    margin-right: 8px;
}

.discounted-price {
    color: #ff6f00;
    font-weight: bold;
}

.sale-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: #ff6f00;
    color: white;
    padding: 6px 12px;
    font-size: 16px;
    font-weight: bold;
    border-radius: 6px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
    z-index: 10;
}

.discount-percentage {
    color: #ff6f00;
    font-weight: bold;
    margin-left: 6px;
    font-size: 14px;
}

.image-wrapper {
    position: relative;
    display: inline-block;
    width: 100%;
}

.carousel-image-wrapper {
  position: relative;
  display: block;
  width: 100%;
  height: 300px; /* same height as .carousel img */
  overflow: hidden;
}

.carousel-image-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.sale-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: #ff6f00;
    color: white;
    padding: 6px 12px;
    font-size: 16px;
    font-weight: bold;
    border-radius: 6px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
    z-index: 10;
}

.price-section {
  margin: 10px 0;
  font-size: 18px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
}

.original-price {
  text-decoration: line-through;
  color: #999;
}

.discounted-price {
  color: #ff6f00;
  font-weight: bold;
}

.discount-percentage {
  color: #ff6f00;
  font-weight: bold;
  font-size: 16px;
}

.carousel-inner {
  position: relative;
}

.carousel-sale-badge {
  position: absolute;
  top: 0;
  right: 0;
  background: #ff6f00;
  color: white;
  padding: 6px 12px;
  font-size: 16px;
  font-weight: bold;
  border-bottom-left-radius: 8px;
  z-index: 20;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

@media (max-width: 768px) {
  .carousel-sale-badge {
    font-size: 13px;
    padding: 5px 10px;
  }
}

/* Truncate name to 2 lines */
.item-card h3 {
    font-size: 18px;
    color: #143e95;
    margin-bottom: 10px;
    display: -webkit-box;
    -webkit-line-clamp: 2; /* ✅ 2 lines */
    line-clamp: 2; /* Standard property for compatibility */
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Truncate description to 3 lines */
.item-card p:nth-of-type(1) {
    font-size: 14px;
    color: #555;
    margin-bottom: 10px;
    display: -webkit-box;
    -webkit-line-clamp: 3; /* ✅ 3 lines */
    line-clamp: 3; /* Standard property for compatibility */
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

