/* =============================================
   DESIGN SYSTEM — Group 63 E-Commerce
   ============================================= */

@import url("https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&family=Inter:wght@300;400;500;600&display=swap");

/* --- CSS Custom Properties --- */
:root {
  --clr-bg: #0f0f13;
  --clr-bg2: #16161d;
  --clr-surface: #1e1e28;
  --clr-surface2: #26263a;
  --clr-border: rgba(255, 255, 255, 0.08);
  --clr-accent: #f5a623;
  --clr-accent-hover: #e09010;
  --clr-accent-glow: rgba(245, 166, 35, 0.25);
  --clr-text: #f0f0f5;
  --clr-text-muted: #8888a0;
  --clr-success: #22c55e;
  --clr-error: #ef4444;
  --clr-white: #ffffff;
  --radius: 12px;
  --radius-lg: 20px;
  --shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
  --shadow-card: 0 8px 32px rgba(0, 0, 0, 0.3);
  --transition: 0.25s ease;
  --font-head: "Outfit", sans-serif;
  --font-body: "Inter", sans-serif;
  --nav-h: 70px;
}

/* --- Reset --- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
html {
  scroll-behavior: smooth;
}
body {
  font-family: var(--font-body);
  background: var(--clr-bg);
  color: var(--clr-text);
  line-height: 1.6;
  min-height: 100vh;
}
img {
  max-width: 100%;
  display: block;
  object-fit: cover;
}
a {
  text-decoration: none;
  color: inherit;
}
ul {
  list-style: none;
}
button {
  cursor: pointer;
  border: none;
  background: none;
  font-family: inherit;
}
input,
textarea,
select {
  font-family: inherit;
}

/* =============================================
   NAVBAR
   ============================================= */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: var(--nav-h);
  background: rgba(15, 15, 19, 0.85);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--clr-border);
  display: flex;
  align-items: center;
}
.nav-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1.5rem;
  width: 100%;
  display: flex;
  align-items: center;
  gap: 2rem;
}
.nav-logo {
  font-family: var(--font-head);
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--clr-white);
  letter-spacing: -0.5px;
  flex-shrink: 0;
}
.nav-logo span {
  color: var(--clr-accent);
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  margin-left: auto;
}
.nav-links a {
  padding: 0.45rem 0.9rem;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--clr-text-muted);
  transition:
    color var(--transition),
    background var(--transition);
}
.nav-links a:hover,
.nav-links a.active {
  color: var(--clr-white);
  background: var(--clr-surface2);
}
.nav-links a.active {
  color: var(--clr-accent);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-left: 1rem;
}

/* --- User Menu & Logout --- */
.user-menu {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.4rem 0.6rem 0.4rem 1rem;
  background: var(--clr-surface);
  border: 1px solid var(--clr-border);
  border-radius: 10px;
}
.user-name {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--clr-text);
  max-width: 120px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.btn-logout {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: rgba(239, 68, 68, 0.08);
  color: var(--clr-error);
  transition: all var(--transition);
}
.btn-logout:hover {
  background: var(--clr-error);
  color: #fff;
}
.admin-link {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--clr-accent);
  margin-left: 0.25rem;
  padding-left: 0.75rem;
  border-left: 1px solid var(--clr-border);
}

.nav-cart-btn {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: var(--clr-surface);
  border: 1px solid var(--clr-border);
  color: var(--clr-text);
  transition:
    background var(--transition),
    border-color var(--transition);
}
.nav-cart-btn:hover {
  background: var(--clr-surface2);
  border-color: var(--clr-accent);
  color: var(--clr-accent);
}
.nav-cart-btn svg {
  width: 20px;
  height: 20px;
}
.cart-badge {
  position: absolute;
  top: -6px;
  right: -6px;
  min-width: 18px;
  height: 18px;
  background: var(--clr-accent);
  color: #000;
  border-radius: 999px;
  font-size: 0.65rem;
  font-weight: 700;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
}
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  width: 32px;
  cursor: pointer;
  margin-left: auto;
}
.hamburger span {
  display: block;
  height: 2px;
  border-radius: 2px;
  background: var(--clr-text);
  transition:
    transform var(--transition),
    opacity var(--transition);
}
.hamburger.open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.hamburger.open span:nth-child(2) {
  opacity: 0;
}
.hamburger.open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.mobile-menu {
  display: none;
  position: fixed;
  top: var(--nav-h);
  left: 0;
  right: 0;
  background: var(--clr-bg2);
  border-bottom: 1px solid var(--clr-border);
  padding: 1rem 1.5rem;
  z-index: 999;
  flex-direction: column;
  gap: 0.25rem;
}
.mobile-menu.open {
  display: flex;
}
.mobile-menu a {
  padding: 0.75rem 1rem;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 500;
  color: var(--clr-text-muted);
  transition:
    color var(--transition),
    background var(--transition);
}
.mobile-menu a:hover {
  color: var(--clr-white);
  background: var(--clr-surface2);
}

/* Page offset for fixed nav */
main {
  padding-top: var(--nav-h);
}

/* =============================================
   FOOTER
   ============================================= */
footer {
  background: var(--clr-bg2);
  border-top: 1px solid var(--clr-border);
  margin-top: 5rem;
}
.footer-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 3rem 1.5rem;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 3rem;
}
.footer-brand p {
  color: var(--clr-text-muted);
  font-size: 0.9rem;
  margin-top: 0.75rem;
  line-height: 1.7;
}
.footer-col h4 {
  font-family: var(--font-head);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--clr-text-muted);
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 1rem;
}
.footer-col ul li a {
  color: var(--clr-text-muted);
  font-size: 0.9rem;
  transition: color var(--transition);
  display: block;
  padding: 0.2rem 0;
}
.footer-col ul li a:hover {
  color: var(--clr-accent);
}
.footer-bottom {
  max-width: 1280px;
  margin: 0 auto;
  padding: 1.25rem 1.5rem;
  border-top: 1px solid var(--clr-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--clr-text-muted);
  font-size: 0.85rem;
}
.footer-bottom span {
  color: var(--clr-accent);
}

/* =============================================
   BUTTONS
   ============================================= */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.75rem;
  background: var(--clr-accent);
  color: #000;
  font-weight: 700;
  font-size: 0.95rem;
  border-radius: 10px;
  transition:
    background var(--transition),
    transform var(--transition),
    box-shadow var(--transition);
}
.btn-primary:hover {
  background: var(--clr-accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px var(--clr-accent-glow);
}
.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.75rem;
  background: transparent;
  color: var(--clr-text);
  border: 1px solid var(--clr-border);
  font-weight: 600;
  font-size: 0.95rem;
  border-radius: 10px;
  transition:
    background var(--transition),
    border-color var(--transition),
    transform var(--transition);
}
.btn-secondary:hover {
  background: var(--clr-surface2);
  border-color: var(--clr-accent);
  transform: translateY(-2px);
}
.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 1rem;
  color: var(--clr-accent);
  font-size: 0.9rem;
  font-weight: 500;
  border-radius: 8px;
  transition: background var(--transition);
}
.btn-ghost:hover {
  background: var(--clr-accent-glow);
}
.btn-danger {
  display: inline-flex;
  align-items: center;
  padding: 0.4rem 0.8rem;
  background: rgba(239, 68, 68, 0.1);
  color: var(--clr-error);
  border: 1px solid rgba(239, 68, 68, 0.3);
  border-radius: 8px;
  font-size: 0.8rem;
  transition: background var(--transition);
}
.btn-danger:hover {
  background: rgba(239, 68, 68, 0.2);
}

/* =============================================
   PRODUCT CARDS
   ============================================= */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1.5rem;
}
.product-card {
  background: var(--clr-surface);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition:
    transform var(--transition),
    box-shadow var(--transition),
    border-color var(--transition);
  display: flex;
  flex-direction: column;
}
.product-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-card);
  border-color: rgba(245, 166, 35, 0.3);
}
.card-img-link {
  display: block;
}
.card-img-wrap {
  position: relative;
  overflow: hidden;
  height: 220px;
  background: var(--clr-surface2);
}
.card-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.product-card:hover .card-img-wrap img {
  transform: scale(1.07);
}
.badge-discount {
  position: absolute;
  top: 12px;
  left: 12px;
  background: var(--clr-accent);
  color: #000;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  padding: 3px 8px;
  border-radius: 6px;
}
.card-body {
  padding: 1.1rem 1.2rem 1.2rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.card-category {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--clr-accent);
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 0.35rem;
}
.card-title {
  font-family: var(--font-head);
  font-size: 0.98rem;
  font-weight: 600;
  color: var(--clr-text);
  line-height: 1.35;
  margin-bottom: 0.4rem;
  transition: color var(--transition);
}
.card-title:hover {
  color: var(--clr-accent);
}
.card-stars {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 0.75rem;
}
.stars {
  color: var(--clr-accent);
  font-size: 0.82rem;
  letter-spacing: 1px;
}
.review-count {
  font-size: 0.78rem;
  color: var(--clr-text-muted);
}
.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
}
.price-wrap {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
}
.price {
  font-family: var(--font-head);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--clr-white);
}
.price-old {
  font-size: 0.82rem;
  color: var(--clr-text-muted);
  text-decoration: line-through;
}
.btn-add {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  background: var(--clr-surface2);
  border: 1px solid var(--clr-border);
  border-radius: 10px;
  color: var(--clr-text);
  transition:
    background var(--transition),
    border-color var(--transition),
    color var(--transition),
    transform var(--transition);
  flex-shrink: 0;
}
.btn-add svg {
  width: 17px;
  height: 17px;
}
.btn-add:hover {
  background: var(--clr-accent);
  border-color: var(--clr-accent);
  color: #000;
  transform: scale(1.1);
}
.btn-add.added {
  background: var(--clr-success);
  border-color: var(--clr-success);
  color: #000;
}

/* =============================================
   SECTION LAYOUTS
   ============================================= */
.section {
  padding: 4.5rem 0;
}
.section-narrow {
  padding: 3rem 0;
}
.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1.5rem;
}
.section-header {
  text-align: center;
  margin-bottom: 3rem;
}
.section-header h2 {
  font-family: var(--font-head);
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 0.75rem;
}
.section-header p {
  color: var(--clr-text-muted);
  font-size: 1rem;
  max-width: 560px;
  margin: 0 auto;
}
.section-header .accent {
  color: var(--clr-accent);
}
.divider {
  width: 48px;
  height: 3px;
  background: var(--clr-accent);
  border-radius: 2px;
  margin: 0.75rem auto 0;
}

/* =============================================
   FORMS
   ============================================= */
.form-group {
  margin-bottom: 1.25rem;
}
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
label {
  display: block;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--clr-text-muted);
  margin-bottom: 0.4rem;
}
.form-control {
  width: 100%;
  padding: 0.75rem 1rem;
  background: var(--clr-surface);
  color: var(--clr-text);
  border: 1px solid var(--clr-border);
  border-radius: 10px;
  font-size: 0.95rem;
  transition:
    border-color var(--transition),
    box-shadow var(--transition);
  outline: none;
}
.form-control:focus {
  border-color: var(--clr-accent);
  box-shadow: 0 0 0 3px var(--clr-accent-glow);
}
.form-control.error {
  border-color: var(--clr-error);
}
textarea.form-control {
  resize: vertical;
  min-height: 130px;
}
.field-error {
  font-size: 0.78rem;
  color: var(--clr-error);
  margin-top: 0.3rem;
  display: none;
}
.field-error.show {
  display: block;
}

/* =============================================
   BADGES & MISC
   ============================================= */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
}
.badge-success {
  background: rgba(34, 197, 94, 0.15);
  color: var(--clr-success);
}
.badge-warning {
  background: rgba(245, 166, 35, 0.15);
  color: var(--clr-accent);
}
.badge-error {
  background: rgba(239, 68, 68, 0.15);
  color: var(--clr-error);
}

.page-header {
  padding: 3.5rem 0 2.5rem;
  text-align: center;
  border-bottom: 1px solid var(--clr-border);
}
.page-header h1 {
  font-family: var(--font-head);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
}
.page-header p {
  color: var(--clr-text-muted);
  margin-top: 0.5rem;
}
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: var(--clr-text-muted);
  justify-content: center;
  margin-bottom: 1rem;
}
.breadcrumb a:hover {
  color: var(--clr-accent);
}

/* =============================================
   TOAST NOTIFICATIONS
   ============================================= */
#toast-container {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  pointer-events: none;
}
.toast {
  background: var(--clr-surface);
  border: 1px solid var(--clr-border);
  border-left: 4px solid var(--clr-success);
  color: var(--clr-text);
  padding: 0.85rem 1.25rem;
  border-radius: 10px;
  font-size: 0.9rem;
  font-weight: 500;
  box-shadow: var(--shadow);
  transform: translateX(120%);
  opacity: 0;
  transition:
    transform 0.35s ease,
    opacity 0.35s ease;
  pointer-events: auto;
}
.toast.show {
  transform: translateX(0);
  opacity: 1;
}
.toast.toast-error {
  border-left-color: var(--clr-error);
}

/* =============================================
   MODAL
   ============================================= */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition);
}
.modal-overlay.open {
  opacity: 1;
  pointer-events: auto;
}
.modal-box {
  background: var(--clr-surface);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  max-width: 600px;
  width: 90%;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  position: relative;
  transform: scale(0.92);
  transition: transform var(--transition);
}
.modal-overlay.open .modal-box {
  transform: scale(1);
}
.modal-close {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: var(--clr-bg2);
  color: var(--clr-text-muted);
  transition: all var(--transition);
}
.modal-close:hover {
  background: var(--clr-surface2);
  color: var(--clr-white);
}
.modal-content {
  text-align: left;
  overflow-y: auto;
  padding-right: 0.5rem;
  margin-top: 1rem;
  font-size: 0.9rem;
  color: var(--clr-text-muted);
  line-height: 1.7;
}
.modal-content h3 {
  color: var(--clr-white);
  margin: 1.5rem 0 0.5rem;
  font-family: var(--font-head);
}
.modal-content p {
  margin-bottom: 1rem;
}

/* =============================================
   HOME PAGE SPECIFIC
   ============================================= */
.hero {
  min-height: calc(92vh - var(--nav-h));
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(
      ellipse 80% 60% at 50% 0%,
      rgba(245, 166, 35, 0.12) 0%,
      transparent 70%
    ),
    linear-gradient(180deg, var(--clr-bg) 0%, var(--clr-bg2) 100%);
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23f5a623' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}
.hero > .container {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}
.hero-content {
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--clr-accent-glow);
  border: 1px solid rgba(245, 166, 35, 0.4);
  color: var(--clr-accent);
  padding: 0.35rem 0.9rem;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 600;
  margin-bottom: 1.25rem;
  letter-spacing: 0.5px;
}
.hero h1 {
  font-family: var(--font-head);
  font-size: clamp(2.4rem, 5vw, 3.8rem);
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 1.25rem;
}
.hero h1 .gradient-text {
  background: linear-gradient(135deg, var(--clr-accent) 0%, #ff7c00 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero p {
  font-size: 1.05rem;
  color: var(--clr-text-muted);
  margin-bottom: 2rem;
  max-width: 480px;
  line-height: 1.75;
}
.hero-btns {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}
.hero-stats {
  display: flex;
  gap: 2rem;
  margin-top: 2.5rem;
}
.stat {
}
.stat-num {
  font-family: var(--font-head);
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--clr-white);
}
.stat-label {
  font-size: 0.78rem;
  color: var(--clr-text-muted);
}
.hero-img-wrap {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}
.hero-img-blob {
  width: 480px;
  height: 480px;
  max-width: 100%;
  background: radial-gradient(
    circle,
    rgba(245, 166, 35, 0.15) 0%,
    transparent 70%
  );
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}
.hero-img-blob img {
  width: 80%;
  height: 80%;
  object-fit: contain;
  animation: float 6s ease-in-out infinite;
  filter: drop-shadow(0 20px 40px rgba(245, 166, 35, 0.3));
}
@keyframes float {
  0%,
  100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-18px);
  }
}
.floating-card {
  position: absolute;
  background: var(--clr-surface);
  border: 1px solid var(--clr-border);
  border-radius: 14px;
  padding: 0.75rem 1rem;
  box-shadow: var(--shadow);
  font-size: 0.82rem;
  font-weight: 600;
  white-space: nowrap;
}
.floating-card.fc1 {
  top: 60px;
  right: 0;
  animation: float 5s ease-in-out 1s infinite;
}
.floating-card.fc2 {
  bottom: 80px;
  left: 0;
  animation: float 5s ease-in-out 0.5s infinite;
}
.floating-card .fc-icon {
  font-size: 1.3rem;
}

.features-strip {
  background: var(--clr-surface);
  border-top: 1px solid var(--clr-border);
  border-bottom: 1px solid var(--clr-border);
}
.features-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  divide: var(--clr-border);
}
.feature-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.5rem 2rem;
  border-right: 1px solid var(--clr-border);
}
.feature-item:last-child {
  border-right: none;
}
.feature-icon {
  width: 44px;
  height: 44px;
  background: var(--clr-accent-glow);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  flex-shrink: 0;
}
.feature-text h4 {
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 0.1rem;
}
.feature-text p {
  font-size: 0.78rem;
  color: var(--clr-text-muted);
}

/* =============================================
   SHOP PAGE SPECIFIC
   ============================================= */
.shop-controls {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}
.search-wrap {
  position: relative;
  flex: 1;
  min-width: 240px;
}
.search-wrap svg {
  position: absolute;
  left: 0.9rem;
  top: 50%;
  transform: translateY(-50%);
  width: 17px;
  height: 17px;
  color: var(--clr-text-muted);
}
.search-wrap input {
  width: 100%;
  padding: 0.7rem 1rem 0.7rem 2.5rem;
  background: var(--clr-surface);
  border: 1px solid var(--clr-border);
  border-radius: 10px;
  color: var(--clr-text);
  font-size: 0.9rem;
  outline: none;
  transition:
    border-color var(--transition),
    box-shadow var(--transition);
}
.search-wrap input:focus {
  border-color: var(--clr-accent);
  box-shadow: 0 0 0 3px var(--clr-accent-glow);
}
.category-tabs {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
}
.cat-tab {
  padding: 0.5rem 1rem;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--clr-text-muted);
  background: var(--clr-surface);
  border: 1px solid var(--clr-border);
  cursor: pointer;
  transition: all var(--transition);
}
.cat-tab.active,
.cat-tab:hover {
  background: var(--clr-accent);
  color: #000;
  border-color: var(--clr-accent);
  font-weight: 700;
}
.results-info {
  color: var(--clr-text-muted);
  font-size: 0.88rem;
  margin-bottom: 1.5rem;
}
.no-results {
  text-align: center;
  padding: 4rem 0;
  color: var(--clr-text-muted);
}
.no-results h3 {
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
  color: var(--clr-text);
}

/* =============================================
   PRODUCT DETAIL PAGE
   ============================================= */
.product-detail-wrap {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3.5rem;
  align-items: start;
}
.product-gallery {
}
.gallery-main {
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--clr-surface);
  height: 420px;
}
.gallery-main img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.gallery-thumbs {
  display: flex;
  gap: 0.75rem;
  margin-top: 0.75rem;
}
.gallery-thumb {
  width: 72px;
  height: 72px;
  border-radius: 10px;
  overflow: hidden;
  border: 2px solid var(--clr-border);
  cursor: pointer;
  transition: border-color var(--transition);
  flex-shrink: 0;
  background: var(--clr-surface);
}
.gallery-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.gallery-thumb.active {
  border-color: var(--clr-accent);
}
.product-info {
}
.product-info .card-category {
  font-size: 0.8rem;
  margin-bottom: 0.5rem;
  display: block;
}
.product-info h1 {
  font-family: var(--font-head);
  font-size: clamp(1.6rem, 3vw, 2.1rem);
  font-weight: 800;
  margin-bottom: 0.75rem;
}
.product-rating {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}
.product-rating .stars {
  font-size: 1rem;
}
.product-rating .review-count {
  color: var(--clr-text-muted);
  font-size: 0.9rem;
}
.product-price {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}
.product-price .price {
  font-size: 2rem;
}
.product-price .price-old {
  font-size: 1rem;
}
.product-description {
  color: var(--clr-text-muted);
  line-height: 1.8;
  margin-bottom: 1.5rem;
  border-top: 1px solid var(--clr-border);
  padding-top: 1.5rem;
}
.quantity-wrap {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  margin-bottom: 1.5rem;
}
.qty-label {
  font-size: 0.85rem;
  color: var(--clr-text-muted);
}
.qty-control {
  display: flex;
  align-items: center;
  background: var(--clr-surface);
  border: 1px solid var(--clr-border);
  border-radius: 10px;
  overflow: hidden;
}
.qty-btn {
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  color: var(--clr-text);
  cursor: pointer;
  transition: background var(--transition);
  border: none;
  background: none;
}
.qty-btn:hover {
  background: var(--clr-surface2);
  color: var(--clr-accent);
}
.qty-val {
  padding: 0 1rem;
  font-weight: 700;
  min-width: 36px;
  text-align: center;
}
.add-to-cart-big {
  width: 100%;
  padding: 0.9rem;
  background: var(--clr-accent);
  color: #000;
  font-weight: 700;
  font-size: 1rem;
  border-radius: 12px;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  transition:
    background var(--transition),
    transform var(--transition),
    box-shadow var(--transition);
  margin-bottom: 0.75rem;
}
.add-to-cart-big:hover {
  background: var(--clr-accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px var(--clr-accent-glow);
}
.product-meta {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--clr-border);
}
.meta-row {
  display: flex;
  gap: 0.5rem;
  font-size: 0.85rem;
}
.meta-label {
  color: var(--clr-text-muted);
  width: 80px;
  flex-shrink: 0;
}
.meta-val {
  font-weight: 500;
}
.related-section {
  padding: 3rem 0 0;
}
.related-section h2 {
  font-family: var(--font-head);
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
}

/* =============================================
   CART PAGE SPECIFIC
   ============================================= */
.cart-layout {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 2rem;
  align-items: start;
}
.cart-items {
  background: var(--clr-surface);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.cart-items-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--clr-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.cart-items-header h2 {
  font-family: var(--font-head);
  font-size: 1.1rem;
  font-weight: 700;
}
.cart-item {
  display: grid;
  grid-template-columns: 88px 1fr auto auto auto;
  gap: 1rem;
  align-items: center;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--clr-border);
  transition: background var(--transition);
}
.cart-item:last-child {
  border-bottom: none;
}
.cart-item:hover {
  background: rgba(255, 255, 255, 0.02);
}
.cart-item-img {
  width: 88px;
  height: 88px;
  border-radius: 10px;
  overflow: hidden;
  background: var(--clr-surface2);
  flex-shrink: 0;
}
.cart-item-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.cart-item-name {
  font-weight: 600;
  font-size: 0.95rem;
  margin-bottom: 0.2rem;
}
.cart-item-price {
  font-size: 0.85rem;
  color: var(--clr-text-muted);
}
.cart-item-qty {
  display: flex;
  align-items: center;
  background: var(--clr-surface2);
  border: 1px solid var(--clr-border);
  border-radius: 8px;
  overflow: hidden;
}
.cart-item-qty button {
  width: 30px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  color: var(--clr-text);
  transition: background var(--transition);
}
.cart-item-qty button:hover {
  background: var(--clr-surface);
  color: var(--clr-accent);
}
.cart-item-qty span {
  padding: 0 0.75rem;
  font-weight: 700;
  font-size: 0.9rem;
}
.cart-item-subtotal {
  font-weight: 700;
  font-size: 1rem;
  text-align: right;
}
.cart-empty {
  padding: 4rem;
  text-align: center;
}
.cart-empty-icon {
  font-size: 4rem;
  margin-bottom: 1rem;
}
.cart-empty h3 {
  font-family: var(--font-head);
  font-size: 1.3rem;
  margin-bottom: 0.5rem;
}
.cart-empty p {
  color: var(--clr-text-muted);
  margin-bottom: 1.75rem;
}
.order-summary-card {
  background: var(--clr-surface);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  position: sticky;
  top: calc(var(--nav-h) + 1rem);
}
.order-summary-card h2 {
  font-family: var(--font-head);
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 1.25rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--clr-border);
}
.summary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.9rem;
  margin-bottom: 0.75rem;
}
.summary-row.total {
  border-top: 1px solid var(--clr-border);
  padding-top: 0.75rem;
  margin-top: 0.25rem;
  font-weight: 700;
  font-size: 1rem;
}
.summary-row.total .summary-val {
  color: var(--clr-accent);
  font-size: 1.15rem;
}
.summary-label {
  color: var(--clr-text-muted);
}
.checkout-divider {
  border: none;
  border-top: 1px solid var(--clr-border);
  margin: 1.5rem 0;
}
.checkout-form h3 {
  font-family: var(--font-head);
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 1rem;
}
.place-order-btn {
  width: 100%;
  padding: 0.9rem;
  background: var(--clr-accent);
  color: #000;
  font-weight: 700;
  font-size: 1rem;
  border-radius: 12px;
  border: none;
  cursor: pointer;
  margin-top: 1.25rem;
  transition:
    background var(--transition),
    transform var(--transition),
    box-shadow var(--transition);
}
.place-order-btn:hover {
  background: var(--clr-accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px var(--clr-accent-glow);
}

/* =============================================
   CONTACT PAGE SPECIFIC
   ============================================= */
.contact-layout {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 3rem;
  align-items: start;
}
.contact-info-cards {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.contact-info-card {
  background: var(--clr-surface);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  transition:
    border-color var(--transition),
    transform var(--transition);
}
.contact-info-card:hover {
  border-color: var(--clr-accent);
  transform: translateX(4px);
}
.contact-info-card .ci-icon {
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  background: var(--clr-accent-glow);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
}
.contact-info-card h4 {
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 0.2rem;
}
.contact-info-card p {
  font-size: 0.85rem;
  color: var(--clr-text-muted);
  line-height: 1.5;
}
.contact-form-card {
  background: var(--clr-surface);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-lg);
  padding: 2rem;
}
.contact-form-card h2 {
  font-family: var(--font-head);
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 0.4rem;
}
.contact-form-card .sub {
  color: var(--clr-text-muted);
  font-size: 0.9rem;
  margin-bottom: 1.75rem;
}
.submit-btn {
  width: 100%;
  padding: 0.85rem;
  background: var(--clr-accent);
  color: #000;
  font-weight: 700;
  font-size: 1rem;
  border-radius: 12px;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition:
    background var(--transition),
    transform var(--transition),
    box-shadow var(--transition);
}
.submit-btn:hover {
  background: var(--clr-accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px var(--clr-accent-glow);
}
.map-section {
  margin-top: 3rem;
  background: var(--clr-surface);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  height: 220px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--clr-text-muted);
  font-size: 0.9rem;
}

/* =============================================
   SCROLLBAR
   ============================================= */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: var(--clr-bg2);
}
::-webkit-scrollbar-thumb {
  background: var(--clr-surface2);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--clr-accent);
}

/* =============================================
   RESPONSIVE
   ============================================= */
@media (max-width: 1024px) {
  .footer-inner {
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
  }
  .hero > .container {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .hero p {
    margin: 0 auto 2rem;
  }
  .hero-btns {
    justify-content: center;
  }
  .hero-stats {
    justify-content: center;
  }
  .hero-img-wrap {
    display: none;
  }
  .features-grid {
    grid-template-columns: 1fr 1fr;
  }
  .feature-item {
    border-right: none;
    border-bottom: 1px solid var(--clr-border);
  }
  .feature-item:nth-child(odd) {
    border-right: 1px solid var(--clr-border);
  }
  .cart-layout {
    grid-template-columns: 1fr;
  }
  .order-summary-card {
    position: static;
  }
  .contact-layout {
    grid-template-columns: 1fr;
  }
  .product-detail-wrap {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 768px) {
  .nav-links {
    display: none;
  }
  .nav-actions {
    margin-left: auto;
  }
  .hamburger {
    display: flex;
  }
  .footer-inner {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  .footer-bottom {
    flex-direction: column;
    gap: 0.5rem;
    text-align: center;
  }
  .features-grid {
    grid-template-columns: 1fr;
  }
  .feature-item {
    border-right: none;
  }
  .products-grid {
    grid-template-columns: repeat(auto-fill, minmax(165px, 1fr));
    gap: 1rem;
  }
  .card-img-wrap {
    height: 170px;
  }
  .form-row {
    grid-template-columns: 1fr;
  }
  .cart-item {
    grid-template-columns: 68px 1fr;
  }
  .cart-item-qty,
  .cart-item-subtotal,
  .btn-danger {
    grid-column: 2;
  }
}
@media (max-width: 480px) {
  .shop-controls {
    flex-direction: column;
    align-items: stretch;
  }
  .search-wrap {
    min-width: unset;
  }
  .hero h1 {
    font-size: 2rem;
  }
  .section {
    padding: 3rem 0;
  }
}
