/* Component & layout styles */

.site-header{
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255,255,255,0.05);
  background: rgba(11,59,48,0.9);
  flex-wrap: wrap;
  gap: 10px;
}

.brand{
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo{
  display: flex;
  align-items: center;
}

.logo-img{
  height: 44px;
  width: auto;
  display: block;
  border-radius: 8px;
}

.subtitle{
  font-size: 12px;
  color: var(--muted);
}

.category{
  font-size: 13px;
  color: var(--muted);
  font-weight: 500;
}

/* Features Bar */
.features-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 12px 16px;
  background: linear-gradient(90deg, rgba(184,145,64,0.15), rgba(184,145,64,0.08), rgba(184,145,64,0.15));
  border-bottom: 1px solid rgba(184,145,64,0.2);
  flex-wrap: wrap;
  position: sticky;
  top: 70px;
  z-index: 25;
  backdrop-filter: blur(8px);
}

.feature-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--cream);
  white-space: nowrap;
}

.feature-icon {
  font-size: 18px;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
}

.feature-text {
  background: linear-gradient(90deg, var(--cream), var(--gold));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.feature-divider {
  width: 4px;
  height: 4px;
  background: var(--gold);
  border-radius: 50%;
  opacity: 0.6;
}

@media (max-width: 600px) {
  .features-bar {
    gap: 12px;
    padding: 10px 12px;
    top: 65px;
  }
  
  .feature-item {
    font-size: 12px;
  }
  
  .feature-icon {
    font-size: 16px;
  }
  
  .feature-divider {
    display: none;
  }
}

/* Search Container */
.search-container {
  width: 100%;
  order: 3;
  margin-top: 8px;
}

.search-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  background: rgba(255,255,255,0.05);
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.08);
  transition: all var(--anim-fast);
}

.search-wrapper.focused {
  border-color: var(--gold);
  background: rgba(255,255,255,0.08);
  box-shadow: 0 0 0 3px rgba(184,145,64,0.15);
}

.search-input {
  flex: 1;
  background: transparent;
  border: none;
  padding: 12px 16px;
  color: var(--cream);
  font-size: 15px;
  outline: none;
}

.search-input::placeholder {
  color: rgba(246,239,230,0.5);
}

.search-clear {
  background: rgba(255,255,255,0.1);
  border: none;
  color: var(--cream);
  width: 28px;
  height: 28px;
  border-radius: 50%;
  cursor: pointer;
  margin-right: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  transition: all var(--anim-fast);
}

.search-clear:hover {
  background: rgba(231,76,60,0.3);
}

.search-stats {
  font-size: 12px;
  color: var(--muted);
  margin-top: 6px;
  padding-left: 4px;
}

.search-stats.no-results {
  color: var(--danger);
}

/* Filter Container */
.filter-container {
  display: flex;
  gap: 8px;
  padding: 0 12px 12px;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.filter-container::-webkit-scrollbar {
  display: none;
}

.filter-btn {
  flex-shrink: 0;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.06);
  color: var(--muted);
  padding: 10px 16px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--anim-fast);
  white-space: nowrap;
}

.filter-btn:hover {
  background: rgba(255,255,255,0.08);
  border-color: rgba(184,145,64,0.2);
}

.filter-btn.active {
  background: var(--gold);
  color: #07271a;
  border-color: var(--gold);
}

/* Sort Wrapper */
.sort-wrapper {
  padding: 0 12px 12px;
  display: flex;
  justify-content: flex-end;
}

.sort-select {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.06);
  color: var(--cream);
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 13px;
  cursor: pointer;
  outline: none;
}

.sort-select:focus {
  border-color: var(--gold);
}

.sort-select option {
  background: var(--bg);
  color: var(--cream);
}

main{
  padding: 12px;
  position: relative;
  z-index: 10;
}

.product-grid{
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

/* Card Styles */
.card{
  background: linear-gradient(180deg, rgba(255,255,255,0.03), rgba(0,0,0,0.02));
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(185,145,64,0.08);
  transition: transform var(--anim-fast), box-shadow var(--anim-fast), border-color var(--anim-fast);
  touch-action: manipulation;
  position: relative;
  will-change: transform, opacity;
  opacity: 0;
  transform: translateY(8px);
  animation: fadeUp var(--anim-medium) ease forwards;
  cursor: pointer;
}

.card:active{
  transform: scale(0.98);
}

.card:hover{
  box-shadow: var(--shadow-lg);
  border-color: var(--gold);
}

.card-img{
  width: 100%;
  height: 110px;
  object-fit: cover;
  display: block;
  transition: transform var(--anim-medium) ease;
}

.card:hover .card-img{
  transform: scale(1.06);
}

.card-body{
  padding: 10px;
  position: relative;
}

.title{
  font-size: 14px;
  font-weight: 600;
  color: var(--cream);
  margin: 0 0 6px;
  line-height: 1.3;
}

.title mark {
  background: var(--gold);
  color: #07271a;
  padding: 0 2px;
  border-radius: 2px;
}

.price{
  font-weight: 700;
  color: var(--gold);
  font-size: 15px;
}

.badges{
  margin-top: 6px;
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.badge{
  background: rgba(255,255,255,0.05);
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  color: var(--muted);
  border: 1px solid rgba(255,255,255,0.04);
  animation: popIn var(--anim-fast) ease both;
}

/* Card Action Buttons */
.add-to-cart-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  transition: all var(--anim-fast);
  z-index: 5;
  background: var(--gold);
  box-shadow: var(--shadow-gold);
}

.add-to-cart-btn:hover {
  transform: scale(1.1);
}

/* No Results Message */
.no-results-message {
  grid-column: 1 / -1;
  text-align: center;
  padding: 40px 20px;
  color: var(--muted);
}

.no-results-icon {
  font-size: 48px;
  margin-bottom: 16px;
}

/* sheen effect */
.card::after{
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 100%;
  pointer-events: none;
  opacity: 0;
  transform: translateX(-120%) rotate(12deg);
  background: linear-gradient(90deg, transparent, rgba(184,145,64,0.15), transparent);
  transition: transform var(--anim-medium) ease, opacity var(--anim-medium) ease;
}

.card:hover::after{
  opacity: 1;
  transform: translateX(120%) rotate(12deg);
}

/* Loading State */
.loading{
  display: flex;
  align-items: center;
  justify-content: center;
  height: 200px;
  color: var(--muted);
  grid-column: 1 / -1;
}

.loading::after{
  content: "";
  width: 30px;
  height: 30px;
  border: 2px solid rgba(184,145,64,0.3);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-left: 12px;
}

@keyframes spin{
  to { transform: rotate(360deg); }
}

/* ===== MODAL / BOTTOM SHEET ===== */
.modal{
  position: fixed;
  inset: 0;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  pointer-events: none;
  z-index: 9999;
  visibility: hidden;
}

.modal[aria-hidden="false"]{
  pointer-events: auto;
  visibility: visible;
}

.modal-overlay{
  position: absolute;
  inset: 0;
  background: var(--overlay);
  opacity: 0;
  transition: opacity var(--anim-medium) ease;
  z-index: 1;
}

.modal[aria-hidden="false"] .modal-overlay{
  opacity: 1;
}

.modal-sheet{
  position: relative;
  width: 100%;
  max-width: 780px;
  background: linear-gradient(180deg, var(--panel), #07332a);
  border-top-left-radius: 24px;
  border-top-right-radius: 24px;
  transform: translateY(100%);
  opacity: 0;
  transition: transform var(--anim-medium) cubic-bezier(.2,.9,.2,1), opacity var(--anim-medium);
  box-shadow: 0 -20px 60px rgba(0,0,0,0.8);
  z-index: 2;
  max-height: 90vh;
  overflow-y: auto;
}

.modal[aria-hidden="false"] .modal-sheet{
  transform: translateY(0);
  opacity: 1;
}

.modal-content{
  display: flex;
  flex-direction: column;
  padding: 24px;
  position: relative;
  z-index: 3;
}

.modal-image{
  position: relative;
  width: 100%;
}

.modal-image img{
  width: 100%;
  height: 240px;
  object-fit: cover;
  border-radius: 14px;
  display: block;
}

.modal-info{
  padding-top: 20px;
  position: relative;
  z-index: 4;
}

.modal-close{
  position: absolute;
  right: 20px;
  top: 20px;
  background: rgba(0,0,0,0.6);
  border: 0;
  color: var(--cream);
  font-size: 20px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  cursor: pointer;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--anim-fast);
  backdrop-filter: blur(4px);
}

.modal-close:hover{
  background: rgba(0,0,0,0.8);
  transform: rotate(90deg);
}

.modal .price{
  font-size: 24px;
  margin: 8px 0;
}

.modal h2{
  margin: 0;
  font-size: 22px;
  line-height: 1.3;
}

.modal .desc{
  color: var(--muted);
  line-height: 1.6;
  margin: 12px 0;
}

.modal .meta{
  color: var(--gold);
  font-size: 14px;
  margin-bottom: 12px;
  font-weight: 500;
}

/* Product Details in Modal */
.product-details {
  margin: 16px 0;
  padding: 16px;
  background: rgba(255,255,255,0.03);
  border-radius: 12px;
}

.product-details h4 {
  font-size: 14px;
  color: var(--gold);
  margin-bottom: 12px;
}

.nutrition-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.nutrition-item {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
}

.nutrition-label {
  color: var(--muted);
}

.nutrition-value {
  color: var(--cream);
  font-weight: 500;
}

.allergens {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(255,255,255,0.05);
}

.allergen-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 8px;
}

.allergen-tag {
  background: rgba(231,76,60,0.15);
  color: #e74c3c;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
}

/* Quantity Selector */
.quantity-selector {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 16px 0;
  justify-content: center;
}

.qty-btn {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.1);
  background: rgba(255,255,255,0.05);
  color: var(--cream);
  font-size: 20px;
  cursor: pointer;
  transition: all var(--anim-fast);
  display: flex;
  align-items: center;
  justify-content: center;
}

.qty-btn:hover {
  background: rgba(255,255,255,0.1);
  border-color: var(--gold);
}

.qty-value {
  font-size: 20px;
  font-weight: 700;
  min-width: 40px;
  text-align: center;
}

.modal-actions{
  margin-top: 20px;
  display: flex;
  gap: 12px;
}

.primary{
  background: var(--gold);
  color: #07271a;
  border: 0;
  padding: 16px 24px;
  border-radius: 14px;
  font-weight: 700;
  font-size: 16px;
  flex: 1;
  cursor: pointer;
  transition: all var(--anim-fast);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.primary:hover{
  box-shadow: var(--shadow-gold);
  transform: translateY(-2px);
}

.primary:active{
  transform: translateY(0);
}

.secondary{
  background: transparent;
  color: var(--cream);
  border: 1px solid rgba(255,255,255,0.15);
  padding: 16px 24px;
  border-radius: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--anim-fast);
  flex: 0 0 auto;
}

.secondary:hover{
  background: rgba(255,255,255,0.05);
  border-color: rgba(255,255,255,0.25);
}

/* Cart Notification Toast */
.cart-notification {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: var(--panel);
  color: var(--cream);
  padding: 14px 24px;
  border-radius: 12px;
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 12px;
  z-index: 10000;
  opacity: 0;
  transition: all 300ms cubic-bezier(0.175, 0.885, 0.32, 1.275);
  border: 1px solid rgba(184,145,64,0.2);
  min-width: 280px;
  justify-content: space-between;
}

.cart-notification.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

.toast-message {
  font-weight: 500;
}

.toast-close {
  background: rgba(255,255,255,0.1);
  border: none;
  color: var(--muted);
  width: 24px;
  height: 24px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--anim-fast);
}

.toast-close:hover {
  background: rgba(231,76,60,0.3);
  color: var(--cream);
}

/* Favorites Modal Specific */
.favorites-list {
  max-height: 400px;
  overflow-y: auto;
  margin: 16px 0;
}

.fav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: rgba(255,255,255,0.03);
  border-radius: 12px;
  margin-bottom: 8px;
}

.fav-item img {
  width: 60px;
  height: 60px;
  object-fit: cover;
  border-radius: 8px;
}

.fav-item-info {
  flex: 1;
}

.fav-item-info h4 {
  font-size: 14px;
  margin: 0 0 4px;
}

.fav-item-actions {
  display: flex;
  gap: 8px;
}

.fav-item-actions button {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  font-size: 16px;
  transition: all var(--anim-fast);
}

.add-from-fav {
  background: var(--gold);
}

.remove-fav {
  background: rgba(231,76,60,0.2);
}

.empty-favorites {
  text-align: center;
  padding: 40px;
  color: var(--muted);
}

.fav-actions {
  display: flex;
  gap: 12px;
  margin-top: 16px;
}

/* Cart Badge */
.cart-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  background: var(--danger);
  color: white;
  font-size: 11px;
  font-weight: 700;
  min-width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: popIn var(--anim-fast);
}

/* Focus trap indicator for modals */
.modal:focus {
  outline: none;
}

/* Large touch targets */
button, .card { min-height: 48px; }

/* Footer */
.site-footer {
  margin-top: 48px;
  padding: 0;
  border-top: 1px solid rgba(255,255,255,0.05);
  text-align: center;
  color: var(--muted);
  font-size: 13px;
}

/* Highlights Section */
.highlights-section {
  background: linear-gradient(180deg, rgba(184,145,64,0.08), transparent);
  padding: 40px 20px;
  margin-bottom: 32px;
}

.highlights-section h3 {
  color: var(--gold);
  font-size: 20px;
  margin-bottom: 24px;
  font-weight: 700;
}

.highlights-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  max-width: 1200px;
  margin: 0 auto;
}

.highlight-card {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(184,145,64,0.15);
  border-radius: 16px;
  padding: 24px;
  text-align: center;
  transition: all var(--anim-fast);
}

.highlight-card:hover {
  transform: translateY(-4px);
  border-color: rgba(184,145,64,0.3);
  box-shadow: 0 8px 24px rgba(0,0,0,0.3);
}

.highlight-icon {
  font-size: 40px;
  margin-bottom: 12px;
  display: block;
}

.highlight-card h4 {
  color: var(--cream);
  font-size: 16px;
  margin-bottom: 8px;
}

.highlight-card p {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
  margin: 0;
}

.site-footer a {
  color: var(--gold);
  text-decoration: none;
}

.site-footer a:hover {
  text-decoration: underline;
}

.footer-sections {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 24px;
  text-align: left;
  margin-bottom: 32px;
  padding: 0 20px;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
}

.footer-section h4 {
  color: var(--gold);
  font-size: 14px;
  margin-bottom: 12px;
}

.footer-section p,
.footer-section a {
  display: block;
  margin-bottom: 8px;
}

/* Trust Badges */
.trust-badges {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  margin: 24px 0;
  padding: 0 16px;
}

.trust-badge {
  background: rgba(184,145,64,0.1);
  border: 1px solid rgba(184,145,64,0.2);
  color: var(--cream);
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

/* Floating Action Buttons */
.fab-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  z-index: 100;
}

.fab {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  font-size: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-lg);
  transition: all var(--anim-fast);
  position: relative;
}

.fab-cart {
  background: var(--gold);
}

.fab-favorites {
  background: var(--panel);
  border: 1px solid rgba(255,255,255,0.1);
}

.fab:hover {
  transform: scale(1.1);
}

.fab:active {
  transform: scale(0.95);
}

/* Responsive */
@media(min-width: 480px) {
  .product-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media(min-width: 700px) {
  .product-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  
  .modal-content {
    flex-direction: row;
    gap: 24px;
  }
  
  .modal-image {
    width: 50%;
  }
  
  .modal-image img {
    height: 100%;
    max-height: 400px;
  }
  
  .modal-info {
    width: 50%;
    padding-top: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
  }
  
  .nutrition-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media(min-width: 900px) {
  .product-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
  }
  
  .card-img {
    height: 140px;
  }
}

/* subtle ornament - thin frame */
body:before{
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  border: 8px solid rgba(185,145,64,0.02);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.01);
  z-index: 5;
}

/* Arka Plan Deseni */
body::after{
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image: url('../img/pattern.png');
  background-repeat: repeat;
  background-position: center;
  background-size: 36px 36px;
  opacity: var(--pattern-opacity);
  mix-blend-mode: overlay;
  filter: grayscale(80%) blur(0.2px) contrast(90%);
}
