/* ═══════════════════════════════════════════════════════
   store.css — Skyline Drone Solutions
   Page-specific styles for store.html
   ═══════════════════════════════════════════════════════ */

/* ───────── STORE-SPECIFIC VARIABLES ───────── */
:root {
  --navy-card: #0d1e35;
  --navy-card-hover: #0f2440;
  --max-w: 1320px;
  --badge-new: #0ea5e9;
  --badge-sale: #f97316;
  --badge-bestseller: #2F6BFF;
  --badge-pro: #8b5cf6;
}

/* ───────── GRAIN OVERLAY — store uses z-index 1000 ───────── */
.grain-overlay { z-index: 1000; opacity: 0.035; }

/* ───────── NAV — store uses z-index 500 ───────── */
nav { z-index: 500; }

/* ───────── CART BADGE — store has bump animation ───────── */
.cart-badge {
  transition: transform 0.3s cubic-bezier(0.34,1.56,0.64,1);
}
.cart-badge.bump { transform: scale(1.5); }

/* ───────── STORE HERO ───────── */
.store-hero {
  padding-top: 68px;
  background: var(--navy-dark);
  position: relative;
  overflow: hidden;
}
.store-hero::before {
  content: '';
  position: absolute; inset: 0;
  background-image: radial-gradient(rgba(47,107,255,0.14) 1px, transparent 1px);
  background-size: 36px 36px;
  -webkit-mask-image: radial-gradient(ellipse 80% 80% at 50% 0%, black 30%, transparent 80%);
  mask-image: radial-gradient(ellipse 80% 80% at 50% 0%, black 30%, transparent 80%);
  pointer-events: none;
}
.store-hero::after {
  content: '';
  position: absolute; bottom: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(47,107,255,0.35) 50%, transparent);
}

.store-hero-inner {
  position: relative; z-index: 1;
  max-width: var(--max-w); margin: 0 auto;
  padding: 9rem 2.5rem 5rem;
}

.store-breadcrumb {
  display: flex; align-items: center; gap: 0.5rem; list-style: none;
  font-size: 0.75rem; font-weight: 500; letter-spacing: 0.06em;
  text-transform: uppercase; color: rgba(255,255,255,0.38);
  margin-bottom: 2rem;
}
.store-breadcrumb a { color: rgba(255,255,255,0.38); text-decoration: none; transition: color 0.2s; }
.store-breadcrumb a:hover { color: rgba(255,255,255,0.7); }
.store-breadcrumb li:not(:first-child)::before { content: '/'; margin-right: 0.5rem; opacity: 0.4; }
.store-breadcrumb li:last-child { color: rgba(255,255,255,0.65); }

.store-hero-row {
  display: flex; align-items: flex-end;
  justify-content: space-between; gap: 2rem;
}

.store-hero-label {
  font-size: 0.7rem; font-weight: 700; letter-spacing: 0.2em;
  text-transform: uppercase; color: var(--blue-light);
  display: flex; align-items: center; gap: 8px; margin-bottom: 1.25rem;
}
.store-hero-label::before {
  content: ''; display: block; width: 28px; height: 2px; background: var(--blue);
}

.store-hero-title {
  font-family: 'Outfit', sans-serif;
  font-size: clamp(3rem, 6vw, 5.5rem);
  font-weight: 900; line-height: 1.0; letter-spacing: -0.04em; color: #fff;
  max-width: 900px; margin-bottom: 1.5rem;
}
.store-hero-title em {
  font-style: normal;
  color: transparent;
  -webkit-text-stroke: 1.5px rgba(255,255,255,0.35);
}

.store-hero-sub {
  font-size: 1.05rem; line-height: 1.7;
  color: rgba(255,255,255,0.52); max-width: 520px;
}

.store-hero-meta {
  display: flex; align-items: center; gap: 1.5rem;
  flex-shrink: 0; padding-bottom: 0.25rem;
}
.store-count {
  font-size: 0.8rem; font-weight: 600; color: rgba(255,255,255,0.35);
}
.store-count strong { color: rgba(255,255,255,0.7); }

/* ───────── FILTER BAR ───────── */
.filter-bar {
  position: sticky; top: 68px; z-index: 200;
  background: rgba(7,15,30,0.94); backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255,255,255,0.07);
  border-top: 1px solid rgba(255,255,255,0.05);
  transition: box-shadow 0.3s;
}
.filter-bar.stuck { box-shadow: 0 4px 24px rgba(0,0,0,0.4); }

.filter-bar-inner {
  max-width: var(--max-w); margin: 0 auto;
  padding: 0 2.5rem;
  display: flex; align-items: center; gap: 0; justify-content: space-between;
  height: 56px;
}

.filter-chips {
  display: flex; align-items: center; gap: 0.25rem; list-style: none;
}

.filter-chip {
  padding: 0.35rem 1rem; border-radius: 6px;
  font-size: 0.8rem; font-weight: 600; letter-spacing: 0.01em;
  cursor: pointer; border: 1.5px solid transparent;
  transition: background 0.2s, border-color 0.2s, color 0.2s, transform 0.15s;
  color: rgba(255,255,255,0.45); background: transparent; user-select: none;
}
.filter-chip:hover { color: rgba(255,255,255,0.8); background: rgba(255,255,255,0.05); }
.filter-chip.active {
  color: #fff; background: rgba(47,107,255,0.18);
  border-color: rgba(47,107,255,0.5);
}
.filter-chip:active { transform: scale(0.95); }

.filter-right {
  display: flex; align-items: center; gap: 1rem;
}

.sort-select {
  background: transparent; border: 1.5px solid rgba(255,255,255,0.12);
  color: rgba(255,255,255,0.55); font-family: 'Inter', sans-serif;
  font-size: 0.8rem; font-weight: 600; padding: 0.35rem 2rem 0.35rem 0.85rem;
  border-radius: 6px; cursor: pointer; outline: none;
  appearance: none; -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg width='10' height='6' viewBox='0 0 10 6' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1l4 4 4-4' stroke='rgba(255,255,255,0.35)' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: calc(100% - 10px) center;
  transition: border-color 0.2s, color 0.2s;
}
.sort-select:hover { border-color: rgba(255,255,255,0.3); color: rgba(255,255,255,0.8); }
.sort-select option { background: #0d1e35; color: #fff; }

.view-toggle {
  display: flex; align-items: center;
  border: 1.5px solid rgba(255,255,255,0.1); border-radius: 6px; overflow: hidden;
}
.view-btn {
  width: 34px; height: 32px; display: flex; align-items: center; justify-content: center;
  background: transparent; border: none; cursor: pointer;
  color: rgba(255,255,255,0.28); transition: background 0.2s, color 0.2s;
}
.view-btn.active { background: rgba(47,107,255,0.2); color: var(--blue-light); }
.view-btn:hover:not(.active) { background: rgba(255,255,255,0.05); color: rgba(255,255,255,0.55); }

/* ───────── PRODUCT GRID ───────── */
.products-section {
  max-width: var(--max-w); margin: 0 auto;
  padding: 2.5rem 2.5rem 5rem;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  transition: opacity 0.3s;
}
.product-grid.filtering { opacity: 0.4; pointer-events: none; }
.product-grid.list-view { grid-template-columns: 1fr; }
.product-grid.cols-2 { grid-template-columns: repeat(2, 1fr); }

/* ───────── PRODUCT CARD ───────── */
.product-card {
  background: var(--navy-card);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 14px; overflow: hidden;
  display: flex; flex-direction: column;
  transition: border-color 0.28s, transform 0.3s cubic-bezier(0.22,1,0.36,1), box-shadow 0.3s;
  position: relative;
  cursor: pointer;
}
.product-card:hover {
  border-color: rgba(47,107,255,0.35);
  transform: translateY(-4px);
  box-shadow: 0 16px 48px rgba(0,0,0,0.4), 0 0 0 1px rgba(47,107,255,0.15);
}
.product-card[data-hidden="true"] { display: none; }

/* Image area */
.product-img-wrap {
  position: relative;
  aspect-ratio: 4/3;
  overflow: hidden;
  background: #0a1828;
}
.product-img-wrap img {
  position: absolute; inset: 0;
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.65s cubic-bezier(0.22,1,0.36,1), opacity 0.45s;
}
.product-img-primary { z-index: 1; opacity: 1; }
.product-img-secondary { z-index: 0; opacity: 0; transform: scale(1.04); }
.product-card:hover .product-img-primary { opacity: 0; transform: scale(1.06); }
.product-card:hover .product-img-secondary { opacity: 1; z-index: 1; }

/* Badge */
.product-badge {
  position: absolute; top: 12px; left: 12px; z-index: 10;
  padding: 3px 9px; border-radius: 5px;
  font-size: 0.65rem; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase;
}
.badge-bestseller { background: var(--blue); color: #fff; }
.badge-new { background: var(--badge-new); color: #fff; }
.badge-sale { background: var(--badge-sale); color: #fff; }
.badge-pro { background: var(--badge-pro); color: #fff; }

/* Wishlist */
.product-wishlist {
  position: absolute; top: 12px; right: 12px; z-index: 10;
  width: 34px; height: 34px; border-radius: 50%;
  background: rgba(7,15,30,0.7); backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.1);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: background 0.2s, border-color 0.2s, transform 0.2s;
}
.product-wishlist:hover { background: rgba(255,255,255,0.12); transform: scale(1.1); }
.product-wishlist svg { transition: fill 0.2s, stroke 0.2s; }
.product-wishlist.wished svg { fill: #f43f5e; stroke: #f43f5e; }
.product-wishlist.wished { border-color: rgba(244,63,94,0.4); }

/* Quick add overlay */
.quick-add-wrap {
  position: absolute; bottom: 0; left: 0; right: 0; z-index: 10;
  padding: 0.75rem;
  transform: translateY(100%);
  transition: transform 0.35s cubic-bezier(0.22,1,0.36,1);
}
.product-card:hover .quick-add-wrap { transform: translateY(0); }
.quick-add-btn {
  width: 100%; padding: 0.65rem;
  background: var(--blue); color: #fff;
  border: none; border-radius: 8px;
  font-family: 'Inter', sans-serif; font-size: 0.82rem; font-weight: 700;
  letter-spacing: 0.04em; text-transform: uppercase;
  cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 7px;
  transition: background 0.2s, transform 0.15s;
  box-shadow: 0 4px 16px rgba(47,107,255,0.5);
}
.quick-add-btn:hover { background: var(--blue-dark); }
.quick-add-btn:active { transform: scale(0.98); }

/* Card content */
.product-info {
  padding: 1.25rem 1.4rem 1.5rem;
  display: flex; flex-direction: column; gap: 0.4rem; flex: 1;
}
.product-category {
  font-size: 0.65rem; font-weight: 700; letter-spacing: 0.18em;
  text-transform: uppercase; color: var(--blue);
}
.product-name {
  font-family: 'Outfit', sans-serif;
  font-size: 1.15rem; font-weight: 800; color: #fff;
  letter-spacing: -0.02em; line-height: 1.2;
}
.product-sub {
  font-size: 0.8rem; color: rgba(255,255,255,0.38); line-height: 1.45;
}
.product-specs {
  display: flex; flex-wrap: wrap; gap: 0.35rem; margin-top: 0.4rem;
}
.spec-chip {
  font-size: 0.65rem; font-weight: 600; padding: 3px 8px;
  border-radius: 4px; background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.08);
  color: rgba(255,255,255,0.45); letter-spacing: 0.04em;
}
.product-bottom {
  margin-top: auto; padding-top: 0.9rem;
  border-top: 1px solid rgba(255,255,255,0.06);
  display: flex; align-items: center; justify-content: space-between;
}
.product-rating {
  display: flex; align-items: center; gap: 5px;
}
.stars { display: flex; gap: 2px; }
.stars svg { color: #f59e0b; }
.rating-count { font-size: 0.75rem; color: rgba(255,255,255,0.32); }
.product-price-wrap {
  display: flex; align-items: baseline; gap: 0.4rem;
}
.product-price {
  font-family: 'Outfit', sans-serif;
  font-size: 1.3rem; font-weight: 800; color: #fff; letter-spacing: -0.03em;
}
.product-price-compare {
  font-size: 0.82rem; color: rgba(255,255,255,0.28);
  text-decoration: line-through;
}
.product-price-save {
  font-size: 0.72rem; font-weight: 700;
  color: #f97316; letter-spacing: 0.02em;
}

/* Color swatches */
.color-swatches {
  display: flex; gap: 5px; margin-top: 0.35rem;
}
.swatch {
  width: 14px; height: 14px; border-radius: 50%;
  border: 1.5px solid rgba(255,255,255,0.15);
  cursor: pointer; transition: transform 0.2s, border-color 0.2s;
}
.swatch:hover, .swatch.active { transform: scale(1.2); border-color: rgba(255,255,255,0.6); }

/* ───────── LIST VIEW CARD ───────── */
.product-grid.list-view .product-card {
  flex-direction: row; align-items: stretch;
}
.product-grid.list-view .product-img-wrap {
  width: 280px; flex-shrink: 0;
  aspect-ratio: unset; height: auto;
  border-radius: 0;
}
.product-grid.list-view .product-info {
  padding: 1.75rem 2rem; justify-content: center;
}
.product-grid.list-view .product-name { font-size: 1.4rem; }
.product-grid.list-view .product-sub { font-size: 0.875rem; max-width: 500px; }
.product-grid.list-view .quick-add-wrap { display: none; }
.product-grid.list-view .product-card:hover { transform: translateX(4px) translateY(0); }
.product-grid.list-view .list-add-btn { display: flex !important; }

.list-add-btn {
  display: none;
  align-items: center; gap: 8px;
  background: var(--blue); color: #fff;
  border: none; border-radius: 8px;
  font-family: 'Inter', sans-serif; font-size: 0.82rem; font-weight: 700;
  letter-spacing: 0.04em; padding: 0.6rem 1.25rem;
  cursor: pointer; transition: background 0.2s;
  margin-top: 1rem;
  text-transform: uppercase;
}
.list-add-btn:hover { background: var(--blue-dark); }

/* ───────── CART DRAWER ───────── */
.cart-overlay {
  position: fixed; inset: 0; z-index: 800;
  background: rgba(0,0,0,0.6); backdrop-filter: blur(4px);
  opacity: 0; pointer-events: none;
  transition: opacity 0.35s;
}
.cart-overlay.open { opacity: 1; pointer-events: auto; }

.cart-drawer {
  position: fixed; top: 0; right: 0; bottom: 0;
  width: 420px; max-width: 100vw; z-index: 900;
  background: #0a1828; border-left: 1px solid rgba(255,255,255,0.08);
  transform: translateX(100%);
  transition: transform 0.45s cubic-bezier(0.22,1,0.36,1);
  display: flex; flex-direction: column;
  box-shadow: -24px 0 80px rgba(0,0,0,0.5);
}
.cart-drawer.open { transform: translateX(0); }

.cart-drawer-head {
  padding: 1.5rem 1.75rem;
  border-bottom: 1px solid rgba(255,255,255,0.07);
  display: flex; align-items: center; justify-content: space-between; flex-shrink: 0;
}
.cart-drawer-title {
  font-family: 'Outfit', sans-serif;
  font-size: 1.2rem; font-weight: 800; color: #fff; letter-spacing: -0.02em;
}
.cart-close-btn {
  width: 36px; height: 36px; border-radius: 8px;
  background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.1);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; color: rgba(255,255,255,0.6);
  transition: background 0.2s, color 0.2s;
}
.cart-close-btn:hover { background: rgba(255,255,255,0.12); color: #fff; }

.cart-body { flex: 1; overflow-y: auto; padding: 1.5rem 1.75rem; }

.cart-empty {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  height: 100%; text-align: center; gap: 1rem;
}
.cart-empty-icon {
  width: 64px; height: 64px; border-radius: 50%;
  background: rgba(47,107,255,0.1); border: 1px solid rgba(47,107,255,0.2);
  display: flex; align-items: center; justify-content: center;
  color: var(--blue);
}
.cart-empty p { font-size: 0.9rem; color: rgba(255,255,255,0.35); }

.cart-items { display: flex; flex-direction: column; gap: 1rem; }
.cart-item {
  display: flex; gap: 1rem; align-items: flex-start;
  padding: 1rem; background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06); border-radius: 10px;
}
.cart-item-img { width: 64px; height: 64px; border-radius: 8px; object-fit: cover; flex-shrink: 0; }
.cart-item-name { font-size: 0.875rem; font-weight: 700; color: #fff; line-height: 1.3; }
.cart-item-sub { font-size: 0.75rem; color: rgba(255,255,255,0.35); margin-top: 3px; }
.cart-item-price { font-size: 0.9rem; font-weight: 700; color: var(--blue-light); margin-top: 0.4rem; }
.cart-item-remove {
  margin-left: auto; padding: 4px; cursor: pointer;
  color: rgba(255,255,255,0.25); transition: color 0.2s; flex-shrink: 0;
}
.cart-item-remove:hover { color: #f43f5e; }

.cart-qty {
  display: flex; align-items: center; gap: 8px; margin-top: 0.5rem;
}
.qty-btn {
  width: 24px; height: 24px; border-radius: 5px;
  background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.12);
  display: flex; align-items: center; justify-content: center;
  color: rgba(255,255,255,0.7); cursor: pointer; font-size: 0.9rem;
  transition: background 0.2s;
}
.qty-btn:hover { background: rgba(255,255,255,0.15); }
.qty-num { font-size: 0.82rem; font-weight: 700; color: #fff; min-width: 16px; text-align: center; }

.cart-footer {
  padding: 1.5rem 1.75rem;
  border-top: 1px solid rgba(255,255,255,0.07);
  flex-shrink: 0;
}
.cart-subtotal {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 0.5rem;
}
.cart-subtotal-label { font-size: 0.8rem; color: rgba(255,255,255,0.4); }
.cart-subtotal-val { font-family: 'Outfit',sans-serif; font-size: 1.5rem; font-weight: 800; color: #fff; }
.cart-shipping-note { font-size: 0.75rem; color: rgba(255,255,255,0.28); margin-bottom: 1.25rem; }

.btn-checkout {
  width: 100%; padding: 0.95rem; background: var(--blue); color: #fff;
  border: none; border-radius: 10px; font-family: 'Inter', sans-serif;
  font-size: 0.9rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase;
  cursor: pointer; transition: background 0.2s, transform 0.15s;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  box-shadow: 0 4px 20px rgba(47,107,255,0.4);
}
.btn-checkout:hover { background: var(--blue-dark); transform: translateY(-1px); }

.btn-continue-shopping {
  width: 100%; margin-top: 0.75rem; padding: 0.7rem;
  background: transparent; color: rgba(255,255,255,0.45);
  border: 1.5px solid rgba(255,255,255,0.1); border-radius: 10px;
  font-family: 'Inter', sans-serif; font-size: 0.82rem; font-weight: 600;
  cursor: pointer; transition: border-color 0.2s, color 0.2s;
}
.btn-continue-shopping:hover { border-color: rgba(255,255,255,0.3); color: rgba(255,255,255,0.7); }

/* ───────── TOAST ───────── */
.toast {
  position: fixed; bottom: 2rem; left: 50%; transform: translateX(-50%) translateY(100px);
  z-index: 1100; background: #0a1828;
  border: 1px solid rgba(47,107,255,0.4);
  border-radius: 12px; padding: 1rem 1.5rem;
  display: flex; align-items: center; gap: 1rem;
  min-width: 340px; box-shadow: 0 16px 48px rgba(0,0,0,0.5);
  transition: transform 0.45s cubic-bezier(0.22,1,0.36,1), opacity 0.3s;
  opacity: 0;
}
.toast.show { transform: translateX(-50%) translateY(0); opacity: 1; }
.toast-img { width: 44px; height: 44px; border-radius: 8px; object-fit: cover; flex-shrink: 0; }
.toast-text { flex: 1; }
.toast-text strong { display: block; font-size: 0.875rem; font-weight: 700; color: #fff; }
.toast-text span { font-size: 0.78rem; color: rgba(255,255,255,0.45); }
.toast-cart-link {
  font-size: 0.78rem; font-weight: 700; color: var(--blue-light);
  text-decoration: none; white-space: nowrap;
  transition: color 0.2s;
}
.toast-cart-link:hover { color: #fff; }

/* ───────── FOOTER — store uses different structure ───────── */
footer {
  background: var(--navy-dark);
  border-top: 1px solid rgba(255,255,255,0.06);
  padding: 4rem 2.5rem 2rem;
}
.footer-top {
  max-width: var(--max-w); margin: 0 auto;
  display: grid; grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 3rem; padding-bottom: 3rem;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  margin-bottom: 0;
}
.footer-brand p { margin-top: 1rem; margin-bottom: 0; }
.footer-socials { margin-top: 1.5rem; }
.footer-bottom {
  max-width: var(--max-w); margin: 0 auto;
  border-top: 1px solid rgba(255,255,255,0.06); padding-top: 1.5rem;
  display: flex; align-items: center; justify-content: space-between;
}
.footer-bottom p { color: rgba(255,255,255,0.3); }
.footer-bottom-links a { color: rgba(255,255,255,0.3); }

/* ───────── RESPONSIVE ───────── */
@media (max-width: 1024px) {
  .product-grid { grid-template-columns: repeat(2, 1fr); }
  .store-hero-row { flex-direction: column; align-items: flex-start; gap: 1rem; }
  .footer-top { grid-template-columns: 1fr 1fr; }
  .product-grid.list-view .product-img-wrap { width: 200px; }
}

@media (max-width: 768px) {
  .store-hero-inner { padding: 2.5rem 1.5rem 2rem; }
  .products-section { padding: 2rem 1.5rem 3rem; }
  .filter-bar-inner { padding: 0 1.5rem; }
  .filter-chips { gap: 0.15rem; overflow-x: auto; }
  .sort-select { display: none; }
}

@media (max-width: 640px) {
  .product-grid, .product-grid.cols-2 { grid-template-columns: 1fr; }
  .cart-drawer { width: 100vw; }
  .product-grid.list-view { grid-template-columns: 1fr; }
  .product-grid.list-view .product-card { flex-direction: column; }
  .product-grid.list-view .product-img-wrap { width: 100%; height: 220px; }
  footer { padding: 3rem 1.5rem 1.5rem; }
  .footer-top { grid-template-columns: 1fr; }
}
