/* Basic Reset & Body Styles (adjust to match your existing style.css) */
body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f4f4f4;
    color: #333;
}

/* Header & Navigation (Responsive) */
header {
    background-color: #333;
    color: #fff;
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

/* Navbar Base */
.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem;
  background-color: #111;
  color: #fff;
  position: sticky;
  top: 0;
  z-index: 9999;
}

/* Logo styling (optional) */
.logo {
  font-size: 1.5rem;
  font-weight: bold;
  letter-spacing: 1px;
}

/* Nav Links */
.nav-links {
  list-style: none;
  display: flex;
  gap: 1rem;
}

.nav-links a {
  text-decoration: none;
  color: white;
  font-weight: 600;
}

/* Hamburger hidden by default */
.hamburger-menu {
  display: none;
  font-size: 1.8rem;
  cursor: pointer;
}

/* Mobile Styles */
@media (max-width: 768px) {
  .hamburger-menu {
    display: block;
  }

  .nav-links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background-color: #222;
    flex-direction: column;
    align-items: flex-end;
    padding: 1rem;
    display: none;
  }

  .nav-links.active {
    display: flex;
  }

  .nav-links li {
    margin: 0.5rem 0;
  }
}
.nav-close-btn {
  font-size: 2rem;
  font-weight: bold;
  color: #fff;
  text-align: right;
  padding: 1rem;
  cursor: pointer;
  display: none; /* hidden on desktop */
}

/* Show only on small screens */
@media (max-width: 768px) {
  .nav-close-btn {
    display: block;
  }
}

/* Applies to all screen sizes */
.nav-links a {
  display: block;
  padding: 0.75rem 1rem; /* Reduce vertical padding */
  margin: 0; /* Remove any vertical gaps */
  text-align: left;
  text-decoration: none;
  color: white;
  font-size: 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1); /* optional subtle divider */
}

/* Mobile-specific adjustments */
@media (max-width: 768px) {
  .nav-links {
    padding: 1rem;
    gap: 0; /* Remove gap if you're using flex/grid */
  }

  .nav-links a {
    padding: 0.6rem 1rem; /* Smaller padding for mobile */
    font-size: 1rem;       /* Adjust font size if needed */
  }
}


/* nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

nav .logo {
    font-size: 1.8em;
    font-weight: bold;
    color: #fff;
    z-index: 1001; 
} */



/* Cart visibility */
.hidden {
  display: none !important;
}

/* Modal visibility control */
.modal-hidden {
  display: none;
}
.modal-visible {
  display: block;
  position: fixed;
  top: 0; left: 0; width: 100%; height: 100%;
  background: rgba(0,0,0,0.5);
  z-index: 999;
}

/* Modal content styling */
.modal-content {
  background: #fff;
  padding: 2rem;
  max-width: 500px;
  margin: 10% auto;
  border-radius: 10px;
  position: relative;
}



/* .visible {
  display: flex !important;
} */


/* .hidden { display: none !important; } */


/* --- Media Queries for Mobile Responsiveness --- */

/* For screens smaller than 992px (typical tablet landscape and smaller) */
@media (max-width: 991px) {
    nav {
        padding: 0 15px; /* Adjust padding */
    }

    /* Show hamburger menu on mobile */
    .hamburger-menu {
        display: block;
    }

    /* Hide desktop nav and prepare for mobile menu */
    nav .nav-links {
        display: none; /* Hidden by default on mobile */
        flex-direction: column;
        width: 100%;
        background-color: #333; /* Same background as header */
        position: absolute;
        top: 0; /* Position just below the header bar or at the top */
        left: 0;
        height: 100vh; /* Cover full screen height */
        justify-content: center; /* Center links vertically */
        align-items: center;
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.3s ease-in-out;
        box-shadow: 0 5px 15px rgba(0,0,0,0.5);
    }

    /* Active state for mobile menu */
    nav .nav-links.active {
        display: flex; /* Show when active */
        opacity: 1;
        pointer-events: auto;
    }

    nav .nav-links li {
        margin: 15px 0; /* Space out links vertically */
    }

    nav .nav-links a {
        font-size: 1.5em; /* Larger text for mobile */
        padding: 10px 20px;
        display: block; /* Make entire li clickable area */
    }

    /* Shop container layout adjustment */
    .shop-container {
        flex-direction: column; /* Stack sidebar and product grid */
        padding: 15px;
    }
    .sidebar {
        flex: none; /* Remove fixed width */
        width: 100%; /* Full width */
        position: static; /* No longer sticky */
        margin-bottom: 30px;
    }
    .hero-shop h1 {
        font-size: 2.5em;
    }
    .hero-shop p {
        font-size: 1em;
    }
    .product-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); /* Slightly smaller cards */
        gap: 20px;
    }
    #shopping-cart {
        width: 300px; /* Smaller cart width */
    }
}

/* For screens smaller than 768px (typical tablet portrait / large phone) */
@media (max-width: 767px) {
    .hero-shop {
        padding: 60px 15px;
    }
    .hero-shop h1 {
        font-size: 2em;
    }
    .hero-shop p {
        font-size: 0.9em;
    }
    .product-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); /* Even smaller cards */
        gap: 15px;
    }
    .product-card img {
        height: 160px;
    }
    .product-card h3 {
        font-size: 1.1em;
    }
    .product-card .price {
        font-size: 1.2em;
    }
    #toggle-cart-btn {
        padding: 12px 18px;
        font-size: 1em;
    }
    #shopping-cart {
        width: 280px; /* Even smaller cart */
        padding: 15px;
    }
    .modal-content {
        padding: 20px;
        width: 95%;
    }
    .form-group input, .form-group textarea {
        width: calc(100% - 20px); /* Adjust for smaller padding */
    }
}

/* For screens smaller than 480px (typical mobile devices) */
@media (max-width: 480px) {
    .hero-shop {
        padding: 40px 10px;
    }
    .hero-shop h1 {
        font-size: 1.8em;
    }
    /* Grid adjustments for very small screens */
    .product-grid {
        grid-template-columns: 1fr; /* Single column */
        gap: 20px;
    }
    .product-card {
        max-width: 300px; /* Constrain width for single column */
        margin: 0 auto; /* Center cards */
    }
    #shopping-cart {
        width: calc(100% - 40px); /* Full width minus padding */
        right: 20px;
        left: 20px; /* Center it */
    }
    .shopping-cart-wrapper {
        right: 10px; /* Adjust button position */
        bottom: 10px;
    }
    #toggle-cart-btn {
        padding: 10px 15px;
        font-size: 0.9em;
    }
}


/* Hero Section for Shop Page */
.hero-shop {
    background: url('../assets/images/placeholder_shop_hero.jpg') no-repeat center center/cover; /* Placeholder hero image */
    color: #fff;
    text-align: center;
    padding: 80px 20px;
    margin-bottom: 30px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.7);
}

.hero-shop h1 {
    font-size: 3em;
    margin-bottom: 15px;
}

.hero-shop p {
    font-size: 1.2em;
    max-width: 800px;
    margin: 0 auto;
}

/* Main Shop Layout */
.products-main-content {
    min-height: calc(100vh - 200px); /* Ensure content pushes footer down */
    padding-bottom: 80px; /* Space for fixed cart button */
}

.shop-container {
    display: flex;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    gap: 30px;
}

.sidebar {
    flex: 0 0 250px; /* Fixed width for sidebar */
    background-color: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    height: fit-content; /* Adjust height based on content */
    position: sticky; /* Sticky sidebar */
    top: 90px; /* Adjust based on header height */
}

.sidebar h2 {
    font-size: 1.5em;
    margin-top: 0;
    margin-bottom: 20px;
    color: #555;
}

.sidebar ul {
    list-style: none;
    padding: 0;
    margin-bottom: 30px;
}

.sidebar ul li {
    margin-bottom: 10px;
}

.sidebar ul li a {
    text-decoration: none;
    color: #555;
    font-weight: 500;
    padding: 5px 0; /* Add padding for clickability */
    display: block; /* Make whole area clickable */
    transition: color 0.3s ease;
}

.sidebar ul li a:hover,
.sidebar ul li a.active {
    color: #ffd700;
}

/* Price Filter */
.price-filter input[type="range"] {
    width: 100%;
    margin-bottom: 10px;
}
.price-filter p {
    text-align: center;
    font-weight: bold;
}

/* Sort By */
.sidebar select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    background-color: #f9f9f9;
}

/* Product Grid */
.product-grid {
    flex: 1; /* Takes remaining space */
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
}

.product-card {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    overflow: hidden;
    text-align: center;
    transition: transform 0.2s ease;
    display: flex;
    flex-direction: column;
}

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

.product-card img {
    width: 100%;
    height: 200px; /* Fixed height for consistency */
    object-fit: cover; /* Ensures image covers area without distortion */
    border-bottom: 1px solid #eee;
}

.product-card-content {
    padding: 15px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.product-card h3 {
    font-size: 1.3em;
    margin-top: 0;
    margin-bottom: 10px;
    color: #333;
}

.product-card p {
    font-size: 0.9em;
    color: #666;
    margin-bottom: 10px;
}

.product-card .price {
    font-size: 1.4em;
    font-weight: bold;
    color: #007bff; /* A nice blue for price */
    margin-bottom: 15px;
}

.product-card .add-to-cart-btn {
    background-color: #28a745; /* Green for add to cart */
    color: #fff;
    border: none;
    padding: 10px 15px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1em;
    transition: background-color 0.3s ease;
}

.product-card .add-to-cart-btn:hover {
    background-color: #218838;
}

/* Shopping Cart */
.shopping-cart-wrapper {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1050;
}

#toggle-cart-btn {
    background-color: #007bff;
    color: #fff;
    border: none;
    padding: 15px 20px;
    border-radius: 30px;
    font-size: 1.1em;
    cursor: pointer;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    display: flex;
    align-items: center;
    gap: 10px;
    transition: background-color 0.3s ease;
}

#toggle-cart-btn:hover {
    background-color: #0056b3;
}

#shopping-cart {
    position: fixed;
    top: 60px; /* adjust if your nav is taller */
    right: 0;
    width: 300px;
    max-height: calc(100vh - 60px); /* fit in viewport */
    overflow-y: auto;
    background-color: white;
    border-left: 1px solid #ccc;
    box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
    z-index: 999;
    display: none;
}

#shopping-cart.visible {
    display: block;
}


#shopping-cart h2 {
    margin-top: 0;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
    margin-bottom: 20px;
    color: #333;
}

@media(max-width: 767px){
#shopping-cart{
    width: 300px;
    padding: 15px

}
}
@media(max-width: 480){
    .shopping-cart-wrapper{
        bottom: 15px;
        right: 15px;
        left: 15px;
        width:calc(100% - 30px);
    }

    #shopping-cart{
        width: calc(100vw -30px);
        left: 15px;
        right: 15px;

        bottom: calc(100% + 10px);
        max-height: 70vh;
    }
}
#cart-items {
    list-style: none;
    padding: 0;
    margin: 0;
    flex-grow: 1;
}

.cart-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px dashed #eee;
}

.cart-item:last-child {
    border-bottom: none;
}

.cart-item-info {
    flex-grow: 1;
}

.cart-item-info h4 {
    margin: 0 0 5px 0;
    font-size: 1em;
    color: #333;
}

.cart-item-info p {
    margin: 0;
    font-size: 0.9em;
    color: #666;
}

.cart-item-quantity {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-left: 10px;
}

.cart-item-quantity button {
    background-color: #ddd;
    border: none;
    padding: 5px 8px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9em;
    transition: background-color 0.2s;
}

.cart-item-quantity button:hover {
    background-color: #ccc;
}

.cart-item .remove-item-btn {
    background-color: #dc3545; /* Red for remove */
    color: #fff;
    border: none;
    padding: 5px 8px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9em;
    margin-left: 10px;
    transition: background-color 0.3s ease;
}

.cart-item .remove-item-btn:hover {
    background-color: #c82333;
}

.cart-summary {
    border-top: 1px solid #eee;
    padding-top: 15px;
    margin-top: 20px;
    text-align: right;
}

.cart-summary p {
    font-size: 1.3em;
    font-weight: bold;
    margin-bottom: 15px;
    color: #333;
}

.cart-summary .btn-primary {
    background-color: #007bff;
    color: #fff;
    border: none;
    padding: 12px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1.1em;
    transition: background-color 0.3s ease;
    width: 100%;
}

.cart-summary .btn-primary:hover {
    background-color: #0056b3;
}

.cart-summary .btn-primary:disabled {
    background-color: #cccccc;
    cursor: not-allowed;
}

.empty-cart-message {
    text-align: center;
    color: #888;
    padding: 20px 0;
}

/* Modal for Order Form */
.modal {
    display: none; /* Hidden by default */
    position: fixed; /* Stay in place */
    z-index: 2000; /* Sit on top */
    left: 0;
    top: 0;
    width: 100%; /* Full width */
    height: 100%; /* Full height */
    overflow: auto; /* Enable scroll if needed */
    background-color: rgba(0,0,0,0.6); /* Black w/ opacity */
    justify-content: center;
    align-items: center;
}

.modal.visible {
    display: flex;
}

.modal-content {
    background-color: #fefefe;
    margin: auto;
    padding: 30px;
    border-radius: 10px;
    width: 90%;
    max-width: 600px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    position: relative;
}

.modal-content h2 {
    margin-top: 0;
    color: #333;
    text-align: center;
    margin-bottom: 25px;
}

.close-button {
    color: #aaa;
    position: absolute;
    top: 15px;
    right: 25px;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close-button:hover,
.close-button:focus {
    color: #000;
    text-decoration: none;
    cursor: pointer;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    color: #555;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="tel"],
.form-group textarea {
    width: calc(100% - 22px); /* Account for padding and border */
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1em;
}

.form-group textarea {
    resize: vertical;
}

.modal-content .btn-primary {
    background-color: #007bff;
    color: #fff;
    border: none;
    padding: 12px 25px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1.1em;
    display: block;
    width: 100%;
    margin-top: 20px;
    transition: background-color 0.3s ease;
}

.modal-content .btn-primary:hover {
    background-color: #0056b3;
}

/* Footer (copy from your style.css or simplify) */
footer {
    background-color: #333;
    color: #fff;
    text-align: center;
    padding: 20px 0;
    margin-top: 50px;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.social-links a {
    color: #fff;
    font-size: 1.5em;
    margin: 0 10px;
    text-decoration: none;
    transition: color 0.3s ease;
}

.social-links a:hover {
    color: #ffd700;
}

/* --- Responsive Design --- */

/* For screens smaller than 992px (typical tablet landscape) */
@media (max-width: 991px) {
    nav .nav-links li {
        margin-left: 15px; /* Reduce margin */
    }
    .shop-container {
        flex-direction: column; /* Stack sidebar and product grid */
        padding: 15px;
    }
    .sidebar {
        flex: none; /* Remove fixed width */
        width: 100%; /* Full width */
        position: static; /* No longer sticky */
        margin-bottom: 30px;
    }
    .hero-shop h1 {
        font-size: 2.5em;
    }
    .hero-shop p {
        font-size: 1em;
    }
    .product-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); /* Slightly smaller cards */
        gap: 20px;
    }
    /* #shopping-cart {
        width: 300px; 
    } */
}

/* For screens smaller than 768px (typical tablet portrait / large phone) */
@media (max-width: 767px) {
    nav {
        flex-direction: column; /* Stack logo and nav links */
        align-items: flex-start;
    }
    nav .nav-links {
        justify-content: flex-start;
        margin-top: 15px;
    }
    nav .nav-links li {
        margin-left: 0;
        margin-right: 15px; /* Add some right margin */
        margin-bottom: 10px; /* More space when wrapping */
    }
    .hero-shop {
        padding: 60px 15px;
    }
    .hero-shop h1 {
        font-size: 2em;
    }
    .hero-shop p {
        font-size: 0.9em;
    }
    .product-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); /* Even smaller cards */
        gap: 15px;
    }
    .product-card img {
        height: 160px;
    }
    .product-card h3 {
        font-size: 1.1em;
    }
    .product-card .price {
        font-size: 1.2em;
    }
    #toggle-cart-btn {
        padding: 12px 18px;
        font-size: 1em;
    }
    #shopping-cart {
        width: 280px; /* Even smaller cart */
        padding: 15px;
    }
    .modal-content {
        padding: 20px;
        width: 95%;
    }
    .form-group input, .form-group textarea {
        width: calc(100% - 20px); /* Adjust for smaller padding */
    }
}

/* For screens smaller than 480px (typical mobile devices) */
@media (max-width: 480px) {
    nav .nav-links {
        display: block; /* Stack links vertically */
        width: 100%;
        text-align: center;
    }
    nav .nav-links li {
        margin: 0 0 10px 0; /* Center and stack */
    }
    nav .nav-links a {
        display: block; /* Make links full width */
        padding: 10px 0;
        background-color: rgba(255,255,255,0.1); /* Slight background for readability */
        border-radius: 5px;
    }
    .hero-shop {
        padding: 40px 10px;
    }
    .hero-shop h1 {
        font-size: 1.8em;
    }
    .hero-grid {
        grid-template-columns: 1fr; /* Single column layout for very small screens */
    }
    .product-grid {
        grid-template-columns: 1fr; /* Single column */
        gap: 20px;
    }
    .product-card {
        max-width: 300px; /* Constrain width for single column */
        margin: 0 auto; /* Center cards */
    }
    /* #shopping-cart {
        width: calc(100% - 40px); 
        right: 20px;
        left: 20px;
    }
    .shopping-cart-wrapper {
        right: 10px; 
        bottom: 10px;
    } */
    #toggle-cart-btn {
        padding: 10px 15px;
        font-size: 0.9em;
    }
}

.nav-links {
    display: none;
}

.nav-links.active {
    display: block;
}