/* ===============================
   GLOBAL SECTION WRAPPER FIX
=============================== */

.section {
  max-width: var(--content-max);
  margin: 0 auto;
}

.section-tight {
  padding-top: var(--space-xl);
  padding-bottom: var(--space-xl);
}

/* ===============================
   CARD BASE
=============================== */
.card {
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.06);
  padding: var(--space-lg);
}

.card.compact {
  padding: var(--space-md);
}
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 24px;
}

/* =========================================================
   SECTION — CATEGORIES
   FILE: components.css
   ========================================================= */

.categories-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
}

/* ===== CATEGORY CARD ===== */

.category-card {
  background: #e8ddcc;
  border-radius: 24px;
  padding: 22px;

  display: flex;
  flex-direction: column;
  gap: 10px;

  text-align: left;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.category-card:hover {
  transform: translateY(-6px);
}

/* IMAGE */

.category-image {
  height: 180px;
  border-radius: 18px;
  background-size: cover;
  background-position: center;
  margin-bottom: 8px;
}

/* TITLE */

.category-card h3 {
  font-size: 20px;
  line-height: 1.25;
  margin: 0;
}

/* DESCRIPTION */

.category-card p {
  font-size: 14px;
  line-height: 1.5;
  color: var(--text-muted);
  margin: 0;
  text-align: left; /* 🔒 LOCKED */
}

/* LINK */

.category-link {
  margin-top: auto;
  font-size: 13px;
  color: var(--terracotta);
  font-weight: 500;
}


/* =========================================================
   WHY GRID
   FILE: components.css
   ========================================================= */

.why-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-lg);
}

.why-item {
  background: var(--bege-rose);
  padding: var(--space-lg);
  border-radius: 24px;
  font-size: 15px;
  color: var(--text-muted);
}

.why-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(0,0,0,0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.service-card {
  background: var(--bege-rose);
  border-radius: 18px;
  padding: 28px;
  text-align: center;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.service-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 40px rgba(0,0,0,0.08);
}

.service-icon {
  width: 48px;
  height: 48px;
  object-fit: contain;
  margin-bottom: 16px;
}


/* Stagger effect */
#services .why-item:nth-child(1) { animation-delay: 0.05s; }
#services .why-item:nth-child(2) { animation-delay: 0.1s; }
#services .why-item:nth-child(3) { animation-delay: 0.15s; }
#services .why-item:nth-child(4) { animation-delay: 0.2s; }
#services .why-item:nth-child(5) { animation-delay: 0.25s; }

@keyframes serviceFadeUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
/* Modal base */
/* =========================
   SERVICE MODAL (FINAL)
   ========================= */

.service-modal {
  position: fixed;
  inset: 0;
  z-index: 999;
}

.service-modal.hidden {
  display: none;
}

.service-modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
}

.service-modal-box {
  position: relative;
  max-width: 420px;
  width: 90%;

  /* KEY FIXES */
  max-height: calc(100vh - 140px);
  margin: 80px auto;

  background: #fff;
  padding: 24px;
  border-radius: 12px;
  z-index: 1;

  overflow-y: auto;

  transform: scale(0.95) translateY(10px);
  opacity: 0;
  transition: all 0.25s ease;
}


.service-modal:not(.hidden) .service-modal-box {
  transform: scale(1) translateY(0);
  opacity: 1;
}

.service-close {
  position: absolute;
  top: 10px;
  right: 10px;
  background: none;
  border: none;
  font-size: 18px;
  cursor: pointer;
}

/* Lock background */
body.modal-open {
  overflow: hidden;
}

@media (max-width: 600px) {
  .service-modal-box {
    margin: 60px auto;
    padding: 18px;
  }
}


/* =========================
   CERTIFICATE MODAL (FINAL)
   ========================= */

.cert-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
}

.cert-modal.hidden {
  display: none;
}

.cert-modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
}

.cert-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;

  display: flex;
  align-items: center;
  justify-content: center;
}

.cert-modal.hidden {
  display: none;
}

.cert-modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.7);
}

/* === THE FIX === */
.cert-modal-box {
  position: relative;

  width: 92%;
  max-width: 900px;
  height: min(78vh, 720px);

  background: #fff;
  border-radius: 16px;
  overflow: hidden;

  box-shadow: 0 30px 80px rgba(0,0,0,0.35);

  display: flex;
  flex-direction: column;
}

/* iframe */
.cert-modal-box iframe {
  width: 100%;
  height: 100%;
  border: none;
  background: #f6f6f6;
}

/* Close button */
.cert-close {
  position: absolute;
  top: 12px;
  right: 12px;

  width: 40px;
  height: 40px;

  border-radius: 50%;
  border: none;
  background: rgba(0,0,0,0.12);

  font-size: 20px;
  cursor: pointer;

  display: flex;
  align-items: center;
  justify-content: center;

  z-index: 2;
}

/* Lock background */
body.modal-open {
  overflow: hidden;
}

body.modal-open footer {
  display: none;
}

/* Mobile */
@media (max-width: 600px) {
  .cert-modal-box {
    width: 94%;
    height: 82vh;
    border-radius: 14px;
  }
}


/* =========================================================
   CERT LIST
   FILE: components.css
   ========================================================= */

.cert-list {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-md);
}

.cert-list span {
  padding: 10px 20px;
  border-radius: 999px;
  background: var(--bege-rose);
  font-size: 13px;
  color: var(--text-muted);
}

/* =========================================================
   SECTION — PRODUCTS
   FILE: components.css
   ========================================================= */

.products {
  padding: var(--space-xl) 8vw var(--space-3xl);
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: var(--space-lg);
}

.product-title {
  display: -webkit-box;
  -webkit-line-clamp: 2;   /* title max 2 lines */
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-desc {
  display: -webkit-box;
  -webkit-line-clamp: 4;   /* description max 4 lines */
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-content {
  flex: 1; /* takes remaining space */
}

.product-actions {
  margin-top: auto;
}

.product-card {
  background: #fff;
  padding: 18px;
  border-radius: 22px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.product-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 40px rgba(0,0,0,0.12);
}

.product-image {
  width: 100%;
  aspect-ratio: 4 / 5;
  border-radius: 16px;
  overflow: hidden;
  background-color: #f3f3f3;
  display: flex;
  align-items: center;
  justify-content: center;
}

.product-image img {
  width: 100%;
  height: 100%;
  object-fit: cover; /* NO MORE CUT WEIRDLY */
}

.product-card {
  overflow: hidden;
}


.product-card h3 {
  font-size: 20px;
  line-height: 1.25;
}

.product-card p {
  font-size: 14px;
  line-height: 1.5;
  margin: 0;
}

.product-layout {
  display: grid;
  grid-template-columns: minmax(320px, 420px) 1fr;
  gap: 48px;
  align-items: start;
}

.product-media {
  background: #f3f3f3;
  border-radius: 28px;
  padding: 24px;
}

.product-media img,
#mainImage {
  width: 100%;
  height: auto;
  max-height: 520px;
  object-fit: contain;
  display: block;
}


.product-info h1 {
  font-size: 42px;
  margin-bottom: 12px;
}

.product-info p {
  max-width: 520px;
  margin-bottom: 24px;
}


/* =========================================================
   COMPONENT — PRODUCT MODAL
   FILE: components.css
   ========================================================= */

.product-modal {
  position: fixed;
  inset: 0;
  z-index: 999;
}

.product-modal.hidden {
  display: none;
}

.modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
}

.modal-content {
  position: relative;
  max-width: 900px;
  margin: 8vh auto;
  background: #fff;
  border-radius: 32px;
  padding: var(--space-xl);
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: var(--space-xl);
}

.modal-left img {
  width: 100%;
  border-radius: 24px;
}

.modal-right h2 {
  font-size: 32px;
  margin-bottom: var(--space-sm);
}

.modal-right p {
  color: var(--text-muted);
  margin-bottom: var(--space-lg);
}

.modal-right ul {
  margin-bottom: var(--space-lg);
}

.modal-right li {
  font-size: 14px;
  margin-bottom: 6px;
  color: var(--text-muted);
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 20px;
  background: none;
  border: none;
  font-size: 28px;
  cursor: pointer;
}

/* =========================================================
   SECTION — CART
   FILE: components.css
   ========================================================= */

/* ===============================
   CART
=============================== */
.cart-list {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.cart-row {
  background: #fff;
  border-radius: 20px;
  padding: 20px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.cart-row strong {
  font-size: 18px;
  display: block;
}

.cart-row p {
  font-size: 14px;
  color: var(--text-muted);
}
.cart-container {
  max-width: 900px;
  margin: 0 auto;
}

.cart-empty {
  text-align: center;
  font-size: 16px;
  color: var(--text-muted);
  padding: var(--space-2xl) 0;
}

.cart-controls button {
  background: #f3f3f3;
  border: none;
  border-radius: 10px;
  font-size: 14px;
  padding: 6px 12px;
  cursor: pointer;
}

.cart-controls button:hover {
  background: #e6e6e6;
}


.cart-actions {
  margin-top: var(--space-xl);
  display: flex;
  justify-content: space-between;
  gap: var(--space-md);
}

/* =========================================================
   SECTION — AUTH
   FILE: components.css
   ========================================================= */

/* ADMIN LOGIN TEXT */
.admin-login h1 {
  font-size: 36px;
  margin-bottom: 4px;
}

.admin-login p {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 24px;
}

.auth-section {
  display: flex;
  justify-content: center;
  padding: var(--space-xl) 8vw;
}

.auth-box {
  width: 100%;
  max-width: 360px;
  background: #fff;
  padding: 32px;
  border-radius: 20px;
}

.auth-box input {
  width: 100%;
  padding: 12px;
  margin-bottom: 14px;
  border-radius: 12px;
  border: 1px solid #ddd;
}
.auth-box input:last-of-type {
  margin-bottom: 20px;
}

.auth-box .btn {
  width: 100%;
  margin-top: 8px;
}

.admin-login h1 {
  letter-spacing: 0.5px;
}

.admin-login p {
  margin-bottom: 28px;
}

.auth-error {
  color: red;
  font-size: 13px;
  margin-top: 10px;
}

.back-btn {
  background: none;
  border: none;
  font-size: 16px;
  margin-bottom: var(--space-md);
  cursor: pointer;
  color: #7a3a16;
}

/* =========================================================
   ADMIN — STATS / CARDS
   FILE: components.css
   ========================================================= */

.admin-cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-lg);
  margin-bottom: var(--space-3xl);
}

.admin-card {
  background: #fff;
  padding: var(--space-lg);
  border-radius: 24px;
}

.admin-card h3 {
  font-size: 20px;
  margin-bottom: var(--space-sm);
}

.admin-card p {
  font-size: 14px;
  color: var(--text-muted);
}

/* =========================================================
   ADMIN — TABLE
   FILE: components.css
   ========================================================= */

.admin-table {
  background: #fff;
  border-radius: 24px;
  padding: var(--space-lg);
}

.admin-table table {
  width: 100%;
  border-collapse: collapse;
}

.admin-table th {
  text-align: left;
  font-size: 13px;
  color: var(--text-muted);
  padding-bottom: var(--space-md);
}

.admin-table td {
  font-size: 14px;
  padding: var(--space-md) 0;
  border-top: 1px solid #eee;
}

/* =========================================================
   ADMIN — FORM
   FILE: components.css
   ========================================================= */

.admin-form {
  max-width: 520px;
  background: #fff;
  padding: var(--space-xl);
  border-radius: 28px;
}

.admin-form label {
  display: block;
  font-size: 13px;
  margin-bottom: 6px;
}

.admin-form input,
.admin-form select {
  width: 100%;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid #ddd;
  margin-bottom: var(--space-md);
}

/* =========================================================
   ADMIN — ACTION BUTTONS
   FILE: components.css
   ========================================================= */

.admin-actions {
  display: flex;
  gap: var(--space-md);
  margin-top: var(--space-lg);
}
.hero-actions .btn {
  min-width: 180px;
  text-align: center;
}

/* =========================
   BUTTONS (GLOBAL)
   ========================= */

.btn {
  padding: 14px 34px;
  border-radius: 999px;
  border: none;
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
}

.btn.primary {
  background: #798A91;
  color: #fff;
}

.btn.secondary {
  background: #798A91;
  color: #fff;
  border: 1px solid var(--terracotta);
}


/* =========================
   PRODUCT PAGE — IMPROVED UI
   ========================= */

/* ===============================
   PRODUCT PAGE
=============================== */

/* =========================
   PRODUCT PAGE (FINAL)
========================= */

.product-page {
  max-width: 1100px;
  margin: 0 auto;
  padding: var(--space-2xl) var(--space-lg);
}

.product-layout {
  display: grid;
  grid-template-columns: minmax(320px, 420px) 1fr;
  gap: 48px;
  align-items: start;
}

.product-media {
  background: #f3f3f3;
  border-radius: 28px;
  padding: 24px;
}

#mainImage {
  width: 100%;
  max-height: 520px;
  object-fit: contain;
  display: block;
  border-radius: 20px;
}

#thumbs {
  display: flex;
  gap: 10px;
  margin-top: 14px;
}

#thumbs img {
  width: 64px;
  height: 64px;
  border-radius: 10px;
  object-fit: cover;
  cursor: pointer;
  opacity: 0.6;
}

#thumbs img:hover {
  opacity: 1;
  outline: 2px solid #798A91;
}

.product-info h1 {
  font-size: 42px;
  margin-bottom: 12px;
}

.product-info p {
  max-width: 520px;
  margin-bottom: 24px;
}

.quantity-stepper label {
  font-size: 14px;
  display: block;
  margin-bottom: 6px;
}

.stepper {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 24px;
}

.stepper button {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: #eee;
  font-size: 18px;
  cursor: pointer;
}

.stepper input {
  width: 42px;
  text-align: center;
  border: none;
  background: transparent;
  font-size: 16px;
}

.back-btn {
  margin-bottom: var(--space-lg);
  font-size: 14px;
  opacity: 0.7;
}

.back-btn:hover {
  opacity: 1;
}

/* ===============================
   PRODUCT GALLERY
=============================== */
.product-gallery {
  display: flex;
  gap: 12px;
  margin-top: 16px;
}

.product-gallery img {
  width: 64px;
  height: 64px;
  border-radius: 10px;
  object-fit: cover;
  cursor: pointer;
  opacity: 0.6;
}

.product-gallery img.active,
.product-gallery img:hover {
  opacity: 1;
  outline: 2px solid #798A91;
}

/* =========================
   TOAST NOTIFICATION
   ========================= */

.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: var(--terracotta);
  color: #fff;
  padding: 14px 22px;
  border-radius: 999px;
  font-size: 14px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition: all 0.3s ease;
  z-index: 9999;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

/* =========================
   COMING SOON SECTION
   ========================= */

.coming-soon {
  background: var(--bege-rose);
  text-align: center;
}

.coming-soon-inner {
  max-width: 640px;
  margin: 0 auto;
}

.coming-soon p {
  color: var(--text-muted);
  font-size: 16px;
  margin-top: var(--space-md);
}

/* =====================
   TOAST SYSTEM
===================== */
.toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.toast {
  min-width: 260px;
  max-width: 360px;
  padding: 14px 16px;
  border-radius: 12px;
  background: #111;
  color: #fff;
  font-size: 14px;
  line-height: 1.4;
  box-shadow: 0 10px 30px rgba(0,0,0,0.25);
  animation: toast-in 0.25s ease-out;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.toast.success {
  background: linear-gradient(135deg, #16a34a, #22c55e);
}

.toast.error {
  background: linear-gradient(135deg, #dc2626, #ef4444);
}

.toast.warn {
  background: linear-gradient(135deg, #f59e0b, #fbbf24);
  color: #111;
}

.toast button {
  background: none;
  border: none;
  color: inherit;
  font-size: 16px;
  cursor: pointer;
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.footer-contact h4 {
  margin-bottom: 16px;
}

.contact-item {
  display: flex;
  align-items: flex-start; /* KEY FIX */
  gap: 12px;
  margin-bottom: 14px;
}

/* Icon */
.footer-contact img {
  width: 18px;
  height: 18px;
  object-fit: contain;
  flex-shrink: 0;

  margin-top: 3px; /* aligns icon with first text line */
}

.announcement {
  width: 100%;
  background: #798A91;
  color: #fff;
  text-align: center;
  padding: 12px 16px;
  font-size: 14px;
  position: absolute;
  top: 0;
  z-index: 1200;
}

.announcement.hidden {
  display: none;
}


/* =========================
   CERTIFICATIONS – UI FIX
========================= */

.cert-list {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 24px;
}

.cert-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;

  min-width: 260px;
  padding: 14px 20px;

  background: #e2d6c5;
  border-radius: 999px;
  border: 1px solid #e6dfd4;

  text-decoration: none;
  color: var(--text-dark);
  font-size: 15px;

  transition: all 0.25s ease;
}

.cert-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(0,0,0,0.08);
}

.cert-title {
  font-weight: 500;
}

.cert-action {
  font-size: 13px;
  color: var(--terracotta);
  white-space: nowrap;
}