:root {
  --primary-bg: #f9fdf9; /* Organic White */
  --earth-green: #1a531a; /* Forest Green */
  --accent: #d35400; /* Burnt Orange (AB style) */
  --text: #2c3e50;
  --card-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

body {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  background-color: var(--primary-bg);
  color: var(--text);
  margin: 0;
  padding: 20px;
}

.main-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 5%;
  background-color: #fff;
  border-bottom: 2px solid var(--earth-green);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.user-actions {
  display: flex;
  align-items: center;
  gap: 30px; /* This creates a clear 30px gap between Login and Cart */
}

.auth-btn {
  text-decoration: none;
  color: var(--earth-green);
  font-weight: 600;
  border: 2px solid var(--earth-green);
  padding: 8px 20px;
  border-radius: 50px;
  white-space: nowrap; /* Prevents button text from wrapping */
  transition: 0.3s;
}

.auth-btn:hover {
  background-color: var(--earth-green);
  color: white;
}

.cart-container {
  display: flex;
  align-items: center;
  cursor: pointer;
  position: relative;
}

#cart-count {
  background: var(--accent);
  color: white;
  font-size: 0.75rem;
  padding: 2px 6px;
  border-radius: 50%;
  position: absolute;
  top: -10px;
  right: -15px;
}

.brand-name {
  color: var(--earth-green);
  margin: 0;
  font-size: 1.8rem;
  letter-spacing: -1px;
}

.ab_tagline {
  color: var(--accent);
}


/* Hero Carousel Styling */
.hero-carousel {
    position: relative;
    width: 100%;
    height: 550px;
    border-radius: 20px;
    overflow: hidden;
    margin-bottom: 40px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.carousel-track {
    width: 100%;
    height: 100%;
    position: relative;
}

.hero-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1s ease-in-out;
    display: flex;
    align-items: center;
}

.hero-slide.active {
    opacity: 1;
    z-index: 1;
}

.hero-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to right, rgba(0, 0, 0, 0.827) 30%, transparent);
    display: flex;
    align-items: center;
    padding: 0 60px;
}

.hero-content {
    max-width: 500px;
    color: white;
}

.hero-label {
    background: #2e7d32; /* Earth Green from your success modal */
    color: white;
    padding: 5px 15px;
    border-radius: 50px;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.hero-content h1 {
    font-size: 3rem;
    margin: 15px 0;
    line-height: 1.1;
}

.hero-content p {
    font-size: 1.1rem;
    margin-bottom: 25px;
    opacity: 0.9;
}

/* .hero-btn {
    padding: 12px 35px;
    background: #8e7355; 
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.3s;
} */

/* .hero-btn:hover {
    transform: translateY(-3px);
} */

.carousel-dots {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    display: flex;
    gap: 10px;
}

.dot {
    width: 12px;
    height: 12px;
    background: rgba(255,255,255,0.5);
    border-radius: 50%;
    cursor: pointer;
}

.dot.active {
    background: white;
    width: 30px;
    border-radius: 10px;
}






.store-container {
  /* This creates the 'gap' so items aren't stuck to the header */
  margin-top: 50px;
  padding: 0 6%; /* Keeps the content aligned with the header sides */
  max-width: 1400px;
  margin-left: auto;
  margin-right: auto;
}

.section-title {
  font-size: 1.8rem;
  color: var(--earth-green);
  margin-bottom: 30px;
  font-family: "Segoe UI", sans-serif;
  position: relative;
  display: inline-block;
}

/* Adds a small decorative line under the title for that "premium" feel */
.section-title::after {
  content: "";
  display: block;
  width: 50px;
  height: 4px;
  background-color: var(--accent);
  margin-top: 8px;
  border-radius: 2px;
}

/* filter bar style */

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  margin-bottom: 20px;
}

.filter-btn {
  padding: 10px 20px;
  border: 1px solid var(--earth-green);
  background: transparent;
  color: var(--earth-green);
  border-radius: 25px;
  cursor: pointer;
  font-weight: 600;
  transition: 0.3s;
}

.filter-btn.active,
.filter-btn:hover {
  background: var(--earth-green);
  color: white;
}

.search-area {
  display: flex;
  gap: 10px;
  margin-bottom: 40px;
  max-width: 600px;
}

#product-search {
  flex: 1;
  padding: 12px 20px;
  border: 2px solid #eee;
  border-radius: 8px;
  outline: none;
}

#product-search:focus {
  border-color: var(--earth-green);
}

#search-trigger {
  padding: 0 25px;
  background: var(--accent);
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
}

/* side cart style  */

.cart-sidebar {
  position: fixed;
  top: 0;
  right: -400px; /* Hidden by default */
  width: 350px;
  height: 100vh;
  background: #fff;
  box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
  z-index: 2000;
  transition: 0.4s ease;
  display: flex;
  flex-direction: column;
}

.cart-sidebar.open {
  right: 0;
}

.cart-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.5);
  display: none;
  z-index: 1500;
}

.cart-header {
  padding: 20px;
  background: var(--earth-green);
  color: white;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

#cart-items-container {
  flex-grow: 1;
  overflow-y: auto;
  padding: 20px;
}

.cart-footer {
  padding: 20px;
  border-top: 1px solid #eee;
}

.checkout-btn {
  width: 100%;
  padding: 15px;
  background: var(--accent);
  color: white;
  border: none;
  border-radius: 8px;
  font-weight: bold;
  cursor: pointer;
  margin-top: 10px;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  grid-gap: 25px;
  grid-auto-rows: auto;
  align-items: start;
  grid-auto-rows: minmax(100px, auto);
}

/* The Product Card (Standard Size) */
.product-card {
  background: #fff;
  border-radius: 15px; /* Slightly rounder for a modern look */
  box-shadow: var(--card-shadow);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  grid-row: auto !important;
  height: 100%; /* Important for grid alignment */
  transition: 0.3s ease;
  opacity: 0;
  transform: translateY(30px);
}

/* THE MASONRY MAGIC: Taller items span more "rows" */
.product-card.tall {
  grid-row: span 2;
}

.product-card:hover {
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  transform: translateY(-5px);
}

/* Product Info Style */
.product-image {
  width: 100%;
  height: 200px; /* Fixed height for the image area */
  object-fit: cover; /* This prevents the image from stretching/squashing */
  border-bottom: 1px solid #eee;
}

.product-info {
  padding: 15px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  flex-grow: 1; /* Pushes the button to the bottom */
}

.p-name {
  font-weight: bold;
  font-size: 1.1rem;
  color: var(--earth-green);
  margin: 0;
}
.p-category {
  font-size: 0.8rem;
  color: #7f8c8d;
  text-transform: uppercase;
}
.p-price {
  color: var(--accent);
  font-size: 1.2rem;
  font-weight: bold;
  margin-top: 10px;
}

.add-btn {
  width: 100%;
  padding: 10px;
  background-color: var(--earth-green);
  border: none;
  color: white;
  border-radius: 6px;
  cursor: pointer;
  margin-top: 10px;
  transition: 0.2s;
}

.add-btn:hover {
  background-color: #0f360f;
}

/* THE REVEAL CLASS (Triggered by JS) */
.product-card.reveal {
  opacity: 1;
  transform: translateY(0);
}

/* Styling the Checkout  */

.modal {
  display: none;
  position: fixed;
  z-index: 3000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.6);
}

.modal-content {
  background-color: #fefefe;
  margin: 5% auto;
  padding: 30px;
  border-radius: 12px;
  width: 90%;
  max-width: 500px;
}

.close-modal {
  cursor: pointer;
}

.input-group {
  margin-bottom: 20px;
  display: flex;
  flex-direction: column;
}

.input-group label {
  margin-bottom: 8px;
  font-weight: 600;
  color: var(--earth-green);
}

.input-group input {
  padding: 12px;
  border: 1px solid #ddd;
  border-radius: 6px;
}

.order-summary-box {
  background: #f9f9f9;
  padding: 15px;
  border-radius: 8px;
  margin-bottom: 20px;
  border-left: 4px solid var(--accent);
}

.place-order-btn {
  width: 100%;
  padding: 15px;
  background: var(--earth-green);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  cursor: pointer;
}

/* MODERN QUANTITY SELECTOR STEPPER */
.qty-stepper {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 10px 0;
}

.qty-btn {
  background-color: #f0ebe6;
  color: var(--accent);
  border: 1px solid #dcd1c4;
  width: 32px;
  height: 32px;
  border-radius: 6px;
  font-size: 1.1rem;
  font-weight: bold;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.qty-btn:hover:not(:disabled) {
  background-color: var(--accent);
  color: white;
  border-color: var(--accent);
}

.qty-btn:disabled {
  background-color: #f5f5f5;
  color: #ccc;
  border-color: #e0e0e0;
  cursor: not-allowed;
}

.qty-input {
  width: 50px;
  height: 32px;
  text-align: center;
  font-weight: bold;
  font-size: 1rem;
  border: 1px solid #dcd1c4;
  border-radius: 6px;
  background-color: #fff;
  color: var(--text);
  pointer-events: none; /* Keep it read-only so they must use the +/- buttons */
}

/* TRACKING STATUS CARDS & BADGES */
.order-history-card {
  border: 1px solid #e0dbd5;
  border-radius: 8px;
  padding: 15px;
  margin-bottom: 15px;
  background-color: #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
}

.order-history-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #f2ede8;
  padding-bottom: 10px;
  margin-bottom: 10px;
}

.order-id {
  font-family: monospace;
  font-weight: bold;
  color: #7d7571;
}

.status-badge {
  padding: 4px 10px;
  border-radius: 50px;
  font-size: 0.8rem;
  font-weight: bold;
  text-transform: uppercase;
}

/* Dynamic Status Badge Colors */
.status-pending {
  background-color: #f39c12;
  color: white;
}
.status-packed {
  background-color: #3498db;
  color: white;
}
.status-delivery {
  background-color: #9b59b6;
  color: white;
}
.status-completed {
  background-color: #2ecc71;
  color: white;
}

.order-item-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.9rem;
  margin-bottom: 5px;
  color: #555;
}

.driver-info-box {
  background-color: #fdfaf7;
  border-left: 3px solid var(--accent);
  padding: 8px 12px;
  margin-top: 10px;
  border-radius: 0 6px 6px 0;
  font-size: 0.85rem;
}

.toast {
  background: #3c2f2a;
  color: white;
  padding: 12px 24px;
  border-radius: 8px;
  margin-top: 10px;
  font-size: 0.9rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  animation:
    slideUp 0.3s ease-out,
    fadeOut 0.5s 2.5s forwards;
  display: flex;
  align-items: center;
  gap: 10px;
}

@keyframes slideUp {
  from {
    transform: translateY(100%);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

@keyframes fadeOut {
  to {
    opacity: 0;
    visibility: hidden;
  }
}

/* --- Options Modal Styles --- */
.modal-overlay {
  display: none; /* Hidden by default */
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.75);
  z-index: 2000;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(4px);
}

.modal-content {
  background: #ffffff;
  width: 90%;
  max-width: 500px;
  border-radius: 20px;
  overflow: hidden;
  position: relative;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
  animation: slideUp 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.modal-header {
  width: 100%;
  height: 260px;
  background-size: cover;
  background-position: center;
  position: relative;
}

.close-btn {
  position: absolute;
  top: 15px;
  right: 15px;
  background: white;
  border: none;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  cursor: pointer;
  font-size: 1.4rem;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
  transition: transform 0.2s;
}

.close-btn:hover {
  transform: rotate(90deg);
}

.modal-body {
  padding: 30px;
}

#modal-product-name {
  margin: 0;
  color: #1e1e1e;
  font-size: 1.6rem;
}

.modal-subtitle {
  color: #7d7571;
  font-size: 0.95rem;
  margin-bottom: 25px;
}

.options-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 30px;
  max-height: 250px;
  overflow-y: auto; /* Scrollable if there are many options */
}

/* Individual Option Card */
.option-card {
  border: 2px solid #e6e3e0;
  padding: 18px;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.option-card:hover {
  border-color: #8e7355;
  background: #fcfbfa;
}

.option-card.selected {
  border-color: #3c2f2a;
  background: #fdfaf7;
  box-shadow: 0 4px 12px rgba(60, 47, 42, 0.1);
}

.option-card span:first-child {
  font-weight: 600;
  color: #3c2f2a;
}

.option-card span:last-child {
  color: #2e7d32;
  font-weight: 700;
}

/* Modal Footer */
.modal-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid #eee;
  padding-top: 20px;
}

.price-label {
  font-size: 0.8rem;
  color: #7d7571;
  display: block;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.price-amount {
  font-size: 1.5rem;
  font-weight: 800;
  color: #2e7d32;
}

.add-to-cart-btn {
  background: #3c2f2a;
  color: white;
  border: none;
  padding: 16px 35px;
  border-radius: 10px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.3s;
}

.add-to-cart-btn:hover {
  background: #1e1e1e;
}

/* Animations */
@keyframes slideUp {
  from {
    transform: translateY(100px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}




.sys-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.6); z-index: 9999;
    display: flex; align-items: center; justify-content: center;
    backdrop-filter: blur(4px);
}

.sys-alert-box {
    background: white; padding: 30px; border-radius: 20px;
    width: 90%; max-width: 400px; text-align: center;
    box-shadow: 0 15px 35px rgba(0,0,0,0.2);
    animation: popIn 0.3s cubic-bezier(0.17, 0.89, 0.32, 1.27);
}

.sys-icon { font-size: 3rem; margin-bottom: 15px; }

.sys-btn {
    padding: 12px 25px; border: none; border-radius: 8px;
    font-weight: 600; cursor: pointer; transition: 0.2s; margin: 5px;
}

.sys-btn.primary { background: #3c2f2a; color: white; }
.sys-btn.secondary { background: #f0eeed; color: #3c2f2a; }

@keyframes popIn {
    from { transform: scale(0.8); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}


/* Professional Toast Stacking */
.global-toast-stack {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10000;
    display: flex;
    flex-direction: column-reverse; /* Newest toast at the bottom */
    gap: 10px;
    pointer-events: none; /* Allows clicking through the container background */
}

.toast {
    background: #3c2f2a; /* Your Brand Brown */
    color: white;
    padding: 14px 24px;
    border-radius: 12px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.2);
    font-weight: 600;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 12px;
    animation: toastSlideUp 0.4s cubic-bezier(0.17, 0.89, 0.32, 1.27);
    min-width: 280px;
    pointer-events: auto; /* Re-enable clicking for the toast itself */
}

@keyframes toastSlideUp {
    from { transform: translateY(100%); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.toast.error { background: #e74c3c; }
.toast.success { background: #2e7d32; }






/* --- RESPONSIVE HERO SECTION --- */

/* For Tablets and smaller desktops */
@media (max-width: 992px) {
    .hero-carousel {
        height: 400px; /* Slightly shorter height */
    }
    
    .hero-content h1 {
        font-size: 2.5rem;
    }
}

/* For Mobile Phones (e.g., iPhone, Android) */
@media (max-width: 768px) {
    .hero-carousel {
        height: 350px; /* Compact height for mobile */
        border-radius: 15px; /* Softer corners for smaller screens */
        margin-bottom: 25px;
    }

    .hero-overlay {
        padding: 0 25px; /* Reduced side padding */
        background: linear-gradient(to top, rgba(0,0,0,0.8) 40%, rgba(0,0,0,0.3)); /* Gradient shift for mobile readability */
        align-items: flex-end; /* Move text to the bottom for better visibility of the image */
        padding-bottom: 40px;
    }

    .hero-content {
        max-width: 100%; /* Use full width */
    }

    .hero-label {
        font-size: 0.7rem;
        padding: 4px 10px;
    }

    .hero-content h1 {
        font-size: 1.8rem; /* Scaled down headline */
        margin: 10px 0;
    }

    .hero-content p {
        font-size: 0.95rem; /* Readable but smaller subheadline */
        margin-bottom: 15px;
        line-height: 1.4;
    }

    /* .hero-btn {
        padding: 10px 25px;
        font-size: 0.9rem;
        width: 100%; 
    } */

    .carousel-dots {
        bottom: 10px;
    }
}