.shop-layout { max-width: 1200px; margin: 22px auto; padding: 0 14px; display: grid; grid-template-columns: 280px 1fr; gap: 18px; }

.sidebar .sidebar-card {
  background: #ffffff;
  color: #555555;
  font-weight: 400;
  border: 1px solid #e2e2e2;
  border-radius: 5px;
  padding: 14px;
  box-shadow: var(--shadow);
}


.sidebar-title { font-weight: 800; margin-bottom: 10px; letter-spacing: 0.4px; }
.category-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.category-pill {
  background: #ffffff;
  color: #555555;
  border: 1px solid #e2e2e2;
  padding: 7px 10px;
  border-radius: 5px;
  cursor: pointer;
  font-size: 0.9rem;
  text-align: left;
  width: 100%;
}


.category-pill:hover { border-color: var(--accent); }
.category-pill.active { background: var(--accent); border-color: var(--accent); }
.search-input, .sort-select, .page-size, .category-select {
  width: 100%;
  background: #ffffff;
  color: #555555;
  font-weight: 400;
  border: 1px solid #e2e2e2;
  padding: 10px 12px;
  border-radius: 5px;
}



.category-select { appearance: none; -webkit-appearance: none; -moz-appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%), linear-gradient(to right, transparent, transparent); background-position: calc(100% - 24px) calc(50% - 4px), calc(100% - 16px) calc(50% - 4px), 0 0; background-size: 8px 8px, 8px 8px, 100% 100%; background-repeat: no-repeat; cursor: pointer; }
.category-select:focus { outline: 2px solid var(--accent); outline-offset: 2px; }

.orders-widget {
  background: #ffffff;
  color: #555555;
  font-weight: 400;
  border: 1px dashed #e2e2e2;
  padding: 12px;
  border-radius: 5px;
}


.orders-copy { margin-bottom: 10px; opacity: 0.9; }
.primary-btn.full { width: 100%; }


/* Hero carousel */
.hero-section {
  width: 100%;
  margin: 16px 0 8px 0;
}

.hero-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 14px;
}

.hero-carousel {
  position: relative;
  overflow: hidden;
  border-radius: 5px;
  background: linear-gradient(135deg, #1b2633 0%, #101721 45%, #1a2330 100%);
  box-shadow: var(--shadow);
  height: 290px;
}

.hero-slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  display: flex;
  align-items: center;
  padding: 20px 24px;
  transform: translateX(100%);
  transition: transform 0.6s ease;
  background-size: 100% 100%;
  background-position: center center;
  background-repeat: no-repeat;
}

.hero-slide--active {
  transform: translateX(0);
  pointer-events: auto;
}

.hero-slide--exit-left {
  transform: translateX(-100%);
}


.hero-content,
.hero-title,
.hero-text {
  display: none;
}


.hero-dots {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
}

.hero-dot {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  border: none;
  background: rgba(255, 255, 255, 0.4);
  cursor: pointer;
}

.hero-dot--active {
  width: 18px;
  background: var(--accent);
}


.products-area .products-toolbar { display: flex; justify-content: space-between; align-items: end; margin-bottom: 12px; }
.main-title { font-weight: 900; font-size: 1.25rem; letter-spacing: 0.2px; }
.toolbar-right { display: flex; align-items: center; gap: 10px; }
.muted { color: var(--muted); font-size: 0.92rem; }

.products-grid { display: grid; gap: 16px; grid-template-columns: repeat(4, minmax(0, 1fr)); }

.product-card {
  position: relative;
  background: var(--panel);
  border: none;
  border-radius: 5px;
  overflow: hidden;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.28);
  display: grid;
  grid-template-rows: auto 1fr auto;
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
}




.product-card:hover {
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.28);
  border-color: var(--accent);
  transform: none;
}

.product-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(106, 174, 252, 0);
  pointer-events: none;
  transition: background 0.2s ease;
}

.product-card:hover::after {
  background: rgba(106, 174, 252, 0.18);
}


.product-image-wrap { position: relative; aspect-ratio: 10 / 9; background: #0b0f14; overflow: hidden; }



.product-image-wrap img { width: 100%; height: 100%; object-fit: cover; }
.product-chip { position: absolute; top: 10px; left: 10px; background: rgba(0,0,0,0.55); color: #fff; padding: 6px 10px; border-radius: 999px; font-size: 0.75rem; border: 1px solid rgba(255,255,255,0.15); }


.product-body {
  background: #f8faff;      /* ice white */
  padding: 8px 12px;
  border-radius: 0;
}

.product-title {
  background: #f8faff;      /* ice white */
  color: #000000;
  font-weight: 400;
  margin-bottom: 2px;
  line-height: 1.05;
  font-size: 0.92rem;
  padding: 6px 8px;
  border-radius: 3px;
}


.product-short { color: var(--muted); font-size: 0.95rem; line-height: 1.4; min-height: 42px; }


.product-meta {
  background: #ffffff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 6px 8px;       /* reduced height */
  border-top: none;       /* remove dark dividing line */
  text-align: center;
  border-radius: 0 0 5px 5px;
}



.price {
  background: #ffffff;
  color: #000000;
  font-weight: 400;
  font-size: 1.05rem;
  margin-bottom: 6px;
  padding: 6px 8px;
  border-radius: 3px;
}


.stock.good { color: var(--good); }
.stock.low { color: var(--warn); }
.stock.out { color: #ee6666; }

.primary-btn, .ghost-btn, .page-btn { background: var(--accent); color: white; border: none; border-radius: 10px; padding: 10px 14px; cursor: pointer; font-weight: 800; }
.primary-btn:hover { background: var(--accent-600); }
.ghost-btn { background: transparent; color: var(--text); border: 1px solid var(--border); }
.page-btn { background: var(--panel-2); color: var(--text); border: 1px solid var(--border); }
.page-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.pagination { margin: 14px 0 40px 0; display: flex; gap: 12px; justify-content: center; align-items: center; }
.page-indicator { color: var(--muted); }

/* Loading overlay */
.loading-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
  display: none;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  z-index: 2000;
  backdrop-filter: blur(2px);
}

.loading-overlay.show {
  display: flex;
}

.loading-spinner {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: 4px solid var(--border);
  border-top-color: var(--accent);
  animation: spin 0.9s linear infinite;
  margin-bottom: 10px;
}

.loading-text {
  color: var(--text);
  font-weight: 800;
  background: var(--panel);
  border: 1px solid var(--border);
  padding: 8px 12px;
  border-radius: 999px;
  box-shadow: var(--shadow);
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}


@media (max-width: 980px) { .shop-layout { grid-template-columns: 1fr; } .sidebar { order: 2; } .products-area { order: 1; } .products-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .products-grid { grid-template-columns: 1fr; } }

/* Top logo banner */
.shop-header-top {
  width: 100%;
  padding: 12px 0;
  background: #f7f6f3;
  border-bottom: 1px solid #e6e6e6;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

.shop-logo-title {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}


.shop-logo-home-link {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

.shop-server-logo {
  height: 52px;
  max-width: 260px;
  object-fit: contain;
  display: block;
}


.shop-auth-buttons {
  display: flex;
  gap: 10px;
}

.auth-btn {
  background: #ffffff;
  color: #000000;
  border: 1px solid #d6d6d6;
  padding: 8px 14px;
  border-radius: 999px;
  font-weight: 600;
  cursor: pointer;
}

.auth-btn:hover {
  background: #f0f0f0;
}

.auth-register {
  background: var(--accent);
  color: #ffffff;
  border-color: var(--accent);
}

.auth-register:hover {
  background: var(--accent-600);
}





/* Align sidebar a bit lower to match product grid top */
.sidebar {
  margin-top: 28px; /* shifts down slightly to align with products */
}


.primary-btn.full {
  width: 100%;
  text-align: center;
  display: block;
  margin: 0 auto;
}

.register-modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 3000;
  padding: 24px;
}

.register-modal.show {
  display: flex;
}

.register-modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.62);
  backdrop-filter: blur(5px);
}

.register-modal-card {
  position: relative;
  width: 100%;
  max-width: 760px;
  max-height: calc(100vh - 48px);
  overflow-y: auto;
  background: linear-gradient(180deg, #ffffff 0%, #fbfcff 100%);
  border: 1px solid rgba(106, 136, 213, 0.16);
  border-radius: 22px;
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.26);
  padding: 34px 30px 26px 30px;
  z-index: 1;
}

.register-modal-top {
  margin-bottom: 22px;
  padding-right: 34px;
}

.register-badge {
  display: inline-flex;
  align-items: center;
  background: rgba(106, 136, 213, 0.10);
  color: #4f66b7;
  border: 1px solid rgba(106, 136, 213, 0.18);
  border-radius: 999px;
  padding: 7px 12px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.2px;
  margin-bottom: 12px;
}

.register-modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 40px;
  height: 40px;
  background: #f4f6fb;
  border: 1px solid #dde4f2;
  border-radius: 999px;
  color: #3f4a5c;
  font-size: 1.45rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.register-modal-close:hover {
  background: #ebf0fa;
}

.register-modal-title {
  margin: 0 0 8px 0;
  font-size: 2rem;
  font-weight: 800;
  line-height: 1.1;
  color: #121826;
}

.register-modal-subtitle {
  margin: 0;
  color: #5d6678;
  font-size: 1rem;
  line-height: 1.5;
}

.register-form-message {
  min-height: 22px;
  margin-top: 12px;
  font-size: 0.92rem;
  font-weight: 600;
}

.register-form-message.success {
  color: #15803d;
}

.register-form-message.error {
  color: #dc2626;
}
.register-form {
  margin-top: 4px;
}

.register-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.register-field {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.register-field label {
  font-size: 0.92rem;
  font-weight: 700;
  color: #1f2937;
}

.register-field input,
.register-field textarea {
  width: 100%;
  background: #ffffff;
  color: #1b2430;
  border: 1px solid #d9e1ee;
  border-radius: 12px;
  padding: 13px 14px;
  font-size: 0.96rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.register-field input:focus,
.register-field textarea:focus {
  outline: none;
  border-color: #6a88d5;
  box-shadow: 0 0 0 4px rgba(106, 136, 213, 0.12);
  background: #ffffff;
}

.register-field textarea {
  resize: vertical;
  min-height: 110px;
}

.register-field--full {
  grid-column: 1 / -1;
}

.password-input-wrap {
  position: relative;
}

.password-input-wrap input {
  padding-right: 52px;
}

.password-toggle {
  position: absolute;
  top: 50%;
  right: 10px;
  transform: translateY(-50%);
  width: 34px;
  height: 34px;
  border: none;
  background: #f3f6fb;
  border-radius: 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.password-toggle:hover {
  background: #e8eef9;
}

.password-toggle.active {
  background: rgba(106, 136, 213, 0.18);
}

.password-toggle-icon {
  font-size: 1rem;
  line-height: 1;
}

.register-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid #edf1f7;
}

.register-cancel-btn {
  min-width: 120px;
  background: #ffffff;
  color: #374151;
  border: 1px solid #d6deeb;
}

.register-cancel-btn:hover {
  background: #f7f9fc;
}

.register-submit-btn {
  min-width: 170px;
  border-radius: 12px;
  padding: 12px 18px;
  box-shadow: 0 10px 24px rgba(106, 136, 213, 0.22);
}

.register-modal-open {
  overflow: hidden;
}

@media (max-width: 700px) {
  .register-modal {
    padding: 14px;
  }

  .register-modal-card {
    padding: 24px 16px 18px 16px;
    border-radius: 18px;
  }

  .register-modal-top {
    padding-right: 22px;
  }

  .register-modal-title {
    font-size: 1.6rem;
  }

  .register-form-grid {
    grid-template-columns: 1fr;
  }

  .register-actions {
    flex-direction: column;
  }

  .register-actions .ghost-btn,
  .register-actions .primary-btn {
    width: 100%;
  }
}

.auth-welcome {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--color-primary, #333);
  padding: 0.4rem 0.75rem;
  white-space: nowrap;
}
.auth-btn.auth-cart,
.auth-btn.auth-orders,
.auth-btn.auth-account,
.auth-btn.auth-logout  { border-radius: 5px; transition: background 0.25s ease, color 0.25s ease, border-color 0.25s ease, opacity 0.25s ease; }

.auth-btn.auth-cart    { background: var(--color-primary, #2563eb); color: #fff; }
.auth-btn.auth-orders  { background: transparent; border: 1.5px solid var(--color-primary, #2563eb); color: var(--color-primary, #2563eb); }
.auth-btn.auth-account { background: transparent; border: 1.5px solid var(--color-primary, #2563eb); color: var(--color-primary, #2563eb); }
.auth-btn.auth-logout  { background: transparent; border: 1.5px solid #e53e3e; color: #e53e3e; }

.auth-btn.auth-cart:hover    { opacity: 0.78; }
.auth-btn.auth-orders:hover,
.auth-btn.auth-account:hover { background: var(--color-primary, #2563eb); color: #fff; }
.auth-btn.auth-logout:hover  { background: #e53e3e; color: #fff; }

.auth-btn.auth-cart .cart-icon { display: inline-block; margin-right: 6px; font-style: normal; }











