@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;700&family=Playfair+Display:wght@700&display=swap");

:root {
  --primary-color: #a1623b;
  --secondary-color: #f5eadd;
  --dark-color: #3d2b24;
  --accent-color: #e8b4b8;
  --font-heading: "Playfair Display", serif;
  --font-body: "Poppins", sans-serif;
}

body {
  font-family: var(--font-body);
  color: var(--dark-color);
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-heading);
  color: var(--primary-color);
}

.btn-primary {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
  border-radius: 50px;
  padding: 10px 25px;
  font-weight: 500;
  transition: all 0.3s ease;
}

.btn-primary:hover,
.btn-primary:focus {
  background-color: #8a5331;
  border-color: #8a5331;
  /* transform: translateY(-2px); */
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

/* --- Redesign Header/Navbar --- */
.navbar {
  padding-top: 1rem;
  padding-bottom: 1rem;
  background-color: rgba(255, 255, 255, 0.8);
  backdrop-filter: saturate(180%) blur(5px);
  -webkit-backdrop-filter: saturate(180%) blur(5px);
  box-shadow: none;
  transition: background-color 0.5s ease, padding 0.5s ease,
    box-shadow 0.5s ease;
}

.navbar.scrolled {
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
  background-color: #fff;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.07);
}

.navbar-brand {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.5rem;
}

.navbar-brand img {
  height: 45px;
  transition: height 0.5s ease;
}

.navbar.scrolled .navbar-brand img {
  height: 35px;
}

.navbar-toggler {
  border: none;
}

.navbar-toggler:focus {
  box-shadow: none;
}

.navbar .nav-item {
  margin: 0 0.5rem;
}

.navbar .nav-link {
  font-weight: 500;
  color: var(--dark-color);
  position: relative;
  transition: color 0.3s ease;
  padding: 0.5rem 1rem;
  border-radius: 8px;
}

.navbar .nav-link:hover,
.navbar .nav-link.active {
  color: var(--primary-color);
  background-color: rgba(161, 98, 59, 0.1);
}

.navbar .nav-link::after {
  display: none;
}

.navbar .navbar-nav:last-child {
  gap: 0.5rem;
  align-items: center;
}

.navbar .nav-link .badge {
  position: absolute;
  top: 0px;
  right: 0px;
  font-size: 0.6em;
  transform: translate(25%, -25%);
}

.navbar .dropdown-menu {
  border-radius: 10px;
  border: none;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  padding: 0.5rem 0;
}

.navbar .dropdown-item {
  font-weight: 500;
  color: var(--dark-color);
  padding: 0.75rem 1.5rem;
  transition: all 0.2s ease;
}

.navbar .dropdown-item:hover {
  background-color: var(--secondary-color);
  color: var(--primary-color);
  padding-left: 1.7rem;
}

.navbar .dropdown-divider {
  margin: 0.5rem 0;
}

.navbar .nav-item .btn-login {
  padding: 0.5rem 1.5rem;
  border-radius: 50px;
  font-weight: 500;
  background-color: var(--primary-color);
  color: #fff;
  transition: all 0.3s ease;
}

.navbar .nav-item .btn-login:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(161, 98, 59, 0.3);
}

/* --- Redesign Hero Carousel --- */
#heroCarousel .carousel-item {
  height: 70vh;
  min-height: 500px;
  position: relative;
}

#heroCarousel .carousel-item > div {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

#heroCarousel .carousel-caption-custom {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding-bottom: 5rem;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
}

#heroCarousel .carousel-caption-custom h1 {
  text-shadow: none;
  color: var(--primary-color);
}

#heroCarousel .carousel-caption-custom p {
  text-shadow: none;
  color: var(--dark-color);
}

/* --- Redesign Section Titles --- */
.section-title {
  margin-bottom: 50px;
}

.section-title h2 {
  font-size: 2.5rem;
  position: relative;
  display: inline-block;
  padding-bottom: 10px;
}

.section-title h2::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 3px;
  background-color: var(--accent-color);
}
.section-title p {
  max-width: 600px;
  margin: 10px auto 0 auto;
  color: #6c757d;
  font-size: 1rem;
}

/* --- Redesigned Category Card --- */
.category-card {
  position: relative;
  border-radius: 16px;
  height: 220px;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  overflow: hidden;
  cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
}

.category-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}

.category-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  transition: transform 0.5s ease;
  opacity: 0.9;
}

.category-card:hover .category-bg {
  transform: scale(1.1);
}

.category-content {
  position: relative;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 20px;
  color: #333;
  text-align: center;
  z-index: 2;
  background: linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0.1) 0%,
    rgba(255, 255, 255, 0.8) 70%
  );
}

.category-card:hover .category-content {
  background: linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.9) 70%
  );
}

.category-icon {
  font-size: 5rem;
  color: #ff6b6b;
  transition: all 0.3s ease;
}

.category-card:hover .category-icon {
  transform: scale(1.2) translateY(-5px);
  color: #ff4757;
}

.category-card p {
  font-family: "Poppins", sans-serif;
  font-weight: 600;
  margin-bottom: 10px;
  color: #2f3542;
  transition: all 0.3s ease;
}

.category-card:hover h4 {
  color: #ff4757;
}

.explore-btn {
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.4s ease;
  font-size: 0.9rem;
  font-weight: 500;
  color: #ff4757;
  display: flex;
  align-items: center;
  gap: 5px;
}

.category-card:hover .explore-btn {
  opacity: 1;
  transform: translateY(0);
}

.category-card[data-category="Makanan"] .category-bg {
  background-image: url("https://images.unsplash.com/photo-1546069901-ba9599a7e63c?ixlib=rb-1.2.1&auto=format&fit=crop&w=800&q=80");
}

.category-card[data-category="Minuman"] .category-bg {
  background-image: url("https://images.unsplash.com/photo-1551029506-0807df4e2031?ixlib=rb-1.2.1&auto=format&fit=crop&w=800&q=80");
}

/* --- Redesign Product Card --- */
.product-card {
  border: none;
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
}
.product-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}
.product-card .card-img-top {
  border-radius: 15px 15px 0 0;
}
.product-card .card-body {
  background-color: #fff;
}
.product-card .card-title {
  color: var(--primary-color);
  font-size: 1.2rem;
}
.product-card .card-subtitle {
  font-weight: 700;
}

/* --- Redesign Footer --- */
.main-footer {
  background-color: var(--secondary-color);
  color: var(--dark-color);
}
.main-footer h5 {
  color: var(--primary-color);
  margin-bottom: 20px;
}
.main-footer a {
  color: var(--dark-color);
  text-decoration: none;
  transition: color 0.3s ease;
}
.main-footer a:hover {
  color: var(--primary-color);
}
.main-footer .social-icons a {
  display: inline-block;
  width: 40px;
  height: 40px;
  line-height: 40px;
  text-align: center;
  border-radius: 50%;
  background-color: #fff;
  margin-right: 10px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

/* --- Redesign Catalog Page --- */
.page-header-banner {
  padding: 4rem 0;
  background-color: var(--secondary-color);
  margin-bottom: 50px;
}

.filter-sidebar {
  background-color: #fff;
  padding: 25px;
  border-radius: 15px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.filter-sidebar h5 {
  font-family: var(--font-heading);
  color: var(--primary-color);
  padding-bottom: 10px;
  margin-bottom: 15px;
  border-bottom: 2px solid var(--secondary-color);
}

/* --- Redesign Product Detail Page --- */
.product-detail-container {
  background-color: #fff;
  padding: 30px;
  border-radius: 15px;
  box-shadow: 0 5px 25px rgba(0, 0, 0, 0.07);
}

.product-gallery .main-image img {
  border-radius: 10px;
  border: 1px solid #eee;
  width: 100%;
  height: auto;
}

.product-info h2 {
  font-size: 2.5rem;
  color: var(--dark-color);
}

.product-info .price {
  font-size: 2rem;
  font-weight: 700;
  color: var(--primary-color);
}

.product-info .product-meta {
  font-size: 0.9rem;
  color: #6c757d;
}

.product-info .product-meta strong {
  color: var(--dark-color);
}

.product-info .badge {
  font-size: 0.9rem;
}

/* Tab Styles */
.product-tabs .nav-tabs {
  border-bottom: 2px solid #dee2e6;
}

.product-tabs .nav-link {
  color: var(--dark-color);
  font-weight: 500;
  border: none;
  border-bottom: 2px solid transparent;
}

.product-tabs .nav-link.active {
  color: var(--primary-color);
  border-bottom-color: var(--primary-color);
  background-color: transparent;
}

/* --- Redesign Login & Register Page --- */
.auth-container {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 80vh;
}

.auth-card {
  width: 100%;
  max-width: 450px;
  padding: 2rem;
  border: none;
  border-radius: 15px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.auth-card .form-control {
  border-radius: 10px;
  padding: 12px 15px;
}

/* --- Redesign Cart Page --- */
.cart-item {
  border-bottom: 1px solid #dee2e6;
  padding-top: 1.5rem;
  padding-bottom: 1.5rem;
}

.cart-item:last-child {
  border-bottom: none;
}

.cart-item-img img {
  width: 100px;
  height: 100px;
  object-fit: cover;
  border-radius: 10px;
}

.cart-item-details h5 {
  font-family: var(--font-body);
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--dark-color);
}

.cart-item-details .text-muted {
  font-size: 0.9rem;
}

.cart-item-actions .form-control {
  max-width: 70px;
  text-align: center;
}

.cart-item-actions .btn-remove {
  height: 35px;
  width: 35px;
  border-radius: 8px;
  border: 1px solid #dc3545;
  font-size: 0.9rem;
  color: #dc3545;
  background: none;
  padding: 0;
}

.cart-item-actions .btn-remove:hover {
  background: #dc3545;
  color: var(--secondary-color);
}

.cart-summary-card {
  position: sticky;
  top: 100px;
  background-color: #fff;
  padding: 25px;
  border-radius: 15px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

/* --- Redesign Checkout Page --- */
.checkout-card {
  border: none;
  border-radius: 15px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
  margin-bottom: 1.5rem;
}

/* --- Redesign Order Success Page --- */
.order-success-section {
  background-color: #fff;
  border-radius: 15px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
  padding: 50px;
  margin-top: 30px;
  margin-bottom: 50px;
}

.success-icon {
  font-size: 5rem;
  color: #28a745;
  margin-bottom: 20px;
  animation: bounce 1s ease infinite;
}

.order-details {
  background-color: var(--secondary-color);
  border-radius: 10px;
  padding: 20px;
  margin: 30px 0;
}

.order-number {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--primary-color);
  margin: 15px 0;
}

.next-steps {
  margin-top: 40px;
}

.step {
  display: flex;
  align-items: flex-start;
  margin-bottom: 20px;
}

.step-number {
  background-color: var(--primary-color);
  color: white;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 15px;
  flex-shrink: 0;
}

.step-content {
  flex-grow: 1;
}

.action-buttons {
  margin-top: 40px;
}

.btn-outline-primary {
  border-color: var(--primary-color);
  color: var(--primary-color);
}

.btn-outline-primary:hover {
  background-color: var(--primary-color);
  color: white;
}

@keyframes bounce {
  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-15px);
  }
}

/* PAYMENT CONFIRMATION PAGE STYLES */
.payment-confirmation-container {
  display: block !important;
  background-color: #fff;
  border-radius: 15px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
  padding: 40px;
  margin-top: 30px;
  margin-bottom: 50px;
}

.order-summary {
  background-color: var(--secondary-color);
  border-radius: 10px;
  padding: 20px;
  margin-bottom: 30px;
}

/* --- Redesign Payment Method Selection --- */
.payment-methods-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(60px, 1fr));
  gap: 1rem;
  margin-bottom: 1rem;
  max-height: 110px;
  overflow: hidden;
  transition: max-height 0.5s ease-in-out;
}

.payment-methods-grid.show-all {
  max-height: 1000px;
}

.payment-method-box {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 1rem;
  border: 2px solid #eee;
  border-radius: 15px;
  text-align: center;
  text-decoration: none;
  background-color: #fff;
  cursor: pointer;
  aspect-ratio: 1 / 1;
  transition: border-color 0.3s ease;
}

.payment-method-box:hover {
  border-color: var(--primary-color);
}

.payment-method-box img {
  height: 20px;
  max-width: 40px;
  object-fit: contain;
  margin-bottom: 0.75rem;
}

.payment-method-box .method-name {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.6rem;
  color: var(--dark-color);
}

/* --- Custom Modal Styles for Payment --- */
.payment-modal .modal-content {
  border-radius: 15px;
  border: none;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.payment-modal .modal-header {
  background-color: var(--secondary-color);
  border-bottom: 2px solid var(--primary-color);
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
}

.payment-modal .modal-title-wrapper {
  display: flex;
  align-items: center;
  gap: 15px;
}

.payment-modal .modal-title-wrapper img {
  height: 35px;
  object-fit: contain;
}

.payment-modal .modal-title {
  color: var(--dark-color);
  font-size: 1.5rem;
}

.payment-modal .modal-body {
  padding: 1.5rem 2rem;
  font-size: 1rem;
  line-height: 1.7;
  color: var(--dark-color);
}

.payment-modal .modal-body strong {
  font-weight: 700;
  color: var(--dark-color);
}

.payment-modal .btn-close {
  background-color: #fff;
  border-radius: 50%;
  padding: 0.5rem;
  opacity: 0.8;
}

.payment-modal .btn-close:hover {
  opacity: 1;
  transform: scale(1.1);
}

.form-label {
  font-weight: 500;
  margin-bottom: 8px;
}

.form-control,
.form-select {
  border-radius: 8px;
  padding: 12px 15px;
  border: 1px solid #ddd;
}

.form-control:focus,
.form-select:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 0.25rem rgba(161, 98, 59, 0.25);
}

.file-upload-wrapper {
  position: relative;
  margin-bottom: 20px;
}

.file-upload-input {
  position: absolute;
  left: 0;
  top: 0;
  opacity: 0;
  width: 100%;
  height: 100%;
  cursor: pointer;
}

.file-upload-label {
  display: block;
  padding: 30px;
  border: 2px dashed #ddd;
  border-radius: 8px;
  text-align: center;
  transition: all 0.3s ease;
}

.file-upload-label:hover {
  border-color: var(--primary-color);
  background-color: rgba(245, 234, 221, 0.3);
}

.file-upload-icon {
  font-size: 2rem;
  color: var(--primary-color);
  margin-bottom: 10px;
}

.file-name {
  margin-top: 10px;
  font-size: 0.9rem;
  color: #666;
}

/* ORDER DETAIL CUSTOMER */
.order-detail-container {
  background-color: #fff;
  border-radius: 15px;
  box-shadow: 0 5px 25px rgba(0, 0, 0, 0.05);
  padding: 30px;
  margin-bottom: 30px;
}

.order-header {
  border-bottom: 2px solid var(--secondary-color);
  padding-bottom: 20px;
  margin-bottom: 20px;
}

.order-number {
  font-size: 1.8rem;
  color: var(--primary-color);
  font-weight: 700;
}

.order-status-badge {
  font-size: 0.9rem;
  padding: 8px 15px;
  border-radius: 50px;
}

.order-info-card {
  background-color: var(--secondary-color);
  border-radius: 10px;
  padding: 20px;
  margin-bottom: 20px;
  border-left: 4px solid var(--primary-color);
}

.order-info-title {
  font-size: 1.1rem;
  color: var(--primary-color);
  margin-bottom: 15px;
}

.product-card-detail {
  border: 1px solid #eee;
  border-radius: 10px;
  overflow: hidden;
  transition: all 0.3s ease;
  margin-bottom: 15px;
}

.product-image {
  height: 120px;
  object-fit: cover;
  border-radius: 10px 10px 0 0;
}

.product-name {
  color: var(--dark-color);
  font-weight: 600;
}

.product-price {
  color: var(--primary-color);
  font-weight: 700;
}

.summary-item {
  border-bottom: 1px dashed #ddd;
  padding: 10px 0;
}

.summary-total {
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--primary-color);
}

.timeline {
  position: relative;
  padding-left: 30px;
  margin-top: 20px;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 5px;
  top: 0;
  bottom: 0;
  width: 2px;
  background-color: var(--primary-color);
}

.timeline-item {
  position: relative;
  margin-bottom: 20px;
}

.timeline-item::before {
  content: "";
  position: absolute;
  left: -30px;
  top: 5px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background-color: var(--primary-color);
  border: 2px solid white;
}

.timeline-date {
  font-size: 0.8rem;
  color: #777;
}

/* --- Review & Rating Stars --- */
.rating {
  display: inline-block;
  border: none;
}

.rating > input {
  display: none;
}

.rating > label:before {
  content: "\f005";
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  margin: 5px;
  font-size: 1.5rem;
  display: inline-block;
  cursor: pointer;
}

.rating > label {
  color: #ddd;
  float: right;
  transition: color 0.2s ease;
}

.rating > input:checked ~ label,
.rating:not(:checked) > label:hover,
.rating:not(:checked) > label:hover ~ label {
  color: #f7ba2a;
}

.rating > input:checked + label:hover,
.rating > input:checked ~ label:hover,
.rating > label:hover ~ input:checked ~ label,
.rating > input:checked ~ label:hover ~ label {
  color: #f7ba2a;
}

/* RATING FILTER START */
.rating-filter {
  margin-bottom: 2rem;
}

.rating-filter .btn {
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  border-width: 1px;
  font-size: 0.9rem;
  font-weight: 500;
  padding: 0.4rem 1rem;
}

.rating-filter .btn-primary {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
}

.rating-filter .btn-outline-primary {
  color: var(--primary-color);
  border-color: var(--primary-color);
}

.rating-filter .btn-outline-primary:hover {
  background-color: var(--primary-color);
  color: white;
}

.rating-filter .btn-warning {
  background-color: #f7ba2a;
  border-color: #f7ba2a;
}

.rating-filter .btn-outline-secondary {
  color: var(--dark-color);
  border-color: #dee2e6;
}

.rating-filter .btn-outline-secondary:hover {
  background-color: #f8f9fa;
  border-color: var(--primary-color);
  color: var(--primary-color);
}

.rating-filter .badge {
  font-weight: 500;
  font-size: 0.75rem;
  padding: 0.25rem 0.5rem;
}

/* RATING FILTER END */

@media (max-width: 991.98px) {
  .navbar .navbar-collapse {
    margin-top: 1rem;
    padding: 1rem;
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
  }

  .navbar .nav-item {
    margin: 0;
    font-size: 1.3rem;
  }

  .navbar .nav-link {
    padding: 0.75rem 1rem;
    margin-bottom: 0.25rem;
  }

  .navbar .navbar-nav:last-child {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #eee;
    align-items: flex-start;
    gap: 1rem;
  }
}

@media (max-width: 768px) {
  .order-success-section {
    padding: 30px 20px;
  }

  .success-icon {
    font-size: 4rem;
  }

  .order-number {
    font-size: 1.5rem;
  }

  .order-detail-container {
    padding: 20px;
  }

  .order-info-card {
    padding: 15px;
  }

  .payment-method-header {
    align-items: flex-start;
  }

  .payment-method-name {
    padding: 8px 10px;
  }

  .payment-method-logo {
    margin-right: 0;
    margin-bottom: 10px;
  }

  .payment-method-details {
    padding-left: 0;
    padding-top: 15px;
  }

  .rating-filter .d-flex {
    gap: 0.5rem !important;
  }

  .rating-filter .btn {
    padding: 0.3rem 0.8rem;
    font-size: 0.8rem;
  }

  .rating-filter span.me-2 {
    display: none;
  }
}

@media (max-width: 576px) {
  html {
    font-size: 75%;
  }

  .section-title h2 {
    font-size: 1.8rem;
  }

  .rating-filter .btn {
    padding: 0.25rem 0.6rem;
  }

  .rating-filter .badge {
    display: none;
  }

  .payment-methods-grid {
    max-height: 80px;
  }

  .payment-methods-grid .payment-method-box.mobile-hidden {
    display: none;
  }

  .payment-methods-grid.show-all .payment-method-box.mobile-hidden {
    display: flex;
  }
}

@media (max-width: 450px) {
  .cart-item-details h5,
  .cart-item-details .text-muted {
    margin-left: 1.5rem;
  }
}
