/* ========================================
   GLOBAL STYLES — Chemas Collector
   ======================================== */

:root {
  --color-bg: #FAFAFA;
  --color-white: #FFFFFF;
  --color-black: #111111;
  --color-gray-100: #F5F5F5;
  --color-gray-200: #EEEEEE;
  --color-gray-300: #E0E0E0;
  --color-gray-400: #BDBDBD;
  --color-gray-500: #9E9E9E;
  --color-gray-600: #757575;
  --color-gray-700: #616161;
  --color-gray-800: #424242;
  --color-gray-900: #212121;
  --color-accent: #1A1A2E;
  --color-accent-light: #16213E;
  --color-gold: #C9A84C;
  --color-success: #2E7D32;
  --color-danger: #C62828;

  --font-display: 'Bebas Neue', sans-serif;
  --font-body: 'Montserrat', sans-serif;

  --banner-height: 36px;
  --navbar-height: 72px;
  --container-max: 1400px;
  --radius: 4px;
  --radius-lg: 8px;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.1);
  --shadow-lg: 0 8px 30px rgba(0,0,0,0.12);
  --transition: 0.25s ease;
}

*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.6;
  color: var(--color-gray-900);
  background-color: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  padding-top: calc(var(--navbar-height) + var(--banner-height));
}

a {
  text-decoration: none;
  color: inherit;
}

ul, ol {
  list-style: none;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

button {
  cursor: pointer;
  border: none;
  background: none;
  font-family: inherit;
  font-size: inherit;
}

input, select {
  font-family: inherit;
  font-size: inherit;
}

.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 24px;
}

.hidden {
  display: none !important;
}

.section {
  padding: 60px 0;
}

.section__header {
  display: flex;
  align-items: baseline;
  gap: 16px;
  margin-bottom: 32px;
}
.section__header .section__title {
  margin-bottom: 0;
}
.section__see-more {
  font-size: 0.95rem;
  color: var(--color-primary, #333);
  text-decoration: none;
  font-weight: 500;
  white-space: nowrap;
  transition: opacity 0.2s;
}
.section__see-more:hover {
  opacity: 0.7;
  text-decoration: underline;
}

.section__title {
  font-family: var(--font-display);
  font-size: 2.2rem;
  letter-spacing: 1px;
  color: var(--color-black);
  margin-bottom: 32px;
  text-transform: uppercase;
}

.view {
  min-height: 60vh;
}

/* Breadcrumb */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 16px 0;
  font-size: 13px;
  color: var(--color-gray-600);
  flex-wrap: wrap;
}

.breadcrumb a {
  color: var(--color-gray-600);
  transition: color var(--transition);
}

.breadcrumb a:hover {
  color: var(--color-black);
}

.breadcrumb span.separator {
  color: var(--color-gray-400);
}

.breadcrumb span.current {
  color: var(--color-black);
  font-weight: 500;
}

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

::-webkit-scrollbar-track {
  background: var(--color-gray-100);
}

::-webkit-scrollbar-thumb {
  background: var(--color-gray-400);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--color-gray-600);
}

/* Selection */
::selection {
  background: var(--color-accent);
  color: var(--color-white);
}

/* ========================================
   App Toast & Confirm Dialog
   ======================================== */

/* Toast */
.app-toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: #212121;
  color: #fff;
  padding: 10px 24px;
  border-radius: 8px;
  font-size: 13px;
  font-family: inherit;
  z-index: 10000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s, transform 0.25s;
  max-width: 90vw;
  text-align: center;
}
.app-toast.visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
  pointer-events: auto;
}
.app-toast.toast--error {
  background: #D32F2F;
  border: 2px solid #fff;
  box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

/* Confirm Dialog */
.app-confirm-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
}
.app-confirm-overlay.visible {
  opacity: 1;
  pointer-events: auto;
}
.app-confirm-box {
  background: #fff;
  border-radius: 14px;
  padding: 28px 24px 20px;
  max-width: 360px;
  width: 90%;
  text-align: center;
  box-shadow: 0 12px 40px rgba(0,0,0,0.15);
}
.app-confirm-box p {
  font-size: 14px;
  line-height: 1.5;
  margin: 0 0 20px;
  color: #333;
}
.app-confirm-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
}
.app-confirm-cancel,
.app-confirm-ok {
  padding: 8px 24px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  border: none;
  transition: background 0.15s;
}
.app-confirm-cancel {
  background: #f0f0f0;
  color: #333;
}
.app-confirm-cancel:hover { background: #e0e0e0; }
.app-confirm-ok {
  background: #212121;
  color: #fff;
}
.app-confirm-ok:hover { background: #333; }

/* Custom checkbox toggle */
.toggle-check {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-size: 13px;
  color: #333;
  user-select: none;
}
.toggle-check input {
  display: none;
}
.toggle-check__box {
  width: 18px;
  height: 18px;
  border: 2px solid #ccc;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
  flex-shrink: 0;
}
.toggle-check input:checked + .toggle-check__box {
  background: #212121;
  border-color: #212121;
}
.toggle-check input:checked + .toggle-check__box::after {
  content: '✓';
  color: #fff;
  font-size: 11px;
  font-weight: 700;
}

/* ========================================
   Notification Bell & Panel
   ======================================== */

.notif-badge {
  position: absolute;
  top: 4px;
  right: 2px;
  background: #C62828;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  min-width: 18px;
  height: 18px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  padding: 0 4px;
}

#notifBtn {
  position: relative;
}

.notif-panel {
  position: fixed;
  top: 60px;
  right: 20px;
  width: 320px;
  max-height: 400px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.15);
  z-index: 10000;
  overflow: hidden;
  animation: fadeIn 0.15s;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

.notif-panel__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 16px;
  border-bottom: 1px solid #eee;
  font-size: 14px;
  font-weight: 600;
}

.notif-panel__list {
  max-height: 340px;
  overflow-y: auto;
}

.notif-item {
  padding: 12px 16px;
  border-bottom: 1px solid #f5f5f5;
  cursor: pointer;
  transition: background 0.12s;
}
.notif-item:hover {
  background: #f5f5f5;
}

.notif-item--unread {
  background: #F5F9FF;
  border-left: 3px solid #1565C0;
}

.notif-item__text {
  font-size: 13px;
  color: #333;
  line-height: 1.4;
}

.notif-item__time {
  font-size: 10px;
  color: #999;
  margin-top: 4px;
}

@media (max-width: 480px) {
  .notif-panel { right: 8px; left: 8px; width: auto; }
}

/* ========================================
   TRACKING PAGE
   ======================================== */
.tracking-page {
  max-width: 700px;
  margin: 40px auto;
  padding: 0 20px;
}

.tracking-page__title {
  font-family: var(--font-display);
  font-size: 2.2rem;
  letter-spacing: 1px;
  margin-bottom: 8px;
  color: var(--color-black);
}

.tracking-page__subtitle {
  color: var(--color-gray-600);
  margin-bottom: 24px;
  font-size: 14px;
}

.tracking-page__form {
  display: flex;
  gap: 10px;
  margin-bottom: 32px;
}

.tracking-page__input {
  flex: 1;
  padding: 12px 16px;
  border: 1px solid var(--color-gray-300);
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 14px;
  outline: none;
  transition: border-color var(--transition);
}

.tracking-page__input:focus {
  border-color: var(--color-accent);
}

.tracking-page__btn {
  padding: 12px 28px;
  background: var(--color-accent);
  color: var(--color-white);
  border: none;
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background var(--transition);
}

.tracking-page__btn:hover {
  background: var(--color-accent-light);
}

.tracking-page__results {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.tracking-page__empty,
.tracking-page__loading {
  text-align: center;
  color: var(--color-gray-500);
  padding: 24px 0;
  font-size: 14px;
}

.tracking-order {
  background: var(--color-white);
  border: 1px solid var(--color-gray-200);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.tracking-order__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 20px;
  background: var(--color-gray-100);
  border-bottom: 1px solid var(--color-gray-200);
}

.tracking-order__id {
  font-weight: 600;
  font-size: 14px;
  color: var(--color-gray-900);
}

.tracking-order__status {
  font-size: 12px;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.status--pending {
  background: #FFF3E0;
  color: #E65100;
}

.status--paid {
  background: #E3F2FD;
  color: #1565C0;
}

.status--shipped {
  background: #F3E5F5;
  color: #7B1FA2;
}

.status--delivered {
  background: #E8F5E9;
  color: #2E7D32;
}

.status--cancelled {
  background: #FFEBEE;
  color: #C62828;
}

.tracking-order__body {
  padding: 16px 20px;
}

.tracking-order__date {
  color: var(--color-gray-600);
  font-size: 13px;
  margin-bottom: 10px;
}

.tracking-order__items {
  list-style: none;
  margin-bottom: 12px;
}

.tracking-order__items li {
  padding: 4px 0;
  font-size: 13px;
  color: var(--color-gray-800);
  border-bottom: 1px solid var(--color-gray-100);
}

.tracking-order__items li:last-child {
  border-bottom: none;
}

.tracking-order__total {
  display: inline-block;
  font-weight: 600;
  font-size: 14px;
  margin-top: 4px;
  color: var(--color-black);
}

.tracking-order__tracking,
.tracking-order__delivery {
  font-size: 13px;
  color: var(--color-gray-700);
  margin-top: 8px;
}

@media (max-width: 500px) {
  .tracking-page__form {
    flex-direction: column;
  }
  .tracking-page__btn {
    width: 100%;
  }
}
