/* Account sayfaları için ortak CSS */
.page-account h1 {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

.page-account h2 {
  font-size: 1.5rem;
  margin-top: 2rem;
  margin-bottom: 1rem;
}

.page-account .card {
  border: 1px solid #eee;
  border-radius: 8px;
  padding: 2rem;
  margin-bottom: 1rem;
}

.page-account input,
.page-account select,
.page-account textarea {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 1rem;
}

.page-account button,
.page-account .btn {
  padding: 0.75rem 1.5rem;
  background: #000;
  color: #fff;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
}

.page-account button:hover,
.page-account .btn:hover {
  background: #333;
}

/* Account Layout - Sidebar + Content */
.page-account .account-layout {
  display: grid;
  grid-template-columns: 250px 1fr;
  gap: 2rem;
  margin-top: 2rem;
}

.page-account .account-sidebar-wrapper {
  /* Wrapper için ek stil gerekmez, içindeki sidebar'a stil uygulanır */
}

.page-account .account-sidebar {
  position: sticky;
  top: 20px;
  align-self: start;
  height: fit-content;
}

.page-account .account-content {
  min-width: 0; /* Grid overflow için */
}

/* Sidebar Navigation */
.page-account .account-sidebar nav {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.page-account .account-sidebar nav a {
  padding: 0.75rem;
  border-radius: 4px;
  text-decoration: none;
  color: #000;
  transition: background 0.15s;
}

.page-account .account-sidebar nav a:hover {
  background: #f5f5f5;
}

.page-account .account-sidebar nav a[style*="background: #f5f5f5"],
.page-account .account-sidebar nav a.active {
  background: #f5f5f5;
  font-weight: bold;
}

/* Favorites grid: smaller cards */
.page-account #favGrid.grid{
  grid-template-columns: repeat(4, minmax(0,1fr));
  gap: 16px;
}
@media (max-width: 1100px){
  .page-account #favGrid.grid{ grid-template-columns: repeat(3, minmax(0,1fr)); }
}
@media (max-width: 640px){
  .page-account #favGrid.grid{ grid-template-columns: repeat(2, minmax(0,1fr)); }
}
.page-account #favGrid .p-card .p-body{ padding:8px 10px }
.page-account #favGrid .p-card .p-title{ font-size:13px }
.page-account #favGrid .p-card .p-price{ font-size:16px }

/* Mobil Responsive */
@media (max-width: 768px) {
  .page-account {
    padding: 1rem 0 !important;
  }
  
  .page-account h1 {
    font-size: 1.5rem;
  }
  
  .page-account h2 {
    font-size: 1.25rem;
    margin-top: 1.5rem;
  }
  
  .page-account .card {
    padding: 1rem;
  }
  
  /* Layout: Sidebar üstte, mobil hamburger menü */
  .page-account .account-layout {
    grid-template-columns: 1fr;
    gap: 1rem;
    margin-top: 1rem;
  }
  
  .page-account .account-sidebar-wrapper {
    order: -1;
  }
  
  .page-account .account-sidebar {
    position: relative;
    top: 0;
  }
  
  .page-account .account-sidebar nav {
    display: none;
    flex-direction: column;
    gap: 0.5rem;
    padding: 1rem;
    background: #f9f9f9;
    border-radius: 8px;
    margin-bottom: 1rem;
  }
  
  .page-account .account-sidebar.mobile-open nav {
    display: flex;
  }
  
  .page-account .account-sidebar-toggle {
    display: block;
    width: 100%;
    padding: 0.75rem;
    background: #000;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    margin-bottom: 0;
    font-weight: 600;
    font-size: 0.95rem;
  }
  
  .page-account .account-sidebar:not(.has-toggle) .account-sidebar-toggle {
    display: none;
  }
  
  .page-account .account-sidebar.mobile-open .account-sidebar-toggle {
    border-radius: 4px 4px 0 0;
  }
  
  /* Tablolar mobilde scroll veya kart görünümü */
  .page-account table {
    display: block;
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  /* Tablet ve büyük telefonlarda tablo scroll */
  @media (min-width: 481px) and (max-width: 768px) {
    .page-account table {
      display: table;
    }
    
    .page-account table thead {
      display: table-header-group;
    }
    
    .page-account table tbody {
      display: table-row-group;
    }
    
    .page-account table tr {
      display: table-row;
    }
    
    .page-account table td {
      display: table-cell;
    }
    
    .page-account table td:before {
      display: none;
    }
  }
  
  /* Çok küçük ekranlarda kart görünümü */
  @media (max-width: 480px) {
    .page-account table thead,
    .page-account table tbody,
    .page-account table tr {
      display: block;
      width: 100%;
    }
    
    .page-account table thead {
      display: none; /* Mobilde header gizle */
    }
    
    .page-account table tbody tr {
      margin-bottom: 1rem;
      padding: 1rem;
      background: #f9f9f9;
      border-radius: 8px;
      border: 1px solid #eee;
    }
    
    .page-account table td {
      display: block;
      text-align: left !important;
      padding: 0.5rem 0 !important;
      border: none !important;
    }
    
    .page-account table td:before {
      content: attr(data-label) ": ";
      font-weight: bold;
      display: inline-block;
      min-width: 120px;
    }
  }
  
  /* Modal mobilde tam ekran */
  .page-account .account-modal {
    padding: 1rem !important;
  }
  
  .page-account .account-modal > div {
    max-width: 100% !important;
    padding: 1rem !important;
  }
  
  /* Form alanları mobilde tam genişlik */
  .page-account input[style*="max-width"],
  .page-account select[style*="max-width"],
  .page-account textarea[style*="max-width"] {
    max-width: 100% !important;
  }
  
  /* Butonlar mobilde tam genişlik */
  .page-account button[type="submit"],
  .page-account .btn[type="submit"] {
    width: 100%;
  }
  
  /* Sipariş kartları mobilde daha kompakt */
  .page-account .order-card {
    padding: 1rem !important;
    margin-bottom: 1rem;
  }
  
  .page-account .order-card > div {
    flex-direction: column !important;
    gap: 0.5rem;
  }
  
  .page-account .order-card > div > div:last-child {
    text-align: left !important;
    width: 100%;
  }
  
  .page-account .order-card .order-actions {
    flex-direction: column;
    gap: 0.5rem;
  }
  
  .page-account .order-card .order-actions button {
    width: 100%;
  }
  
  /* İade kartları mobilde daha kompakt */
  .page-account .returns-card {
    padding: 1rem !important;
  }
  
  .page-account .returns-card > div {
    flex-direction: column !important;
    gap: 0.5rem;
  }
}

@media (max-width: 480px) {
  .page-account h1 {
    font-size: 1.25rem;
  }
  
  .page-account .card {
    padding: 0.75rem;
  }
  
  .page-account input,
  .page-account select,
  .page-account textarea {
    padding: 0.625rem;
    font-size: 0.9rem;
  }
  
  .page-account button,
  .page-account .btn {
    padding: 0.625rem 1rem;
    font-size: 0.9rem;
  }
}

