/* ============================================================
   Sunbis AgroFish – Main Stylesheet
   ============================================================ */

:root {
  --primary:   #1a7a6e;
  --primary-dark: #0e5249;
  --secondary: #2bbfa0;
  --accent:    #f0b429;
  --deep:      #0a1628;
  --cream:     #fdf6ec;
  --sand:      #e8d5b7;
  --text:      #2d3748;
  --muted:     #718096;
  --light-bg:  #f0f9f7;
}

* { box-sizing: border-box; }
body { font-family: 'Inter', sans-serif; color: var(--text); background: #fff; }

/* ── TOP BAR ── */
.topbar {
  background: var(--primary-dark);
  color: #fff; font-size: 0.8rem;
  padding: 0.4rem 0;
}
.topbar a { color: #fff; text-decoration: none; }

/* ── NAVBAR ── */
.bg-primary-custom { background: var(--primary) !important; }
.navbar-brand .brand-icon { font-size: 1.6rem; }
.navbar-brand .brand-name {
  font-family: 'Playfair Display', serif;
  font-size: 1.25rem; color: #fff; font-weight: 700;
}
.navbar-brand .brand-name em { color: var(--accent); font-style: normal; }
.nav-link { font-weight: 500; }

.search-form { max-width: 380px; width: 100%; }
.search-form .form-control { border-radius: 50px 0 0 50px; border: none; }
.btn-search {
  background: var(--accent); border-radius: 0 50px 50px 0;
  color: var(--deep); border: none; padding: 0 1rem;
}
.btn-search:hover { background: #d99e1a; }

.cart-icon { position: relative; font-size: 1.4rem; }
.cart-badge {
  position: absolute; top: -4px; right: -8px;
  background: var(--accent); color: var(--deep);
  border-radius: 50%; width: 20px; height: 20px;
  font-size: 0.7rem; display: flex; align-items: center; justify-content: center;
  font-weight: 700;
}

/* ── HERO ── */
.hero-section {
  background: linear-gradient(135deg, var(--deep) 0%, var(--primary) 60%, #0e4a3a 100%);
  min-height: 88vh; display: flex; align-items: center;
  position: relative; overflow: hidden;
}
.hero-section::after {
  content: '';
  position: absolute; bottom: 0; left: 0; right: 0; height: 80px;
  background: #fff; clip-path: ellipse(55% 100% at 50% 100%);
}
.hero-section .badge-pill {
  background: rgba(43,191,160,0.2); border: 1px solid rgba(43,191,160,0.5);
  color: var(--secondary); padding: 0.4rem 1.2rem; border-radius: 50px;
  font-size: 0.8rem; letter-spacing: 0.08em; text-transform: uppercase;
}
.hero-section h1 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  color: #fff; font-weight: 900; line-height: 1.1;
}
.hero-section h1 em { color: var(--secondary); font-style: normal; }
.hero-section .lead { color: rgba(255,255,255,0.7); }
.hero-emoji { font-size: clamp(6rem, 18vw, 14rem); line-height: 1; filter: drop-shadow(0 20px 40px rgba(0,0,0,0.4)); }

.btn-primary-custom {
  background: var(--secondary); color: var(--deep); border: none;
  padding: 0.8rem 2rem; border-radius: 50px; font-weight: 600;
  transition: all 0.3s;
}
.btn-primary-custom:hover { background: var(--accent); transform: translateY(-2px); box-shadow: 0 10px 30px rgba(43,191,160,0.3); }
.btn-outline-custom {
  border: 2px solid rgba(255,255,255,0.4); color: #fff;
  padding: 0.8rem 2rem; border-radius: 50px; font-weight: 600;
  text-decoration: none; transition: all 0.3s; display: inline-block;
}
.btn-outline-custom:hover { border-color: var(--secondary); color: var(--secondary); }

/* ── SECTION STYLING ── */
.section-label {
  font-size: 0.78rem; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--primary);
  font-weight: 600; margin-bottom: 0.5rem;
}
.section-title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.8rem, 3.5vw, 2.6rem);
  font-weight: 900; color: var(--deep); line-height: 1.15;
}
.section-light .section-title { color: #fff; }
.section-light .section-label  { color: var(--secondary); }

/* ── FEATURE CARDS ── */
.feature-card {
  background: var(--light-bg); border-radius: 16px;
  padding: 2rem; text-align: center; transition: transform 0.3s, box-shadow 0.3s;
  border: 1px solid rgba(26,122,110,0.1);
}
.feature-card:hover { transform: translateY(-4px); box-shadow: 0 16px 40px rgba(26,122,110,0.1); }
.feature-icon { font-size: 2.8rem; margin-bottom: 1rem; }

/* ── PRODUCT CARDS ── */
.product-card {
  border: 1px solid #e8edf0; border-radius: 16px;
  overflow: hidden; transition: all 0.3s; background: #fff;
  height: 100%;
}
.product-card:hover { box-shadow: 0 12px 35px rgba(26,122,110,0.15); transform: translateY(-3px); }
.product-card .card-img-top {
  height: 220px; object-fit: cover; background: var(--light-bg);
}
.product-img-placeholder {
  height: 220px; background: linear-gradient(135deg, #e8f5f0, #d0ede6);
  display: flex; align-items: center; justify-content: center; font-size: 5rem;
}
.product-card .card-body { padding: 1.2rem; }
.product-card .card-title { font-weight: 700; font-size: 1rem; color: var(--deep); }
.product-price {
  font-size: 1.2rem; font-weight: 800;
  color: var(--primary); font-family: 'Playfair Display', serif;
}
.product-price .original {
  font-size: 0.85rem; color: var(--muted);
  text-decoration: line-through; font-weight: 400; font-family: 'Inter', sans-serif;
}
.badge-category {
  background: rgba(26,122,110,0.1); color: var(--primary);
  font-size: 0.7rem; padding: 0.25rem 0.7rem; border-radius: 50px;
}
.btn-cart {
  background: var(--primary); color: #fff; border: none;
  padding: 0.5rem 1rem; border-radius: 8px; font-size: 0.85rem;
  font-weight: 600; transition: all 0.2s; flex: 1;
}
.btn-cart:hover { background: var(--primary-dark); }
.btn-buy {
  background: var(--accent); color: var(--deep); border: none;
  padding: 0.5rem 1rem; border-radius: 8px; font-size: 0.85rem;
  font-weight: 600; transition: all 0.2s; flex: 1;
}
.btn-buy:hover { background: #d99e1a; }

/* ── FILTERS ── */
.filter-sidebar .list-group-item {
  border: none; padding: 0.6rem 1rem;
  border-radius: 8px; margin-bottom: 2px;
  cursor: pointer; transition: all 0.2s;
}
.filter-sidebar .list-group-item:hover,
.filter-sidebar .list-group-item.active {
  background: var(--primary); color: #fff;
}

/* ── PRODUCT DETAIL ── */
.product-detail-img {
  width: 100%; border-radius: 16px; object-fit: cover;
  background: var(--light-bg);
}
.product-detail-placeholder {
  border-radius: 16px; background: linear-gradient(135deg, #e8f5f0, #d0ede6);
  aspect-ratio: 1; display: flex; align-items: center; justify-content: center;
  font-size: 10rem;
}
.qty-control {
  display: flex; align-items: center; gap: 0.5rem;
  border: 1px solid #e2e8f0; border-radius: 8px; overflow: hidden; width: fit-content;
}
.qty-control button {
  background: var(--light-bg); border: none; width: 38px; height: 38px; font-size: 1.1rem;
  font-weight: 700; cursor: pointer; transition: background 0.2s;
}
.qty-control button:hover { background: var(--sand); }
.qty-control input {
  width: 60px; text-align: center; border: none; outline: none;
  font-weight: 600; font-size: 1rem;
}

/* ── CART ── */
.cart-item {
  display: flex; gap: 1rem; align-items: center;
  padding: 1rem; border: 1px solid #e8edf0; border-radius: 12px;
  margin-bottom: 0.8rem; background: #fff;
}
.cart-item-img {
  width: 80px; height: 80px; border-radius: 10px; object-fit: cover;
  background: var(--light-bg); flex-shrink: 0;
  display: flex; align-items: center; justify-content: center; font-size: 2.5rem;
}
.cart-summary-box {
  background: var(--light-bg); border-radius: 16px;
  padding: 1.5rem; border: 1px solid rgba(26,122,110,0.1);
  position: sticky; top: 100px;
}

/* ── CHECKOUT ── */
.checkout-step {
  background: #fff; border: 1px solid #e8edf0;
  border-radius: 16px; padding: 2rem; margin-bottom: 1.5rem;
}
.step-number {
  width: 36px; height: 36px; background: var(--primary); color: #fff;
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 0.9rem; flex-shrink: 0;
}

/* ── ORDER SUMMARY ── */
.order-line { display: flex; justify-content: space-between; padding: 0.4rem 0; }
.order-total {
  display: flex; justify-content: space-between; padding: 0.8rem 0;
  border-top: 2px solid var(--primary); font-size: 1.2rem; font-weight: 800;
}

/* ── ABOUT SECTION ── */
.about-section {
  background: linear-gradient(135deg, var(--light-bg), var(--cream));
}
.about-visual {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  border-radius: 8px 28px 8px 28px;
  aspect-ratio: 4/3; display: flex; align-items: center;
  justify-content: center; font-size: 8rem;
}

/* ── CONTACT ── */
.contact-card {
  background: #fff; border: 1px solid #e8edf0; border-radius: 16px;
  padding: 2rem; text-align: center; transition: transform 0.3s;
}
.contact-card:hover { transform: translateY(-3px); }
.contact-card .contact-icon {
  width: 56px; height: 56px; background: var(--light-bg);
  border-radius: 14px; display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem; margin: 0 auto 1rem; color: var(--primary);
}

/* ── FORMS ── */
.form-control:focus, .form-select:focus {
  border-color: var(--secondary); box-shadow: 0 0 0 3px rgba(43,191,160,0.15);
}

/* ── ALERTS ── */
.alert-success-custom { background: rgba(43,191,160,0.1); border: 1px solid var(--secondary); color: var(--primary-dark); }
.alert-error-custom   { background: rgba(220,53,69,0.08); border: 1px solid #dc3545; color: #842029; }

/* ── ADMIN ── */
.admin-sidebar {
  min-height: calc(100vh - 60px);
  background: var(--deep); color: #fff; width: 240px;
  position: fixed; left: 0; top: 60px; overflow-y: auto;
}
.admin-sidebar .nav-link { color: rgba(255,255,255,0.7); padding: 0.7rem 1.5rem; }
.admin-sidebar .nav-link:hover,
.admin-sidebar .nav-link.active { color: var(--secondary); background: rgba(255,255,255,0.05); }
.admin-sidebar .nav-link i { margin-right: 0.6rem; }
.admin-content { margin-left: 240px; padding: 2rem; }
.admin-navbar { background: var(--primary) !important; }
.stat-card {
  background: #fff; border-radius: 14px; padding: 1.5rem;
  border-left: 4px solid var(--primary); transition: transform 0.2s;
}
.stat-card:hover { transform: translateY(-2px); }
.stat-card h3 { font-family: 'Playfair Display', serif; font-size: 2rem; color: var(--primary); }

/* ── FOOTER ── */
.site-footer {
  background: var(--deep); color: rgba(255,255,255,0.7);
  padding: 4rem 0 1.5rem;
}
.footer-brand {
  font-family: 'Playfair Display', serif; font-size: 1.5rem; color: #fff;
}
.footer-brand em { color: var(--secondary); font-style: normal; }
.footer-heading { color: #fff; font-weight: 700; font-size: 0.9rem; letter-spacing: 0.05em; text-transform: uppercase; }
.footer-links { list-style: none; padding: 0; }
.footer-links li { padding: 0.25rem 0; font-size: 0.88rem; }
.footer-links a { color: rgba(255,255,255,0.6); text-decoration: none; transition: color 0.2s; }
.footer-links a:hover { color: var(--secondary); }
.footer-divider { border-color: rgba(255,255,255,0.1); }
.social-links a {
  display: inline-flex; width: 36px; height: 36px;
  background: rgba(255,255,255,0.08); border-radius: 50%;
  align-items: center; justify-content: center; color: #fff;
  text-decoration: none; margin-right: 0.4rem; font-size: 1rem;
  transition: background 0.2s;
}
.social-links a:hover { background: var(--secondary); }

/* ── STATUS BADGES ── */
.status-pending    { background: #fff3cd; color: #856404; }
.status-processing { background: #cfe2ff; color: #084298; }
.status-shipped    { background: #d1ecf1; color: #0c5460; }
.status-delivered  { background: #d4edda; color: #155724; }
.status-cancelled  { background: #f8d7da; color: #721c24; }
.status-success    { background: #d4edda; color: #155724; }
.status-failed     { background: #f8d7da; color: #721c24; }

/* ── TOAST ── */
#toast-container { position: fixed; bottom: 1.5rem; right: 1.5rem; z-index: 9999; }
.toast-msg {
  background: var(--deep); color: #fff; padding: 0.9rem 1.4rem;
  border-radius: 12px; margin-top: 0.5rem; font-size: 0.9rem;
  animation: slideIn 0.3s ease; border-left: 4px solid var(--secondary);
  box-shadow: 0 8px 24px rgba(0,0,0,0.2);
}
@keyframes slideIn { from { transform: translateX(80px); opacity: 0; } to { transform: translateX(0); opacity: 1; } }

/* ── RESPONSIVE ── */
@media (max-width: 768px) {
  .admin-sidebar { display: none; }
  .admin-content { margin-left: 0; }
  .hero-emoji    { display: none; }
}
