/* ============================================================
   Clean & Responsive Override
   --------------------------------
   Dimuat setelah style.css + responsive.css agar menang
   terhadap fixed-width/heights yang tersebar di style.css.
   Hapus/sesuaikan kelas ini untuk rollback.
   ============================================================ */

:root {
  --cr-radius: 12px;
  --cr-shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.04);
  --cr-shadow-md: 0 4px 16px rgba(0, 0, 0, 0.08);
  --cr-border: 1px solid #e6e6e6;
  --cr-bg-soft: #f9f9f9;
  --cr-text: #212121;
  --cr-text-muted: #727272;
  --cr-space-section: clamp(48px, 8vw, 80px);
  --cr-space-card: clamp(16px, 3vw, 32px);
}

/* ---------- Base spacing ---------- */
.section {
  padding: var(--cr-space-section) 0;
}

.section .section-title-wrap .title {
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.2;
}

/* ---------- Container (Bootstrap gutter) ---------- */
.container,
.container-fluid {
  padding-left: max(16px, calc((100vw - 1240px) / 2));
  padding-right: max(16px, calc((100vw - 1240px) / 2));
}

/* ---------- Mini menu (homepage explore list) ---------- */
.menu_card {
  border: 1px dashed #d6d6d6;
  border-radius: var(--cr-radius);
  padding: clamp(16px, 3vw, 32px);
  row-gap: 24px;
}

.ct-mini-menu-item {
  width: 100%;
  max-width: 100%;
  padding: 12px 8px;
  border-bottom: 1px dashed #e6e6e6;
  gap: 16px;
}

.ct-mini-menu-item:last-child {
  border-bottom: none;
}

/* ---------- Product card ---------- */
.product {
  height: auto !important;
  min-height: 380px;
  display: flex;
  flex-direction: column;
  border-radius: var(--cr-radius);
}

.product .product-thumb {
  display: block;
  overflow: hidden;
  aspect-ratio: 1 / 1;
}

.product .product-thumb img {
  width: 100%;
  height: 100%;
  max-height: 280px;
  object-fit: cover;
  border-radius: var(--cr-radius) var(--cr-radius) 0 0;
}

.product .product-body {
  padding: 20px;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 12px;
}

/* ---------- Photo gallery ---------- */
.photo-card img {
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 5;
  object-fit: cover;
}

/* ---------- Hero/banner ---------- */
.banner .title {
  font-size: clamp(28px, 5vw, 60px);
  line-height: 1.15;
}

/* ---------- Section padding-top dari header fixed ---------- */
.menu_page,
.about-us-page,
.product-single,
.login_page,
.old_order_section,
.checkout-page,
.order_details_section {
  padding-top: clamp(120px, 16vw, 180px);
}

/* ---------- Contact / Reservation ---------- */
.contact-wrapper {
  padding: var(--cr-space-section) 0 0;
}

.contact-page .card {
  width: 100% !important;
  height: auto !important;
  min-height: 140px;
  padding: 20px;
}

.contact-page .card-body {
  align-items: flex-start;
  gap: 12px;
}

.ct-info-box {
  padding: clamp(24px, 4vw, 40px);
  gap: 32px;
  border-radius: var(--cr-radius);
}

.contact-wrapper .form-control,
.checkout-billing .form-control {
  background: var(--cr-bg-soft);
  border-radius: 8px;
}

.contact-wrapper textarea {
  height: auto;
  min-height: 120px;
  resize: vertical;
}

.atc-form textarea {
  width: 100% !important;
  max-width: 420px;
  height: auto;
  min-height: 80px;
}

/* ---------- Cart sidebar ---------- */
.cart-sidebar,
.cart-sidebar-header {
  width: min(450px, 100vw) !important;
  max-width: 100vw;
}

.cart-sidebar-header {
  padding: 10px 20px;
}

.cart-sidebar-body {
  padding: 20px;
}

.cart-sidebar-footer {
  padding: 20px;
}

.slimScrollDiv {
  height: auto !important;
  max-height: 50vh;
}

/* ---------- Auth forms ---------- */
.auth-wrapper {
  display: flex;
  flex-wrap: wrap;
  border-radius: var(--cr-radius);
  overflow: hidden;
}

.auth-description {
  width: 100%;
  flex: 1 1 360px;
  padding: 32px;
}

.auth-form {
  width: 100%;
  flex: 1 1 360px;
  padding: 40px;
}

.forgot-password-page {
  width: min(532px, 100%);
  padding: 32px;
  border-radius: var(--cr-radius);
}

/* ---------- Checkout ---------- */
.checkout-billing {
  flex-wrap: wrap;
  gap: 24px;
}

.checkout-billing .order-summary {
  width: 100% !important;
  max-width: 471px;
  padding: 20px;
  border-radius: var(--cr-radius);
}

/* ---------- Order details ---------- */
.order_details_section .order-details {
  max-width: 100%;
  padding: 16px;
  border-radius: var(--cr-radius);
}

.order_details_section .order-body {
  flex-wrap: wrap;
  gap: 20px;
}

.order_details_section .billing-section,
.order_details_section .summary-section {
  width: 100%;
  max-width: 360px;
  height: auto;
  padding: 20px;
}

/* ---------- Old orders table ---------- */
.old_order_section .table-responsive {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.old_order_section .pagination {
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}

/* ---------- Footer ---------- */
.ct-footer .footer-widget {
  margin-bottom: 24px;
}

.footer-widget ul li a {
  word-break: break-word;
}

/* ---------- Buttons ---------- */
.btn-custom {
  width: auto;
  max-width: 100%;
  white-space: normal;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-custom.primary {
  width: 100%;
}

/* ---------- Section spacing tightening ---------- */
.ct-mini-menu-top {
  flex-wrap: wrap;
  gap: 8px;
}

/* ---------- Tablet (≤ 991px) ---------- */
@media (max-width: 991.98px) {
  .product {
    min-height: 0;
  }

  .product .product-thumb img {
    max-height: 220px;
  }

  .contact-page .gap60px {
    gap: 32px;
  }

  .auth-wrapper {
    flex-direction: column;
  }

  .auth-description,
  .auth-form {
    padding: 24px;
  }

  .checkout-billing {
    justify-content: flex-start;
  }

  .menu_page,
  .about-us-page,
  .product-single,
  .login_page,
  .old_order_section,
  .checkout-page,
  .order_details_section {
    padding-top: 140px;
  }
}

/* ---------- Mobile (≤ 767px) ---------- */
@media (max-width: 767.98px) {
  :root {
    --cr-space-section: 40px;
  }

  .ct-mini-menu-item {
    flex-direction: column;
    align-items: flex-start;
    padding: 12px 4px;
    gap: 8px;
  }

  .ct-mini-menu-top,
  .ct-mini-menu-bottom {
    width: 100%;
  }

  .product .product-body {
    padding: 14px;
    gap: 8px;
  }

  .banner .title {
    font-size: 30px;
  }

  .section-title-wrap {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }

  .ct-info-box {
    padding: 20px;
    gap: 24px;
  }

  .auth-form {
    padding: 24px 16px;
  }

  .forgot-password-page {
    padding: 24px 16px;
  }

  .menu_page,
  .about-us-page,
  .product-single,
  .login_page,
  .old_order_section,
  .checkout-page,
  .order_details_section {
    padding-top: 120px;
  }

  .order_details_section .order-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
}

/* ---------- Small mobile (≤ 575px) ---------- */
@media (max-width: 575.98px) {
  .container,
  .container-fluid {
    padding-left: 12px;
    padding-right: 12px;
  }

  .product .product-thumb img {
    max-height: 180px;
  }

  .btn-custom {
    width: 100%;
    padding: 12px 16px;
    font-size: 16px;
  }

  .ct-mini-menu-item .ct-mini-menu-bottom p {
    font-size: 14px;
    line-height: 22px;
  }

  .contact-page .card {
    padding: 14px;
  }

  .ct-info-box {
    padding: 16px;
    gap: 16px;
  }

  .order_details_section .order-details {
    padding: 12px;
  }
}

/* ---------- Very small (≤ 380px) ---------- */
@media (max-width: 380px) {
  .banner .title {
    font-size: 26px;
    line-height: 1.2;
  }

  .menu_page,
  .about-us-page,
  .product-single,
  .login_page,
  .old_order_section,
  .checkout-page,
  .order_details_section,
  .contact-page {
    padding-top: 110px;
  }

  .auth-form h2,
  .contact-page .title {
    font-size: 24px;
  }
}

/* ---------- Focus ring untuk aksesibilitas ---------- */
.contact-wrapper .form-control:focus,
.atc-form textarea:focus,
.auth-form .form-control:focus {
  outline: 2px solid var(--primary-color);
  outline-offset: 1px;
  box-shadow: none;
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
