/* ============================================================
   VARIABLES & THEME
============================================================ */
:root {
  --primary: #9b4922;
  --primary-dark: #823d1c;
  --secondary: #2c3e50;
  --accent: #e67e22;
  --bg-light: #fffcf5; /* Warm Cream */
  --bg-white: #ffffff;
  --text-dark: #333333;
  --text-light: #666666;
  --glass: rgba(255, 255, 255, 0.75);
  --glass-border: rgba(255, 255, 255, 0.5);
  --shadow-sm: 0 4px 6px rgba(0,0,0,0.05);
  --shadow-lg: 0 10px 30px rgba(155, 73, 34, 0.15);
  --radius-lg: 20px;
  --radius-xl: 30px;
}

/* ============================================================
   HERO SECTION (MODERN PREMIUM)
============================================================ */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(0,0,0,0.4), rgba(0,0,0,0.2)),
              url('https://uploads.onecompiler.io/42vbn3cw5/443k22ept/03518546-8f07-4ec2-9e26-88362b7fa1ae.png') center/cover no-repeat fixed;
  color: #fff;
  text-align: center;
  padding: 0 20px;
  position: relative;
  overflow: hidden;
}



.hero::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(180deg, rgba(0,0,0,0.3) 0%, rgba(0,0,0,0.7) 100%);
  z-index: 0;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 800px;
  margin: auto;
  animation: fadeInHero 1s ease forwards;
}

.hero h1 {
  font-size: 3.5rem;
  margin-bottom: 1.5rem;
  font-weight: 800;
  letter-spacing: -1px;
  line-height: 1.2;
  text-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

.hero p {
  font-size: 1.25rem;
  line-height: 1.8;
  margin-bottom: 2.5rem;
  font-weight: 300;
  color: rgba(255, 255, 255, 0.9);
}

.hero-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
}

.hero button {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  border: none;
  padding: 16px 36px;
  border-radius: var(--radius-xl);
  font-size: 1.1rem;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.3s ease;
  box-shadow: var(--shadow-lg);
}

.hero button:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 30px rgba(155, 73, 34, 0.4);
}

.hero .secondary-btn {
    background: transparent;
    border: 2px solid rgba(255,255,255,0.8);
    box-shadow: none;
}

.hero .secondary-btn:hover {
    background: white;
    color: #9b4922;
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(255,255,255,0.3);
}

/* Animasi masuk halus */
@keyframes fadeInHero {
  from {
    opacity: 0;
    transform: translateY(40px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero-content {
  animation: fadeInHero 1s ease forwards;
}

/* ============================================================
   RESET DAN FONT GLOBAL
============================================================ */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: 'Poppins', sans-serif;
  scroll-behavior: smooth;
}

body {
  background-color: var(--bg-light);
  color: var(--text-dark);
  line-height: 1.6;
}

/* ============================================================
   HEADER & NAVBAR (GLASSMORPHISM)
============================================================ */
header {
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--glass-border);
  padding: 1rem 5%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 1000;
  transition: all 0.3s ease;
}

header.scrolled {
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 4px 20px rgba(0,0,0,0.05);
}

header h1 {
  font-size: 1.6rem;
  font-weight: 800;
  background: linear-gradient(45deg, var(--primary), var(--primary-dark));
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: -0.5px;
}

nav {
  display: flex;
  align-items: center;
  gap: 2rem;
}

nav a {
  color: #555; /* Neutral dark for links */
  font-weight: 500;
  text-decoration: none;
  font-size: 1rem;
  transition: all 0.3s ease;
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
}

nav a:hover {
  color: #9b4922;
}

nav a.active-link {
  color: #9b4922;
  font-weight: 700;
}

nav a:active {
    transform: scale(0.95);
    color: #823d1c;
}

/* Specific styling for nav icons if needed */
.nav-icon {
  display: flex;
  flex-direction: row; /* Horizontal layout */
  align-items: center; 
  gap: 8px;
  margin: 0;
}

.nav-icon img {
  width: 20px;
  height: 20px;
  object-fit: contain;
  margin: 0;
}

/* Cart Button Style */
.nav-btn {
    background: #9b4922;
    color: white !important;
    padding: 8px 20px;
    border-radius: 50px;
    box-shadow: 0 4px 10px rgba(155, 73, 34, 0.2);
}

.nav-btn:hover {
    background: #823d1c;
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(155, 73, 34, 0.3);
}


/* ============================================================
   ABOUT SECTION
============================================================ */
.about {
  background: #fff;
  padding: 80px 20px;
  text-align: center;
}

.about-content {
  max-width: 800px;
  margin: auto;
}

.about h2 {
  color: #9b4922;
  font-size: 2em;
  margin-bottom: 20px;
}

.about p {
  color: #444;
  margin-bottom: 15px;
  font-size: 1.05em;
  line-height: 1.6;
}

/* ============================================================
   VALUE SECTION
============================================================ */
.value {
  background: #f5f7fa;
  text-align: center;
  padding: 80px 20px;
}

.value h2 {
  color: #9b4922;
  font-size: 2em;
  margin-bottom: 30px;
}

.value-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
  max-width: 1000px;
  margin: auto;
}

.value-card {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
  padding: 30px 20px;
}

.value-card img {
  width: 80px;
  margin-bottom: 15px;
}

.value-card h3 {
  color: #9b4922;
  margin-bottom: 10px;
}

.value-card p {
  color: #444;
  font-size: 0.95em;
}

/* ============================================================
   TESTIMONIAL SECTION (SLIDEABLE)
============================================================ */
.testimonial {
  text-align: center;
  padding: 4rem 1rem;
  background: #fffaf5;
}

.testimonial h2 {
  margin-bottom: 0.5rem;
  color: #9b4922;
}

.testimonial-slider {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  gap: 20px;
  padding: 20px 5%;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  -ms-overflow-style: none;
  max-width: 1200px;
  margin: 0 auto;
}

.testimonial-slider::-webkit-scrollbar {
  display: none;
}

.slides {
  display: contents;
}


.testimonial-slider .modern-card {
  flex: 0 0 320px;
  scroll-snap-align: center;
  margin: 0;
  text-align: left;
}


@media (max-width: 768px) {
  .testimonial-slider .modern-card {
    flex: 0 0 280px;
  }
}

.testimonial-card {
  flex: 0 0 calc(100% / 3 - 1rem);
  margin: 0 0.5rem;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(5px);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  text-align: left;
}



/* ============================================================
   KATALOG PRODUK
============================================================ */
.container {
  max-width: 1100px;
  margin: 2rem auto;
  padding: 0 1rem;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); /* Use auto-fill to keep card size consistent */
  gap: 1.5rem;
}

.product-card {
  background: var(--glass);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  text-align: center;
  transition: all 0.4s ease;
}

.product-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.product-card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.product-card h3 {
  margin: 0.8rem 0 0.3rem;
  font-size: 1.1rem;
  font-weight: 600;
}

.product-card p {
  color: #555;
  margin-bottom: 0.8rem;
}

.product-card button {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
  border: none;
  padding: 0.8rem 1.5rem;
  border-radius: var(--radius-lg);
  cursor: pointer;
  font-weight: 600;
  transition: all 0.3s ease;
  box-shadow: 0 4px 10px rgba(155, 73, 34, 0.2);
}

.product-card button:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 15px rgba(155, 73, 34, 0.3);
}

.catalogue-section {
  padding: 60px 20px 30px;
  text-align: center;
  background: #f5f7fa;
}

.catalogue-section h2 {
  color: #9b4922;
  font-size: 2em;
  font-weight: 700;
  margin-bottom: 30px;
}

/* ============================================================
   MODAL
============================================================ */
.modal {
  display: none;
  position: fixed;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.5);
  justify-content: center;
  align-items: center;
}

.modal-content {
  background: white;
  padding: 2rem;
  border-radius: 12px;
  width: 420px;
  max-height: 80vh;
  overflow-y: auto;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.modal-content h2 {
  margin-bottom: 1rem;
}

.modal-content li {
  border-bottom: 1px solid #eee;
  padding: 0.5rem 0;
}

/* ============================================================
   FORM & KOMENTAR
============================================================ */
form {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  margin-bottom: 1.5rem;
}

form input,
form textarea {
  padding: 0.8rem;
  border-radius: 8px;
  border: 1px solid #ccc;
  font-size: 0.95rem;
  outline-color: #9b4922;
}

form button {
  align-self: flex-start;
  background-color: #9b4922;
  color: white;
  border: none;
  padding: 0.6rem 1.2rem;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 500;
  transition: background 0.2s ease;
}

form button:hover {
  background-color: #823d1c;
}

.comment {
  background: #fff;
  border-radius: 10px;
  padding: 1rem;
  margin-top: 0.7rem;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

.comment strong {
  color: #9b4922;
  display: block;
  margin-bottom: 0.3rem;
}

.comment p {
  color: #444;
  font-size: 0.95rem;
}



/* ============================================================
   MODERN FOOTER
============================================================ */
footer {
  background: #2c3e50;
  color: #ecf0f1;
  padding: 60px 20px 20px;
  font-size: 0.95rem;
}

.footer-content {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 40px;
  margin-bottom: 40px;
}

.footer-col h3 {
  color: #fff;
  margin-bottom: 20px;
  font-size: 1.2rem;
  position: relative;
  display: inline-block;
}

.footer-col h3::after {
  content: '';
  display: block;
  width: 40px;
  height: 3px;
  background: #9b4922;
  margin-top: 8px;
  border-radius: 2px;
}

.footer-col p {
  line-height: 1.6;
  color: #bdc3c7;
  margin-bottom: 15px;
}

.footer-links a {
  display: block;
  color: #bdc3c7;
  text-decoration: none;
  margin-bottom: 10px;
  transition: color 0.2s;
}

.footer-links a:hover {
  color: #9b4922;
  padding-left: 5px;
}

.copyright {
  text-align: center;
  padding-top: 20px;
  border-top: 1px solid rgba(255,255,255,0.1);
  color: #95a5a6;
  font-size: 0.85rem;
}

/* ============================================================
   UTILITIES (MODERN)
============================================================ */
.section-title {
  text-align: center;
  margin-bottom: 60px;
}

.section-title h2 {
  font-size: 2.5rem;
  color: #2c3e50;
  font-weight: 700;
  margin-bottom: 15px;
}

.section-title p {
  color: #7f8c8d;
  max-width: 600px;
  margin: 0 auto;
  font-size: 1.1rem;
}

.modern-card {
  background: white;
  border-radius: 16px;
  padding: 30px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.05);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border: 1px solid rgba(0,0,0,0.03);
  text-align: center; 
}

.modern-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 40px rgba(0,0,0,0.1);
}

/* ============================================================
   PROMO SLIDER
============================================================ */
.promo-slider {
  position: relative;
  width: 75%;
  max-width: 1000px;
  margin: 1.5rem auto;
  overflow: hidden;
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  background: #fff;
}

.slides {
  display: flex;
  transition: transform 0.6s ease-in-out;
}

.slides img {
  width: 100%;
  flex-shrink: 0;
  object-fit: cover;
}

.nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.3);
  color: #fff;
  border: none;
  font-size: 1.8rem;
  width: 45px;
  height: 45px;
  cursor: pointer;
  z-index: 2;
  border-radius: 50%;
  transition: all 0.25s ease;
}

.nav:hover {
  background: rgba(0, 0, 0, 0.6);
  transform: translateY(-50%) scale(1.05);
}

.prev {
  left: 15px;
}

.next {
  right: 15px;
}

/* ============================================================
   MODERN CHECKOUT PAGE
============================================================ */
.checkout-section {
    background: linear-gradient(135deg, #f5f7fa 0%, #e4e8eb 100%);
    min-height: 100vh;
    padding: 40px 20px;
}

.checkout-container {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  min-height: 80vh;
  padding-top: 2rem;
}

.checkout-box {
  background: var(--glass);
  padding: 3rem;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  text-align: center;
  width: 100%;
  max-width: 900px;
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.checkout-box h2 {
  color: #2c3e50;
  margin-bottom: 2rem;
  font-weight: 700;
  font-size: 2rem;
  position: relative;
  display: inline-block;
}

.checkout-box h2::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background: #9b4922;
    margin: 10px auto 0;
    border-radius: 2px;
}

/* Table Styling */
#cartTable {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0 15px; /* Spacing between rows */
  margin-bottom: 2rem;
}

#cartTable thead th {
  background: transparent;
  color: #7f8c8d;
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.85rem;
  letter-spacing: 1px;
  padding: 10px 20px;
  border: none;
  text-align: left;
}

#cartTable thead th:last-child {
    text-align: right;
}

.checkout-box #cartTable tbody tr {
  background: rgba(255, 255, 255, 0.5);
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s, box-shadow 0.2s;
  border-radius: 12px;
}

#cartTable tbody tr:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.06);
}

#cartTable td {
  padding: 20px;
  border: none;
  vertical-align: middle;
  color: var(--secondary);
  font-size: 1rem;
  background: transparent;
}

#cartTable td:first-child {
  border-top-left-radius: 12px;
  border-bottom-left-radius: 12px;
  text-align: left;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 15px;
}

#cartTable td:last-child {
  border-top-right-radius: 12px;
  border-bottom-right-radius: 12px;
  text-align: right;
}

#cartTable img {
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    object-fit: cover;
    width: 60px;
    height: 60px;
}

/* Quantity Controls */
.qty-control {
    display: inline-flex;
    align-items: center;
    background: #f0f2f5;
    border-radius: 8px;
    padding: 4px;
}

.qty-btn {
    background: #fff;
    border: none;
    width: 28px;
    height: 28px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: bold;
    color: #9b4922;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
}

.qty-btn:hover {
    background: #9b4922;
    color: #fff;
}

.qty-val {
    margin: 0 12px;
    font-weight: 600;
    min-width: 20px;
    text-align: center;
}

/* Action Buttons */
.btn-delete {
  background-color: #fff0f0;
  color: #e74c3c;
  border: none;
  padding: 8px 16px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 500;
  transition: all 0.2s;
  display: inline-block;
}

.btn-delete:hover {
  background-color: #e74c3c;
  color: white;
}

.btn-reset {
  background: transparent;
  border: 1px solid #e74c3c;
  color: #e74c3c;
  padding: 10px 24px;
  border-radius: 50px;
  font-weight: 500;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s;
  margin-top: 15px;
}

.btn-reset:hover {
    background: #e74c3c;
    color: white;
}

#totalPrice {
    font-size: 1.4rem;
    color: #2c3e50;
    margin: 30px 0;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 10px;
    font-weight: 700;
}

/* Qris & Payment */
.qris-section {
    margin-top: 40px;
    padding: 40px;
    border-top: 2px dashed #eee;
}

.qris-frame {
    display: inline-block;
    padding: 15px;
    background: #fff;
    border: 1px solid #eee;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    position: relative;
}

.qris-frame::before {
    content: 'SCAN ME';
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: #9b4922;
    color: white;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: bold;
}

.qris-image {
  width: 220px;
  border-radius: 4px;
}

.payment-info {
  font-size: 0.95rem;
  color: #555;
  margin: 20px auto;
  max-width: 80%;
  line-height: 1.6;
}

.send-proof-btn {
  background: linear-gradient(135deg, #9b4922 0%, #d35400 100%);
  color: white;
  border: none;
  padding: 16px 40px;
  border-radius: 50px;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 10px 20px rgba(155, 73, 34, 0.3);
  transition: transform 0.2s, box-shadow 0.2s;
}

.send-proof-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 15px 30px rgba(155, 73, 34, 0.4);
}

/* ============================================================
   COMMUNITY PAGE - MODERN
============================================================ */
.forum-section {
    background: #f0f2f5;
    min-height: 100vh;
    padding: 30px 20px;
}

.forum-container {
    max-width: 800px;
    margin: 0 auto;
}

/* Post Input Card */
.post-form-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    padding: 20px;
    margin-bottom: 30px;
    border: 1px solid #e1e4e8;
}

.post-form-card h3 {
    margin-bottom: 20px;
    color: #9b4922;
    display: flex;
    align-items: center;
    gap: 10px;
}

.form-group {
    margin-bottom: 15px;
}

.form-input, .form-textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 0.95rem;
    background: #f9f9f9;
    transition: all 0.3s;
}

.form-input:focus, .form-textarea:focus {
    background: #fff;
    border-color: #9b4922;
    outline: none;
    box-shadow: 0 0 0 3px rgba(155, 73, 34, 0.1);
}

.form-textarea {
    resize: vertical;
    min-height: 100px;
}

.submit-post-btn {
    background: #9b4922;
    color: white;
    padding: 10px 24px;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
    float: right;
}

.submit-post-btn:hover {
    background: #823d1c;
}

/* Feed Actions */
.feed-filter {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
}

.filter-btn {
    background: none;
    border: none;
    padding: 8px 16px;
    font-weight: 600;
    color: #777;
    cursor: pointer;
    border-radius: 20px;
}

.filter-btn.active {
    background: #e8dcd6;
    color: #9b4922;
}

/* Post Card */
.post-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.03);
    padding: 20px;
    margin-bottom: 20px;
    border: 1px solid #eee;
    transition: transform 0.2s;
}

.post-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

.post-header {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
}

.user-avatar {
    width: 40px;
    height: 40px;
    background: #eee;
    border-radius: 50%;
    margin-right: 12px;
    object-fit: cover;
}

.user-info strong {
    display: block;
    color: #333;
    font-size: 1rem;
}

.user-info span {
    font-size: 0.8rem;
    color: #999;
}

.post-body h4 {
    font-size: 1.1rem;
    margin-bottom: 8px;
    color: #222;
}

.post-body p {
    color: #555;
    line-height: 1.5;
    margin-bottom: 15px;
}

.post-footer {
    display: flex;
    gap: 20px;
    padding-top: 15px;
    border-top: 1px solid #f0f0f0;
}

.action-btn {
    background: none;
    border: none;
    display: flex;
    align-items: center;
    gap: 6px;
    color: #65676b;
    font-weight: 500;
    cursor: pointer;
    font-size: 0.9rem;
    transition: color 0.2s;
}

.action-btn:hover {
    color: #9b4922;
}

/* Comments */
.comments-container {
    margin-top: 15px;
    background: #f9f9f9;
    border-radius: 8px;
    padding: 15px;
    display: none; /* Hidden by default */
}

.comments-container.show {
    display: block;
}

.comment-item {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
}

.comment-bubble {
    background: #fff;
    padding: 8px 12px;
    border-radius: 12px;
    border: 1px solid #eee;
    flex: 1;
}

/* ============================================================
   GLOBAL POLISH & ANIMATIONS
============================================================ */
html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px; /* Offset for sticky header */
}

::selection {
  background: #9b4922;
  color: white;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-track {
  background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
  background: #cba595;
  border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
  background: #9b4922;
}

/* Reveal Animation */
.reveal {
  position: relative;
  transform: translateY(50px);
  opacity: 0;
  transition: all 0.8s ease;
}

.reveal.active {
  transform: translateY(0);
  opacity: 1;
}

/* Product Card Enhanced Hover */
.product-card {
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.product-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 15px 30px rgba(0,0,0,0.1);
}

.product-card button {
    transition: all 0.3s ease;
    opacity: 0.9;
}

.product-card button:hover {
    opacity: 1;
    transform: scale(1.05);
}

.comment-bubble strong {
    font-size: 0.85rem;
    color: #9b4922;
}

.comment-bubble p {
    font-size: 0.9rem;
    margin: 4px 0 0;
    color: #333;
}

/* ============================================================
   RESPONSIVE MOBILE DESIGN
============================================================ */
@media (max-width: 768px) {
    /* --- Header & Navbar --- */
    header {
        flex-direction: column;
        gap: 15px;
        padding: 1rem;
    }

    nav {
        width: 100%;
        justify-content: center;
        gap: 15px;
    }

    nav a {
        font-size: 0.9rem;
    }

    /* --- Hero Section --- */
    .hero {
        padding: 100px 20px 60px;
    }

    .hero h1 {
        font-size: 2.2rem;
    }

    .hero p {
        font-size: 1rem;
    }

    .hero-buttons {
        flex-direction: column;
        gap: 10px;
    }

    .hero button {
        width: 100%;
    }

    /* --- Sections & Titles --- */
    .section-title h2 {
        font-size: 2rem;
    }

    .promo-slider {
        width: 95%;
    }
    
    .nav {
        font-size: 1.2rem;
        width: 35px;
        height: 35px;
    }

    /* --- Checkout Page (Mobile Table to Cards) --- */
    .checkout-box {
        padding: 1.5rem;
    }

    #cartTable, #cartTable tbody, #cartTable tr, #cartTable td {
        display: block;
        width: 100%;
    }

    #cartTable thead {
        display: none; /* Hide headers on mobile */
    }

    #cartTable tr {
        margin-bottom: 20px;
        border: 1px solid #eee;
        border-radius: 12px;
        padding: 15px;
        box-shadow: 0 4px 10px rgba(0,0,0,0.05);
    }

    #cartTable td {
        text-align: center;
        padding: 10px 0;
        border-bottom: 1px solid #f5f5f5;
        display: flex;
        justify-content: center;
        align-items: center;
        flex-direction: column;
        gap: 5px;
    }

    #cartTable td:last-child {
        border-bottom: none;
    }

    #cartTable td:first-child {
        text-align: center;
        align-items: center;
        gap: 15px;
    }
    
    #cartTable img {
        width: 100px;
        height: 100px;
        border-radius: 10px;
        object-fit: cover;
        margin-bottom: 5px;
    }

    /* --- Footer --- */
    .footer-content {
        grid-template-columns: 1fr; /* Stack columns */
        text-align: center;
        gap: 30px;
    }
    
    .footer-links a:hover {
        padding-left: 0; /* Disable shift on mobile center alignment */
        color: #9b4922;
    }
    
    .footer-col h3::after {
        margin: 8px auto 0; /* Center the underline */
    }

    /* --- Community Page --- */
    .forum-section {
        padding-inline: 10px;
    }

    .post-header {
        flex-direction: row; /* Keep row */
    }
    
    .post-footer {
        flex-wrap: wrap; /* Allow wrapping if buttons too wide */
    }
    
    .action-btn {
        font-size: 0.8rem;
    }

    /* --- QRIS Fix --- */
    .qris-image {
        max-width: 100%;
        height: auto;
    }

    .qris-frame {
        width: 100%;
        display: flex;
        justify-content: center;
    }

    .checkout-box {
        padding: 1.5rem 1rem;
        width: 95%; /* Use more width on mobile */
    }

    .checkout-container {
        padding-top: 1rem;
    }

    .qris-section {
        padding: 20px 0;
    }

    .payment-info {
        max-width: 100%;
        font-size: 0.9rem;
    }

    /* --- Navbar Tweak --- */
    nav {
        flex-wrap: wrap; /* Allow wrapping for very small screens */
    }
    
    header h1 {
        text-align: center;
        font-size: 1.5rem;
    }
}

/* ============================================================
   TOAST NOTIFICATION
============================================================ */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
}

.toast {
    background: white;
    color: #2c3e50;
    padding: 15px 20px;
    border-radius: 10px;
    border-left: 5px solid #9b4922;
    box-shadow: 0 5px 20px rgba(0,0,0,0.15);
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 15px;
    animation: toastSlideIn 0.3s ease forwards;
    min-width: 250px;
}

.toast.hide {
    animation: toastSlideOut 0.3s ease forwards;
}

.toast i {
    color: #27ae60;
    font-size: 1.2rem;
}

@keyframes toastSlideIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

@keyframes toastSlideOut {
    from { transform: translateX(0); opacity: 1; }
    to { transform: translateX(100%); opacity: 0; }
}

@media (max-width: 480px) {
    /* Extra Small Screen Tweaks */
    .hero h1 {
        font-size: 1.8rem;
    }
    
    nav {
        flex-direction: row; 
        flex-wrap: wrap;
        justify-content: center;
    }
}

/* Filter Buttons */
.filter-btn {
    background: none;
    border: 1px solid #ddd;
    padding: 8px 20px;
    border-radius: 50px;
    margin: 5px;
    cursor: pointer;
    font-size: 0.95rem;
    color: #555;
    transition: all 0.2s;
}


/* Custom Modal */
.modal-overlay {
    position: fixed;
    top: 0; 
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal-overlay.show {
    opacity: 1;
    visibility: visible;
}

.modal-box {
    background: white;
    padding: 25px;
    border-radius: 16px;
    width: 90%;
    max-width: 400px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.modal-overlay.show .modal-box {
    transform: scale(1);
}

.modal-title {
    font-size: 1.2rem;
    font-weight: bold;
    color: #2c3e50;
    margin-bottom: 10px;
}

.modal-text {
    color: #555;
    margin-bottom: 20px;
}

.modal-actions {
    display: flex;
    justify-content: center;
    gap: 15px;
}

.modal-btn {
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    border: none;
    transition: transform 0.2s;
}

.modal-btn.cancel {
    background: #f1f1f1;
    color: #333;
}

.modal-btn.confirm {
    background: #9b4922;
    color: white;
}

.modal-btn:hover {
    transform: scale(1.05);
}






/* ============================================================
   EMPTY CART STATE
============================================================ */
.empty-cart-state {
  text-align: center;
  padding: 60px 20px;
  animation: fadeIn 0.5s ease;
}

.empty-cart-icon img {
  animation: floatIcon 3s ease-in-out infinite;
}

@keyframes floatIcon {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

.btn-empty-cart {
  display: inline-block;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
  padding: 15px 35px;
  border-radius: 50px;
  text-decoration: none;
  font-weight: 600;
  font-size: 1.1rem;
  box-shadow: 0 5px 15px rgba(155, 73, 34, 0.3);
  transition: all 0.3s ease;
  border: 1px solid rgba(255,255,255,0.2);
}

.btn-empty-cart:hover {
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 8px 25px rgba(155, 73, 34, 0.4);
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
}

/* RESPONSIVE TWEAKS */
@media (max-width: 768px) {
  .empty-cart-state {
    padding: 40px 10px;
  }
  .empty-cart-icon img {
    width: 100px;
  }
  .btn-empty-cart {
    width: 100%;
    max-width: 250px;
  }
}


/* ============================================================
   MODERN FORM OVERRIDES (GLASSMORPHISM)
============================================================ */
.post-form-card {
    background: var(--glass) !important;
    backdrop-filter: blur(15px) !important;
    -webkit-backdrop-filter: blur(15px) !important;
    border: 1px solid var(--glass-border) !important;
    border-radius: var(--radius-xl) !important;
    box-shadow: var(--shadow-lg) !important;
    padding: 30px !important;
    margin-bottom: 40px !important;
    position: relative;
    overflow: hidden;
    transition: transform 0.3s ease;
}

.post-form-card:hover {
    transform: translateY(-5px);
}

.post-form-card h3 {
    margin-bottom: 25px !important;
    color: var(--primary) !important;
    font-size: 1.4rem !important;
    font-weight: 700 !important;
}

.form-group {
    margin-bottom: 20px !important;
    position: relative;
}

.form-input, .form-textarea {
    width: 100%;
    padding: 16px 20px !important;
    border: 2px solid transparent !important;
    border-radius: 12px !important;
    font-size: 1rem !important;
    background: rgba(255, 255, 255, 0.6) !important;
    color: var(--text-dark) !important;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.02) !important;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1) !important;
}

.form-input::placeholder, .form-textarea::placeholder {
    color: #999;
}

.form-input:focus, .form-textarea:focus {
    background: #fff !important;
    border-color: var(--primary) !important;
    outline: none !important;
    box-shadow: 0 5px 15px rgba(155, 73, 34, 0.1) !important;
    transform: translateY(-2px);
}

.form-textarea {
    min-height: 120px !important;
    font-family: inherit;
}

.submit-post-btn {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark)) !important;
    color: white !important;
    padding: 12px 30px !important;
    border: none !important;
    border-radius: 50px !important;
    font-weight: 600 !important;
    font-size: 1rem !important;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(155, 73, 34, 0.3) !important;
    transition: all 0.3s ease !important;
    display: flex !important;
    align-items: center;
    gap: 8px;
    float: right;
}

.submit-post-btn:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 8px 25px rgba(155, 73, 34, 0.4) !important;
    background: linear-gradient(135deg, var(--primary-dark), var(--primary)) !important;
}

/* RESPONSIVE TWEAKS FOR MOBILE FORM */
@media (max-width: 768px) {
  .post-form-card {
      padding: 20px !important; /* Reduce padding on mobile */
      margin-bottom: 30px !important;
  }
  
  .post-form-card h3 {
      font-size: 1.2rem !important;
  }
  
  .submit-post-btn {
      width: 100%; /* Full width button on mobile */
      justify-content: center;
      margin-top: 10px;
  }
}

/* Ensure nothing overflows */
* {
    box-sizing: border-box; 
}
/* Override Filter Button Active State */
.filter-btn.active {
    background: var(--primary) !important;
    color: #fff !important;
    box-shadow: 0 4px 10px rgba(155, 73, 34, 0.3);
}
