.page-main { 
    padding-top: 80px; 
    padding-bottom: 80px;
}

/* Utility */
.is-hidden { display: none !important; }


.store-directory { padding: 4rem 8%; }
.directory-header { text-align: center; margin-bottom: 3rem; }
.directory-header h1 { font-size: 2.8rem; }
.directory-header p { font-size: 1.1rem; color: #666; margin-top: 0.5rem; }

.search-filter-bar { margin-top: 2rem; display: flex; flex-direction: column; align-items: center; gap: 1.5rem; }
.search-box { position: relative; width: 100%; max-width: 600px; }
.search-box i { position: absolute; left: 20px; top: 50%; transform: translateY(-50%); font-size: 1.4rem; color: #999; }
.search-box input { width: 100%; padding: 1rem 1rem 1rem 3.5rem; border-radius: 50px; border: 1px solid #ddd; font-size: 1rem; }

.filter-buttons { display: flex; gap: 1rem; flex-wrap: wrap; justify-content: center; }
.filter-btn { padding: 0.6rem 1.5rem; border-radius: 50px; border: 1px solid #ddd; background: transparent; cursor: pointer; font-weight: 500; transition: all 0.3s ease; -webkit-tap-highlight-color: transparent; }
.filter-btn.active, .filter-btn:hover { background-color: var(--secondary-color); color: var(--light-text-color); border-color: var(--secondary-color); }

/* Grid katalog */
.store-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2rem;
  justify-content: center;
}

/* animasi fade-in */
.store-card-link {
  text-decoration: none;
  color: var(--text-color);
  display: block;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
  max-width: 360px; /* batas lebar card default */
  margin: 0 auto;
}
.store-card-link.is-visible { opacity: 1; transform: translateY(0); }


.store-grid.grid-single .store-card-link { max-width: 600px; }
.store-grid.grid-double { grid-template-columns: repeat(2, minmax(300px, 360px)); }

/* card */
.store-card { background: var(--card-bg-color); border-radius: 15px; overflow: hidden; box-shadow: 0 4px 15px rgba(0,0,0,0.05); transition: transform 0.3s ease, box-shadow 0.3s ease; height: 100%; }
.store-card:hover { transform: translateY(-5px); box-shadow: 0 8px 25px rgba(0,0,0,0.1); }
.store-card-image img { width: 100%; height: 180px; object-fit: cover; }
.store-card-content { padding: 1.5rem; }
.store-card-content h3 { font-size: 1.4rem; margin-bottom: 0.5rem; }
.store-tags { font-size: 0.9rem; color: #777; margin-bottom: 1rem; }
.store-info { display: flex; align-items: center; gap: 1rem; font-size: 0.9rem; font-weight: 500; }
.store-info .rating i { color: #FFC107; }


.store-hero {
    position: relative;
    text-align: center;
    padding-bottom: 4rem;
    background: #ffffff;
}

.store-hero-banner {
    width: 100%;
    height: auto;
    max-height: 400px;
    object-fit: cover;
}

.store-hero-content {
    background: var(--card-bg-color);
    padding: 1rem;
    position: relative;
    margin: -100px auto 0;
    max-width: 90%;
    width: 800px;
    border-radius: 15px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.1); 
}

.store-logo {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    border: 5px solid var(--card-bg-color);
    object-fit: cover;
    margin-top: -95px;
    margin-bottom: 1rem;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
}

.store-hero-content h2 {
    margin-bottom: 0.5rem;
}

.store-hero-content p {
    color: #666;
}

.store-info-detail { display: flex; flex-wrap: wrap; justify-content: center; gap: 1.5rem; margin-top: 1rem; font-weight: 500; }
.store-info-detail span, .store-info-detail a { display: flex; align-items: center; gap: 0.5rem; }
.store-info-detail .rating i { color: #FFC107; }
.store-info-detail .status.open { color: var(--secondary-color); }



.menu-list { padding: 4rem 8%; }
.menu-list h3 { font-size: 1.8rem; margin-bottom: 2rem; border-bottom: 2px solid var(--primary-color); padding-bottom: 0.5rem; display: inline-block; }
.menu-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(400px, 1fr)); gap: 2rem; align-items: start; }
.menu-item-card { display: flex; gap: 1.5rem; background: var(--card-bg-color); border-radius: 15px; box-shadow: 0 4px 15px rgba(0,0,0,0.05); overflow: hidden; border: 3px solid transparent; transition: border-color 0.4s ease; align-items: stretch; }
.menu-item-card.recommended { border-color: var(--secondary-color); box-shadow: 0 8px 30px rgba(138,154,91,0.2); }
.menu-item-card img { width: 200px; height: 200px; object-fit: cover; flex-shrink: 0; pointer-events: none; }
.menu-item-content { padding: 1.5rem; display: flex; flex-direction: column; flex-grow: 1; min-width: 0; }
.menu-item-content h4 { font-size: 1.3rem; }
.menu-item-desc { font-size: 0.9rem; color: #666; margin: 0.2rem 0 1rem; }


.nutrition-header { font-weight: 600; cursor: pointer; display: flex; justify-content: space-between; align-items: center; margin-bottom: 0.5rem; }
.nutrition-header::after { content: '\ea4a'; font-family: 'Boxicons'; font-size: 1.2rem; transition: transform 0.4s ease; }
.nutrition-header.expanded::after { transform: rotate(180deg); }
.nutrition-details { background-color: #fafafa; border-radius: 8px; font-size: 0.9rem; max-height: 0; overflow: hidden; transition: max-height 0.5s ease-out, padding 0.5s ease; padding: 0 1rem; }
.nutrition-details.expanded { max-height: 220px; padding: 1rem; }
.nutrition-details ul { list-style: none; padding-left: 0; }
.nutrition-details ul li { margin-bottom: 0.2rem; }

.menu-item-footer { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding-top: 1rem; border-top: 1px solid #eee; flex-wrap: nowrap; margin-top: auto; }
.menu-item-price { font-size: 1.2rem; font-weight: 600; color: var(--primary-color); white-space: nowrap; line-height: 1; flex-shrink: 0; }
.menu-item-footer .btn-primary { flex-shrink: 0; }


.floating-cart { 
    position: fixed; 
    bottom: 30px; 
    right: 30px; 
    width: 60px; height: 60px; 
    background: var(--primary-color); 
    color: var(--light-text-color); 
    border-radius: 50%; 
    display: flex; 
    justify-content: center; 
    align-items: center; 
    font-size: 1.8rem; 
    cursor: pointer; 
    box-shadow: 0 5px 15px rgba(0,0,0,0.2); 
    z-index: 1500; 
    transition: transform 0.3s ease;
    right: calc(30px + var(--safe-area-inset-right));
    bottom: calc(30px + var(--safe-area-inset-bottom));
}
.floating-cart:hover { transform: scale(1.1); }
.cart-item-count { position: absolute; top: -5px; right: -5px; background: var(--secondary-color); color: var(--light-text-color); width: 25px; height: 25px; border-radius: 50%; display: flex; justify-content: center; align-items: center; font-size: 0.8rem; font-weight: 600; border: 2px solid var(--light-text-color); }

.checkout-modal-content {
    max-width: 600px;
    padding: 2rem;
    text-align: left;
    display: flex;
    flex-direction: column;
    max-height: 85vh; 
    width: 100%;
}

#cart-items-container {
    overflow-y: auto;
    margin: 1.5rem 0;
    padding-right: 10px;
    flex-shrink: 1;
    min-height: 50px;
    flex-grow: 1; 
}

.checkout-footer {
    overflow-y: auto;
    padding-right: 10px;
    flex-shrink: 1;
}

.checkout-modal-content h2 { text-align: center; }
.cart-item { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1rem; padding-bottom: 1rem; border-bottom: 1px solid #eee; }
.cart-item-details { flex-grow: 1; }
.cart-item-details h5 { font-size: 1rem; }
.cart-item-details p { font-size: 0.9rem; font-weight: 600; color: var(--primary-color); }
.cart-item-controls { display: flex; align-items: center; gap: 0.8rem; }
.qty-btn { width: 28px; height: 28px; border-radius: 50%; border: 1px solid var(--primary-color); background-color: transparent; color: var(--primary-color); font-size: 1.2rem; font-weight: 600; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: all 0.2s ease; -webkit-tap-highlight-color: transparent; }
.qty-btn:hover { background-color: var(--primary-color); color: white; }
.floating-cart.shake { animation: shake 0.5s ease; }
@keyframes shake { 10%, 90% { transform: translate3d(-1px, 0, 0); } 20%, 80% { transform: translate3d(2px, 0, 0); } 30%, 50%, 70% { transform: translate3d(-4px, 0, 0); } 40%, 60% { transform: translate3d(4px, 0, 0); } }

/* Impact Calculator */
.impact-calculator { background-color: #f4f9f0; border: 1px solid var(--secondary-color); border-radius: 10px; padding: 1rem; margin: 1.5rem 0; font-size: 0.9rem; }
.impact-calculator p { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 0.5rem; }
.impact-calculator p:last-child { margin-bottom: 0; }
.impact-calculator i { font-size: 1.2rem; color: var(--secondary-color); }

.checkout-summary { margin: 1.5rem 0; border-top: 1px solid #ddd; padding-top: 1rem; }
.summary-row { display: flex; justify-content: space-between; margin-bottom: 0.5rem; }
.summary-row.total { font-weight: 600; font-size: 1.2rem; margin-top: 1rem; }
.checkout-form { margin: 1.5rem 0; }
.checkout-form h3, .payment-options h3 { margin-bottom: 1rem; }
.checkout-form input, .checkout-form textarea { width: 100%; padding: 0.8rem; border: 1px solid #ddd; border-radius: 8px; margin-bottom: 1rem; font-size: 1rem; }


.payment-options .options-grid {
    display: grid;
    grid-template-columns: 1fr 1fr; 
    gap: 1rem;
}

.payment-options .options-grid .payment-btn:last-child {
    grid-column: 1 / -1; 
}
.payment-btn { width: 100%; padding: 0.8rem; border: 1px solid #ddd; border-radius: 8px; background: transparent; cursor: pointer; font-weight: 500; transition: all 0.3s ease; -webkit-tap-highlight-color: transparent; }
.payment-btn.active, .payment-btn:hover { background: var(--secondary-color); color: var(--light-text-color); border-color: var(--secondary-color); }

.btn-full { 
    width: 100%; 
    margin-top: 2rem; 
    padding: 1rem; 
    font-size: 1.1rem; 
    flex-shrink: 0;
}


#nutrition-float { 
    position: fixed; 
    bottom: 30px; 
    left: 30px; 
    background: var(--secondary-color); 
    color: var(--light-text-color); 
    padding: 10px 20px; 
    border-radius: 50px; 
    display: flex; 
    align-items: center; 
    gap: 0.5rem; 
    cursor: pointer; 
    z-index: 1500; 
    box-shadow: 0 5px 15px rgba(0,0,0,0.2); 
    transition: transform 0.3s ease;
    left: calc(30px + var(--safe-area-inset-left));
    bottom: calc(30px + var(--safe-area-inset-bottom));
}
#nutrition-float:hover { transform: scale(1.05); }
#nutrition-float i { font-size: 1.4rem; }
#nutrition-modal .modal-content { max-width: 400px; }
#nutrition-modal .modal-content h2 { color: var(--secondary-color); }
.nutrition-form { margin: 1.5rem 0; }
.nutrition-form label { display: block; margin-bottom: 0.5rem; font-weight: 500; }
.nutrition-form input { width: 100%; padding: 0.8rem; border-radius: 8px; border: 1px solid #ddd; font-size: 1rem; text-align: center; }


.fly-item { position: absolute; z-index: 2500; border-radius: 50%; transition: all 1s ease; }

.store-info-detail .location {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s ease;
}
.store-info-detail .location:hover {
    color: var(--primary-color);
    text-decoration: underline;
}



@media (max-width: 768px) {
    .menu-list, .store-directory {
        padding-left: 6%;
        padding-right: 6%;
    }
    .store-hero-content {
        margin-top: -80px;
    }
    .store-logo {
        width: 120px;
        height: 120px;
        margin-top: -75px;
    }
}

@media (max-width: 520px) {
  .store-grid, .store-grid.grid-double { 
      grid-template-columns: 1fr; 
  }
  .menu-grid { 
      grid-template-columns: 1fr; 
  }
  .menu-item-card { 
      flex-direction: column; 
      align-items: stretch; 
      text-align: left; 
  }
  .menu-item-card img { 
      width: 100%; 
      height: 220px; 
      flex-shrink: 0; 
      border-bottom: 1px solid #eee;
  }
  .menu-item-footer { 
      flex-wrap: nowrap; 
  }
  .menu-item-content {
      padding: 1rem;
  }
  #nutrition-float, #floating-cart {
      transform: scale(0.9);
  }
  #nutrition-float {
      left: calc(15px + var(--safe-area-inset-left));
      bottom: calc(15px + var(--safe-area-inset-bottom));
  }
  #floating-cart {
      right: calc(15px + var(--safe-area-inset-right));
      bottom: calc(15px + var(--safe-area-inset-bottom));
  }
  .checkout-modal-content {
      padding: 1.5rem;
      max-height: 90vh;
  }
  .payment-options .options-grid {
      grid-template-columns: 1fr;
  }
}

@supports (padding-bottom: env(safe-area-inset-bottom)) {
    .checkout-modal-content {
        padding-bottom: calc(1.5rem + env(safe-area-inset-bottom));
    }
}