/* ============================================================
   Quality1Foods — Main Stylesheet
   Replicates malasfruit.com visual style
   ============================================================ */

:root {
  --primary:     #2d7a3a;
  --primary-dark:#1e5728;
  --primary-light:#e8f5e9;
  --accent:      #e67e22;
  --accent-dark: #d35400;
  --white:       #ffffff;
  --light:       #f8f9fa;
  --dark:        #2c2c2c;
  --text:        #444444;
  --border:      #e0e0e0;
  --footer-bg:   #1a3a22;
  --ticker-bg:   #2d7a3a;
  --badge-new:   #e74c3c;
  --badge-feat:  #e67e22;
  --badge-best:  #2d7a3a;
  --font-display:'Playfair Display', serif;
  --font-body:   'Poppins', sans-serif;
  --shadow:      0 2px 15px rgba(0,0,0,.08);
  --shadow-hover:0 6px 25px rgba(0,0,0,.15);
  --radius:      8px;
  --transition:  .3s ease;
}

* { box-sizing: border-box; }
body { font-family: var(--font-body); color: var(--text); background:#fff; }
a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-dark); }
img { max-width: 100%; }

/* ---- NAVBAR ---- */
#mainNav {
  background: #fff;
  box-shadow: 0 2px 10px rgba(0,0,0,.08);
  padding: 10px 0;
  z-index: 1000;
}
.logo-img { height: 45px; width: auto; }
.navbar-nav .nav-link {
  font-size: .875rem;
  font-weight: 500;
  color: var(--dark) !important;
  padding: 8px 14px !important;
  transition: color var(--transition);
}
.navbar-nav .nav-link:hover { color: var(--primary) !important; }

/* Cart Badge */
.cart-icon-link { position: relative; }
.cart-badge {
  position: absolute;
  top: 0; right: 0;
  background: var(--primary);
  color: #fff;
  font-size: .65rem;
  width: 18px; height: 18px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 600;
}

/* ---- MEGA DROPDOWN ---- */
.mega-menu {
  width: 100vw;
  left: 0 !important;
  border: none;
  box-shadow: 0 8px 30px rgba(0,0,0,.12);
  padding: 24px;
  border-radius: 0 0 12px 12px;
}
.mega-col { padding: 0 12px; border-right: 1px solid var(--border); }
.mega-col:last-child { border-right: none; }
.mega-heading {
  font-family: var(--font-display);
  font-size: .85rem;
  color: var(--primary);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .5px;
  margin-bottom: 12px;
  padding-bottom: 6px;
  border-bottom: 2px solid var(--primary-light);
}
.mega-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 0;
  font-size: .8rem;
  color: var(--text);
  transition: color var(--transition);
}
.mega-item:hover { color: var(--primary); }
.mega-thumb {
  width: 32px; height: 32px;
  object-fit: contain;
  border-radius: 4px;
  flex-shrink: 0;
}

/* ---- SEARCH DRAWER ---- */
.search-drawer {
  position: fixed;
  top: 0; right: -400px;
  width: 380px; height: 100vh;
  background: #fff;
  z-index: 2000;
  box-shadow: -5px 0 30px rgba(0,0,0,.15);
  transition: right .35s ease;
  overflow-y: auto;
}
.search-drawer.open { right: 0; }
.search-drawer-inner { padding: 30px 24px; }
.search-close {
  background: none; border: none;
  font-size: 1.4rem; color: var(--text);
  position: absolute; top: 16px; right: 20px;
  cursor: pointer;
}
.search-logo { height: 40px; margin: 10px 0 24px; }
.search-input-wrap { position: relative; margin-bottom: 16px; }
.search-input-wrap input {
  width: 100%;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 40px 10px 14px;
  font-size: .9rem;
  outline: none;
  transition: border-color var(--transition);
}
.search-input-wrap input:focus { border-color: var(--primary); }
.search-input-wrap .search-icon { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); color: var(--primary); }
.search-results a {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 0; border-bottom: 1px solid var(--border);
  font-size: .85rem; color: var(--text);
}
.search-results a:hover { color: var(--primary); }
.search-results img { width: 40px; height: 40px; object-fit: contain; }
.search-cart-mini { margin-top: 30px; padding-top: 16px; border-top: 1px solid var(--border); }
.search-cart-mini h6 { font-weight: 600; margin-bottom: 8px; }
.search-overlay {
  display: none;
  position: fixed; inset: 0;
  background: rgba(0,0,0,.5);
  z-index: 1999;
}
.search-overlay.show { display: block; }

/* ---- HERO SLIDER ---- */
.hero-slider { width: 100%; overflow: hidden; }
.hero-slider .slick-slide img {
  width: 100%; height: 500px;
  object-fit: cover;
  display: block;
}
.hero-slider .slick-dots li button:before { color: var(--primary); }
.hero-slider .slick-prev:before,
.hero-slider .slick-next:before { color: var(--primary); font-size: 28px; }
@media (max-width: 768px) {
  .hero-slider .slick-slide img { height: 220px; }
}

/* ---- WELCOME SECTION ---- */
.welcome-section {
  text-align: center;
  padding: 70px 20px;
  background: var(--white);
}
.welcome-section .welcome-label {
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 8px;
}
.welcome-section h2 {
  font-family: var(--font-display);
  font-size: 2.2rem;
  color: var(--dark);
  margin-bottom: 16px;
}
.welcome-section p {
  font-size: .95rem;
  color: #666;
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.8;
}

/* ---- WHAT'S TRENDING ---- */
.trending-section { padding: 60px 0; background: var(--light); }
.section-title {
  font-family: var(--font-display);
  font-size: 2rem;
  color: var(--dark);
  text-align: center;
  margin-bottom: 6px;
}
.section-subtitle {
  text-align: center;
  color: #888;
  font-size: .9rem;
  margin-bottom: 30px;
}
.trending-tabs {
  display: flex;
  justify-content: center;
  gap: 0;
  margin-bottom: 36px;
  border-bottom: 2px solid var(--border);
}
.tab-btn {
  background: none;
  border: none;
  padding: 10px 28px;
  font-size: .9rem;
  font-weight: 500;
  color: #888;
  cursor: pointer;
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
  transition: all var(--transition);
}
.tab-btn.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
  font-weight: 600;
}
.tab-pane { display: none; }
.tab-pane.active { display: block; }

/* ---- PRODUCT CARD ---- */
.product-card {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: box-shadow var(--transition), transform var(--transition);
  position: relative;
  margin-bottom: 24px;
}
.product-card:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-3px);
}
.product-img-wrap {
  position: relative;
  overflow: hidden;
  height: 220px;
  background: #f9f9f9;
  display: flex; align-items: center; justify-content: center;
}
.product-img-wrap img {
  height: 200px;
  width: 100%;
  object-fit: contain;
  transition: opacity .35s ease;
  position: absolute;
}
.product-img-wrap .img-default { opacity: 1; z-index: 1; }
.product-img-wrap .img-hover   { opacity: 0; z-index: 2; }
.product-card:hover .img-default { opacity: 0; }
.product-card:hover .img-hover   { opacity: 1; }
.product-badge {
  position: absolute;
  top: 10px; left: 10px;
  z-index: 3;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: .7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .5px;
  color: #fff;
}
.badge-new        { background: var(--badge-new); }
.badge-featured   { background: var(--badge-feat); }
.badge-bestseller { background: var(--badge-best); }

.product-info {
  padding: 14px 16px;
  text-align: center;
}
.product-info h5 {
  font-size: .9rem;
  font-weight: 600;
  color: var(--dark);
  margin-bottom: 8px;
  line-height: 1.4;
}
.product-info h5 a { color: var(--dark); }
.product-info h5 a:hover { color: var(--primary); }
.product-price {
  font-size: 1rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 12px;
}
.btn-add-cart {
  background: var(--primary);
  color: #fff;
  border: none;
  padding: 8px 20px;
  border-radius: 20px;
  font-size: .8rem;
  font-weight: 500;
  cursor: pointer;
  transition: background var(--transition);
  width: 100%;
}
.btn-add-cart:hover { background: var(--primary-dark); }

/* ---- RECIPE SECTION ---- */
.recipe-section { padding: 60px 0; background: #fff; }
.recipe-section .section-cta {
  text-align: center;
  margin-bottom: 36px;
}
.recipe-section .section-cta a {
  display: inline-block;
  padding: 10px 30px;
  border: 2px solid var(--primary);
  border-radius: 25px;
  color: var(--primary);
  font-weight: 500;
  transition: all var(--transition);
}
.recipe-section .section-cta a:hover {
  background: var(--primary);
  color: #fff;
}
.recipe-card {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: box-shadow var(--transition);
}
.recipe-card:hover { box-shadow: var(--shadow-hover); }
.recipe-card img { width: 100%; height: 200px; object-fit: cover; }
.recipe-card-body {
  padding: 14px;
  background: #fff;
}
.recipe-date { font-size: .75rem; color: #999; margin-bottom: 4px; }
.recipe-title { font-size: .9rem; font-weight: 600; color: var(--dark); }

/* ---- EXPLORE / SOCIAL SECTION ---- */
.explore-section {
  background: var(--primary);
  padding: 50px 20px;
  text-align: center;
  color: #fff;
}
.explore-section h3 {
  font-family: var(--font-display);
  font-size: 2rem;
  margin-bottom: 8px;
}
.explore-section p { opacity: .85; font-size: .95rem; }

/* ---- TICKER BAR ---- */
.ticker-bar {
  background: var(--ticker-bg);
  color: #fff;
  text-align: center;
  padding: 10px 20px;
  font-size: .8rem;
  font-weight: 500;
  letter-spacing: .3px;
}

/* ---- FOOTER ---- */
.site-footer {
  background: var(--footer-bg);
  color: rgba(255,255,255,.8);
  padding: 40px 0 20px;
}
.footer-links {
  list-style: none;
  padding: 0; margin: 0 0 20px;
}
.footer-links li { margin-bottom: 8px; }
.footer-links a {
  color: rgba(255,255,255,.75);
  font-size: .85rem;
  transition: color var(--transition);
}
.footer-links a:hover { color: #fff; }
.footer-bottom {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid rgba(255,255,255,.1);
  text-align: center;
  font-size: .8rem;
}
.footer-bottom p { margin-bottom: 4px; }
.footer-note { opacity: .7; font-size: .75rem; }
.powered-by { opacity: .6; font-size: .7rem; }

/* ---- CONTACT PAGE ---- */
.contact-hero {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: #fff;
  padding: 60px 20px;
  text-align: center;
}
.contact-hero h1 { font-family: var(--font-display); font-size: 2.5rem; }
.contact-box {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 30px;
  margin-bottom: 24px;
}
.contact-box h4 { font-family: var(--font-display); color: var(--primary); margin-bottom: 12px; }
.contact-link-btn {
  display: inline-block;
  padding: 8px 20px;
  border: 1.5px solid var(--primary);
  border-radius: 20px;
  color: var(--primary);
  font-size: .85rem;
  margin: 4px;
  transition: all var(--transition);
}
.contact-link-btn:hover { background: var(--primary); color: #fff; }
.contact-phone-big {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary);
}

/* ---- BUTTONS ---- */
.btn-primary-q1f {
  background: var(--primary);
  color: #fff;
  border: none;
  padding: 12px 32px;
  border-radius: 25px;
  font-weight: 500;
  transition: background var(--transition);
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
}
.btn-primary-q1f:hover { background: var(--primary-dark); color: #fff; }

/* ---- FORMS ---- */
.form-control:focus { border-color: var(--primary); box-shadow: 0 0 0 .2rem rgba(45,122,58,.2); }
.form-label { font-weight: 500; font-size: .9rem; }

/* ---- PAGE HEADERS ---- */
.page-header {
  background: linear-gradient(135deg, var(--primary-light) 0%, #fff 100%);
  padding: 40px 0 20px;
  border-bottom: 2px solid var(--primary-light);
}
.page-header h1 {
  font-family: var(--font-display);
  font-size: 2rem;
  color: var(--dark);
  margin-bottom: 6px;
}
.breadcrumb-item + .breadcrumb-item::before { content: "›"; }
.breadcrumb-item a { color: var(--primary); }

/* ---- CART & CHECKOUT ---- */
.cart-table th { background: var(--primary); color: #fff; }
.cart-qty { width: 70px; text-align: center; }
.order-summary {
  background: var(--light);
  border-radius: var(--radius);
  padding: 24px;
}
.order-summary .total-row {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--primary);
}
.shipping-progress {
  background: var(--primary-light);
  border-radius: 20px;
  padding: 10px 16px;
  font-size: .85rem;
  margin-bottom: 16px;
}
.shipping-progress .progress { height: 6px; margin-top: 6px; }
.progress-bar { background: var(--primary); }

/* ---- ADMIN ---- */
.admin-sidebar {
  width: 240px;
  background: var(--footer-bg);
  min-height: 100vh;
  position: fixed;
  top: 0; left: 0;
  padding-top: 20px;
  z-index: 100;
}
.admin-sidebar .brand {
  padding: 16px 20px 24px;
  border-bottom: 1px solid rgba(255,255,255,.1);
}
.admin-sidebar .brand img { height: 36px; }
.admin-nav a {
  display: block;
  padding: 12px 20px;
  color: rgba(255,255,255,.75);
  font-size: .875rem;
  transition: all var(--transition);
}
.admin-nav a:hover, .admin-nav a.active {
  background: rgba(255,255,255,.1);
  color: #fff;
}
.admin-nav a i { width: 20px; margin-right: 8px; }
.admin-content {
  margin-left: 240px;
  padding: 30px;
  min-height: 100vh;
  background: #f4f6f8;
}
.admin-card {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px;
  margin-bottom: 24px;
}
.stat-card {
  background: var(--primary);
  color: #fff;
  border-radius: var(--radius);
  padding: 20px;
  text-align: center;
}
.stat-card h3 { font-size: 2rem; margin: 0; }
.stat-card p { opacity: .85; margin: 4px 0 0; font-size: .85rem; }

/* ---- TOAST NOTIFICATION ---- */
.q1f-toast {
  position: fixed;
  bottom: 30px; right: 30px;
  background: var(--primary);
  color: #fff;
  padding: 14px 24px;
  border-radius: var(--radius);
  box-shadow: var(--shadow-hover);
  z-index: 9999;
  font-size: .9rem;
  transform: translateY(100px);
  opacity: 0;
  transition: all .35s ease;
}
.q1f-toast.show { transform: translateY(0); opacity: 1; }

/* ---- RESPONSIVE ---- */
@media (max-width: 991px) {
  .mega-menu { width: 100%; position: static !important; }
  .mega-col { border-right: none; border-bottom: 1px solid var(--border); padding: 10px 0; }
  .admin-sidebar { width: 100%; position: static; min-height: auto; }
  .admin-content { margin-left: 0; }
  .search-drawer { width: 100%; right: -100%; }
}
@media (max-width: 767px) {
  .welcome-section h2 { font-size: 1.6rem; }
  .section-title { font-size: 1.5rem; }
  .explore-section h3 { font-size: 1.5rem; }
}
