/* General Styling */
body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f4f4f4;
    color: #333;
    overflow-x: hidden; /* Prevent horizontal scroll from slide-in cart */
}

header {
    background-color: #333;
    color: #fff;
    padding: 15px 0;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    position: sticky;
    top: 0;
    z-index: 1000;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.logo {
    font-size: 1.8em;
    font-weight: bold;
}

.nav-links {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
}

.nav-links li {
    margin-right: 25px;
}

.nav-links a {
    color: #fff;
    text-decoration: none;
    font-weight: bold;
    transition: color 0.3s ease;
}

.nav-links a:hover,
.nav-links a.active {
    color: #ffd700; /* Gold color for active/hover */
}

.cart-icon {
  position: relative;
  cursor: pointer;
  font-size: 1.5em;
  padding: 5px; /* Make clickable area larger */
}

#cart-count {
  background-color: #ff4500; /* Orange-red */
  color: #fff;
  border-radius: 50%;
  padding: 3px 7px;
  font-size: 0.7em;
  position: absolute;
  top: -10px;
  right: -10px;
}

/* Main Shop Container */
.shop-container {
    display: flex;
    max-width: 1200px;
    margin: 20px auto;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    min-height: 70vh;
    position: relative; /* For positioning cart sidebar */
    overflow: hidden; /* Hide overflowing cart when closed */
}

/* Sidebar Styling */
.sidebar {
    width: 250px;
    padding: 20px;
    border-right: 1px solid #eee;
}

.sidebar h3 {
    margin-top: 0;
    color: #555;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
    margin-bottom: 20px;
}

.categories-list {
    list-style: none;
    padding: 0;
    margin-bottom: 30px;
}

.categories-list li {
    padding: 10px 0;
    cursor: pointer;
    transition: color 0.2s ease;
}

.categories-list li:hover,
.categories-list li.active {
    color: #007bff; /* Blue */
    font-weight: bold;
}

.price-filter {
    margin-bottom: 30px;
}

#price-range {
    width: 100%;
    margin-top: 10px;
}

#max-price-display {
    font-weight: bold;
    color: #007bff;
}

#sort-by {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1em;
}

/* Products Grid */
.products-grid {
    flex-grow: 1;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    padding: 20px;
}

.product-card {
    background-color: #fff;
    border: 1px solid #eee;
    border-radius: 8px;
    padding: 15px;
    text-align: center;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.product-card img {
    max-width: 100%;
    height: 180px;
    object-fit: contain;
    margin-bottom: 15px;
    border-radius: 4px;
}

.product-card h4 {
    margin: 10px 0;
    font-size: 1.2em;
    color: #333;
}

.product-card p {
    font-size: 1.1em;
    color: #007bff;
    font-weight: bold;
    margin-bottom: 15px;
}

.product-card button {
    background-color: #28a745; /* Green */
    color: #fff;
    border: none;
    padding: 10px 15px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1em;
    transition: background-color 0.3s ease;
}

.product-card button:hover {
    background-color: #218838;
}

/* Cart Sidebar Styling */
.cart-sidebar {
    position: absolute; /* Changed to absolute for slide-in effect */
    top: 0;
    right: 0;
    width: 350px; /* Slightly wider for better content display */
    height: 100%; /* Take full height of shop-container */
    background-color: #f9f9f9;
    border-left: 1px solid #eee;
    padding: 20px;
    display: flex;
    flex-direction: column;
    box-shadow: -5px 0 10px rgba(0, 0, 0, 0.1);
    transform: translateX(100%); /* Initially off-screen */
    transition: transform 0.3s ease-out; /* Smooth slide-in/out */
    z-index: 999; /* Above products grid but below header */
}

.cart-sidebar.open {
    transform: translateX(0); /* Slide into view */
}

.cart-sidebar h2 {
    margin-top: 0;
    color: #555;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
    margin-bottom: 20px;
}

.close-cart-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    font-size: 1.5em;
    cursor: pointer;
    color: #777;
    transition: color 0.2s ease;
}

.close-cart-btn:hover {
    color: #333;
}

.cart-items {
    flex-grow: 1;
    overflow-y: auto; /* Enable scrolling if too many items */
    max-height: calc(100% - 150px); /* Adjust based on header/footer and summary height */
    margin-bottom: 15px;
}

.empty-cart-message {
    text-align: center;
    color: #777;
    margin-top: 50px;
}

.cart-item {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
    border-bottom: 1px dashed #eee;
    padding-bottom: 10px;
}

.cart-item:last-child {
    border-bottom: none;
}

.cart-item img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    margin-right: 10px;
    border-radius: 4px;
}

.cart-item-details {
    flex-grow: 1;
}

.cart-item-details h5 {
    margin: 0;
    font-size: 1em;
    color: #333;
}

.cart-item-details p {
    margin: 5px 0 0;
    font-size: 0.9em;
    color: #777;
}

.cart-item-quantity {
    display: flex;
    align-items: center;
    margin-left: 10px;
}

.cart-item-quantity button {
    background-color: #ddd;
    border: none;
    padding: 5px 8px;
    cursor: pointer;
    border-radius: 3px;
    font-weight: bold;
    font-size: 0.9em;
}

.cart-item-quantity span {
    margin: 0 8px;
    font-weight: bold;
}

.remove-item {
    background-color: #dc3545; /* Red */
    color: #fff;
    border: none;
    padding: 5px 8px;
    border-radius: 3px;
    cursor: pointer;
    font-size: 0.8em;
    margin-left: 10px;
}

.cart-summary {
    margin-top: auto; /* Push to bottom */
    padding-top: 15px;
    border-top: 1px solid #eee;
    text-align: right;
}

.cart-summary p {
    font-size: 1.3em;
    font-weight: bold;
    margin-bottom: 15px;
}

.contact-checkout-button { /* Renamed from .checkout-button */
    background-color: #007bff; /* Blue */
    color: #fff;
    border: none;
    padding: 12px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1.1em;
    width: 100%;
    transition: background-color 0.3s ease;
}

.contact-checkout-button:hover {
    background-color: #0056b3;
}


/* Contact/Inquiry Section */
.contact-inquiry-section {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%; /* Full width of shop-container */
  /* height: 100%; */
  background-color: #fff;
  padding: 20px;
  box-sizing: border-box;
  transform: translateX(100%); /* Initially off-screen right */
  transition: transform 0.3s ease-out;
  z-index: 100; /* Above product grid */
  display: flex; /* Use flexbox for content arrangement */
  flex-direction: column;
}
.contact-inquiry-section.open {
  transform: translateX(0); /* Slide into view */
}

.contact-inquiry-section h2 {
  text-align: center;
  color: #333;
  margin-top: 20px;
  margin-bottom: 15px;
  font-size: 2em;
}

.contact-inquiry-section p {
  text-align: center;
  color: #666;
  margin-bottom: 30px;
}

.back-to-shop-btn {
  background: none;
  border: none;
  color: #007bff;
  font-size: 1.1em;
  cursor: pointer;
  padding: 5px 10px;
  margin-bottom: 20px;
  align-self: flex-start; /* Align to the start of the flex container */
}

.back-to-shop-btn:hover {
  text-decoration: underline;
}

#contact-form {
  max-width: 600px;
  margin: 0 auto;
  width: 100%;
}

#contact-form .form-group {
  margin-bottom: 20px;
}

#contact-form label {
  display: block;
  margin-bottom: 8px;
  font-weight: bold;
  color: #555;
}

#contact-form input[type="text"],
#contact-form input[type="email"],
#contact-form textarea {
  width: 100%;
  padding: 12px;
  border: 1px solid #ddd;
  border-radius: 5px;
  font-size: 1em;
  box-sizing: border-box;
}

#contact-form textarea {
  resize: vertical;
  min-height: 150px;
}

.send-inquiry-button {
  background-color: #28a745; /* Green */
  color: #fff;
  border: none;
  padding: 15px 25px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 1.2em;
  width: 100%;
  margin-top: 15px;
  transition: background-color 0.3s ease, transform 0.1s ease;
}

/* ============= Contact Options =================== */


.send-inquiry-button:hover {
  background-color: #218838;
  transform: translateY(-2px);
}

.send-inquiry-button:active {
  transform: translateY(0);
}

.contact-status-message {
  text-align: center;
  margin-top: 20px;
  padding: 15px;
  border-radius: 5px;
  font-weight: bold;
  display: none;
}

.contact-status-message.success {
  background-color: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

.contact-status-message.error {
  background-color: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}
.contact-social-options {
  text-align: center;
  align-items: center;
  justify-content: center;
  h3{
    font-size: 25px;
  }
  ul{
    align-items: center;
    justify-content: center;
    padding: 1em 1em;
    gap: 2em;
    li a i{
      font-size: 2em;
    }
  }
}


/* Responsive Adjustments */
@media (max-width: 768px) {
  .sidebar {
    width: 100%;
    border-right: none;
    border-bottom: 1px solid #eee;
    order: -1; /* Move sidebar above products grid on small screens */
  }

  .shop-container {
    flex-direction: column;
  }

  .products-grid {
    padding: 15px;
  }

  .product-card {
    max-width: 100%; /* Allow cards to take full width */
  }

  .cart-sidebar {
    width: 100%; /* Full width on smaller screens */
    height: 100vh; /* Full viewport height */
    top: 0;
    left: 0;
    transform: translateX(100%); /* Still slides from right */
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
  }

  .contact-inquiry-section {
    width: 100%;
    height: 100vh;
    top: 0;
    left: 0;
    transform: translateX(100%);
    padding: 15px;
    justify-content: flex-start; /* Align content to top */
  }

  .contact-inquiry-section h2 {
    font-size: 1.8em;
  }

  .back-to-shop-btn {
    margin-top: 10px;
  }
}