/* DontRamp Shop — Adapted from movie-website-master */

* { margin: 0; box-sizing: border-box; }

:root {
  --green:  #e63946;
  --dark:   #151515;
  --darker: #0d0d0d;
  --card:   #1e1e1e;
  --border: #2a2a2a;
  --text:   #ffffff;
  --muted:  #aaaaaa;
}

body {
  font-family: "Roboto", sans-serif;
  background: var(--darker);
  color: var(--text);
}

/* ── Navbar ─────────────────────────────────────────────────────────────── */
.navbar {
  width: 100%;
  height: 55px;
  background: #000;
  position: sticky;
  top: 0;
  z-index: 200;
  border-bottom: 1px solid #1a1a1a;
}
.navbar-container {
  display: flex;
  align-items: center;
  padding: 0 24px;
  height: 100%;
  gap: 24px;
}
.logo-container { flex: 0 0 auto; }
.logo { font-family: "Sen", sans-serif; font-size: 26px; color: #fff; letter-spacing: 2px; }
.logo span { color: var(--green); }

.menu-container { flex: 1; overflow-x: auto; }
.menu-list { display: flex; list-style: none; gap: 8px; white-space: nowrap; }
.menu-list-item {
  padding: 6px 14px;
  border-radius: 20px;
  cursor: pointer;
  font-size: .85rem;
  color: var(--muted);
  transition: all .2s;
  user-select: none;
}
.menu-list-item:hover { color: #fff; }
.menu-list-item.active { background: var(--green); color: #000; font-weight: 700; }

.profile-container { display: flex; align-items: center; gap: 20px; margin-left: auto; }

.cart-icon-wrap {
  position: relative;
  cursor: pointer;
  font-size: 20px;
  color: #fff;
  transition: transform .2s;
}
.cart-icon-wrap:hover { transform: scale(1.1); }
.cart-count {
  position: absolute;
  top: -8px; right: -8px;
  background: var(--green);
  color: #000;
  font-size: .65rem;
  font-weight: 900;
  width: 18px; height: 18px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
}
.cart-bump { animation: bump .35s ease; }
@keyframes bump {
  0%,100% { transform: scale(1); }
  50%      { transform: scale(1.35); }
}

.toggle {
  width: 40px; height: 20px;
  background: #333;
  border-radius: 30px;
  display: flex; align-items: center; justify-content: space-around;
  position: relative; cursor: pointer;
}
.toggle-icon { color: goldenrod; font-size: 10px; }
.toggle-ball {
  width: 16px; height: 16px;
  background: #fff;
  position: absolute; right: 2px;
  border-radius: 50%;
  cursor: pointer;
  transition: all .3s;
}
.toggle-ball.active { transform: translateX(-20px); background: #333; }
.toggle.active { background: #eee; }

/* ── Sidebar ────────────────────────────────────────────────────────────── */
.sidebar {
  width: 50px;
  height: 100vh;
  background: #000;
  position: fixed;
  top: 0; left: 0;
  display: flex; flex-direction: column;
  align-items: center;
  padding-top: 80px;
  z-index: 100;
  border-right: 1px solid #1a1a1a;
}
.left-menu-icon {
  color: var(--muted);
  font-size: 18px;
  margin-bottom: 36px;
  cursor: pointer;
  transition: color .2s, transform .2s;
}
.left-menu-icon:hover { color: var(--green); transform: scale(1.15); }

/* ── Cart Drawer ────────────────────────────────────────────────────────── */
.cart-drawer {
  position: fixed;
  top: 0; right: -420px;
  width: 380px;
  max-width: 90vw;
  height: 100vh;
  background: #111;
  z-index: 1000;
  display: flex; flex-direction: column;
  transition: right .35s cubic-bezier(.4,0,.2,1);
  border-left: 1px solid var(--border);
}
.cart-drawer.open { right: 0; }
.cart-header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
  font-family: "Sen", sans-serif;
}
.cart-header i { cursor: pointer; font-size: 20px; color: var(--muted); }
.cart-header i:hover { color: #fff; }
.cart-items { flex: 1; overflow-y: auto; padding: 16px; }
.cart-empty { color: var(--muted); text-align: center; padding: 40px 0; }
.cart-item {
  display: flex; gap: 12px; align-items: flex-start;
  margin-bottom: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}
.cart-item img { width: 64px; height: 64px; object-fit: cover; border-radius: 8px; flex-shrink: 0; }
.cart-item-info { flex: 1; }
.ci-name { font-size: .9rem; font-weight: 600; margin-bottom: 2px; }
.ci-variant { font-size: .75rem; color: var(--muted); }
.ci-price { font-size: .8rem; color: var(--green); margin-top: 4px; }
.ci-remove { background: none; border: none; color: var(--muted); cursor: pointer; padding: 4px; }
.ci-remove:hover { color: #ff4444; }
.cart-footer { padding: 20px 24px; border-top: 1px solid var(--border); }
.cart-total { display: flex; justify-content: space-between; font-size: 1.1rem; font-weight: 700; margin-bottom: 16px; }
.btn-checkout {
  display: block; width: 100%;
  background: var(--green); color: #000;
  text-align: center; padding: 14px;
  border-radius: 8px; font-weight: 700;
  text-decoration: none; font-size: 1rem;
  transition: background .2s, transform .15s;
}
.btn-checkout:hover { background: #c0262f; transform: translateY(-1px); }

.cart-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.6);
  z-index: 999;
  display: none;
  backdrop-filter: blur(2px);
}
.cart-overlay.active { display: block; }

/* ── Main Container ─────────────────────────────────────────────────────── */
.container {
  background: var(--dark);
  min-height: 100vh;
}
.content-container { margin-left: 50px; }

/* ── Hero ───────────────────────────────────────────────────────────────── */
.featured-content {
  min-height: 55vh;
  padding: 60px 50px;
  background: linear-gradient(rgba(0,0,0,.55), rgba(0,0,0,.55)),
              url('https://pagez.co.uk/d-img/new-drmearch.jpeg') center/cover no-repeat;
  display: flex; flex-direction: column;
  justify-content: center;
  border-bottom: 2px solid var(--green);
}
.hero-badge {
  font-size: .75rem; font-weight: 800;
  letter-spacing: .2em; color: var(--green);
  margin-bottom: 12px; text-transform: uppercase;
}
.hero-title {
  font-family: "Sen", sans-serif;
  font-size: clamp(3rem, 8vw, 7rem);
  font-weight: 800;
  line-height: 1;
  margin-bottom: 16px;
}
.hero-title span { color: var(--green); }
.featured-desc { color: var(--muted); font-size: 1.1rem; margin-bottom: 28px; max-width: 500px; }
.hero-actions { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.featured-button {
  background: var(--green); color: #000;
  padding: 12px 28px; border-radius: 8px;
  border: none; font-weight: 800; font-size: .95rem;
  cursor: pointer; transition: all .2s;
  font-family: "Sen", sans-serif;
  letter-spacing: .05em;
}
.featured-button:hover { background: #c0262f; transform: translateY(-2px); }
.search-input {
  background: rgba(255,255,255,.08);
  border: 1px solid var(--border);
  color: #fff; padding: 12px 20px;
  border-radius: 8px; font-size: .9rem;
  width: 260px; transition: border .2s;
}
.search-input:focus { outline: none; border-color: var(--green); }
.search-input::placeholder { color: var(--muted); }

/* ── Shop Grid ──────────────────────────────────────────────────────────── */
.shop-section { padding: 40px 24px; }
.shop-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 28px; }
.movie-list-title {
  font-family: "Sen", sans-serif;
  font-size: 1.5rem; font-weight: 700;
  color: #fff;
}
.sort-select {
  background: var(--card); color: #fff;
  border: 1px solid var(--border); padding: 8px 14px;
  border-radius: 6px; font-size: .85rem; cursor: pointer;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 20px;
}

.product-card {
  background: var(--card);
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  transition: transform .25s, box-shadow .25s;
  border: 1px solid var(--border);
}
.product-card:hover { transform: translateY(-6px); box-shadow: 0 16px 40px rgba(0,0,0,.5); }

.card-img-wrap {
  position: relative;
  height: 220px;
  overflow: hidden;
  background: url('https://pagez.co.uk/d-img/new-drmearch.jpeg') center/cover no-repeat;
}
.card-img-wrap img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .4s;
}
.product-card:hover .card-img-wrap img { transform: scale(1.05); }

.card-overlay {
  position: absolute; inset: 0;
  background: rgba(0,0,0,.65);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 10px;
  opacity: 0;
  transition: opacity .3s;
}
.product-card:hover .card-overlay { opacity: 1; }

.card-view-btn, .card-add-btn {
  padding: 9px 20px; border-radius: 6px;
  font-weight: 700; font-size: .82rem;
  cursor: pointer; border: none; transition: all .15s;
  width: 140px;
}
.card-view-btn { background: #fff; color: #000; }
.card-view-btn:hover { background: #ddd; }
.card-add-btn { background: var(--green); color: #000; }
.card-add-btn:hover { background: #c0262f; }

.card-info { padding: 14px 16px; }
.card-name { font-size: .9rem; font-weight: 600; margin-bottom: 6px; }
.card-price { color: var(--green); font-size: .85rem; font-weight: 700; }

.loading-spinner {
  grid-column: 1/-1;
  text-align: center; padding: 80px 0;
  color: var(--muted); font-size: 2rem;
}
.loading-spinner p { font-size: 1rem; margin-top: 12px; }
.error-msg { color: #ff4444; grid-column: 1/-1; text-align: center; padding: 40px; }
.no-products { color: var(--muted); grid-column: 1/-1; text-align: center; padding: 60px; }

/* ── Product Modal ──────────────────────────────────────────────────────── */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.85);
  z-index: 2000;
  display: none;
  align-items: center; justify-content: center;
  backdrop-filter: blur(4px);
}
.modal-overlay.active { display: flex; }
.product-modal {
  background: #1a1a1a;
  border-radius: 16px;
  max-width: 860px; width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  border: 1px solid var(--border);
}
.modal-close {
  position: absolute; top: 16px; right: 16px;
  background: rgba(255,255,255,.1); border: none;
  color: #fff; width: 34px; height: 34px;
  border-radius: 50%; cursor: pointer;
  font-size: 14px; z-index: 1;
  transition: background .2s;
}
.modal-close:hover { background: rgba(255,255,255,.2); }
.modal-img-col { padding: 24px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; }
.modal-main-img { width: 100%; border-radius: 10px; object-fit: contain; max-height: 320px; }

.modal-thumbs {
  display: flex; gap: 8px; flex-wrap: wrap; justify-content: center;
}
.modal-thumb {
  width: 58px; height: 58px;
  object-fit: cover; border-radius: 6px; cursor: pointer;
  border: 2px solid transparent; opacity: 0.55;
  transition: opacity .15s, border-color .15s;
}
.modal-thumb:hover { opacity: 0.85; }
.modal-thumb.active { border-color: var(--green); opacity: 1; }
.modal-detail-col { padding: 32px 28px; display: flex; flex-direction: column; gap: 18px; }
.modal-title { font-family: "Sen", sans-serif; font-size: 1.4rem; font-weight: 800; }
.modal-price { font-size: 1.6rem; font-weight: 900; color: var(--green); }
.modal-loading { padding: 80px; text-align: center; color: var(--muted); font-size: 2rem; grid-column: 1/-1; }

.option-group label { display: block; font-size: .75rem; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; margin-bottom: 8px; }
.option-btns { display: flex; flex-wrap: wrap; gap: 8px; }
.opt-btn {
  padding: 7px 14px; border-radius: 6px;
  border: 1px solid var(--border);
  background: transparent; color: var(--muted);
  cursor: pointer; font-size: .82rem; transition: all .15s;
}
.opt-btn:hover { border-color: var(--green); color: #fff; }
.opt-btn.active { background: var(--green); color: #000; border-color: var(--green); font-weight: 700; }

.qty-row { display: flex; align-items: center; gap: 14px; }
.qty-row label { font-size: .75rem; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }
.qty-ctrl { display: flex; align-items: center; gap: 12px; }
.qty-ctrl button {
  width: 30px; height: 30px; border-radius: 50%;
  border: 1px solid var(--border);
  background: transparent; color: #fff;
  font-size: 1.1rem; cursor: pointer; transition: all .15s;
}
.qty-ctrl button:hover { border-color: var(--green); color: var(--green); }
.qty-ctrl span { font-size: 1.1rem; font-weight: 700; min-width: 20px; text-align: center; }

.btn-add-to-cart {
  background: var(--green); color: #000;
  padding: 14px; border-radius: 8px;
  border: none; font-weight: 800; font-size: 1rem;
  cursor: pointer; transition: all .2s;
  display: flex; align-items: center; justify-content: center; gap: 8px;
}
.btn-add-to-cart:hover { background: #c0262f; transform: translateY(-1px); }
.modal-note { font-size: .75rem; color: var(--muted); }

/* ── Checkout ───────────────────────────────────────────────────────────── */
.checkout-page { background: var(--darker); }
.checkout-container {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 40px;
  max-width: 1000px;
  margin: 40px auto;
  padding: 0 24px;
}
.checkout-form-wrap { background: var(--card); border-radius: 12px; padding: 32px; border: 1px solid var(--border); }
.checkout-form-wrap h2, .order-summary h2 {
  font-family: "Sen", sans-serif; font-size: 1.3rem;
  margin-bottom: 24px;
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-group { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.form-group label { font-size: .75rem; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }
.form-group input, .form-group select {
  background: #111; border: 1px solid var(--border);
  color: #fff; padding: 11px 14px;
  border-radius: 6px; font-size: .9rem; transition: border .2s;
}
.form-group input:focus, .form-group select:focus { outline: none; border-color: var(--green); }

.btn-calc-shipping {
  background: transparent; color: var(--green);
  border: 2px solid var(--green);
  padding: 12px 24px; border-radius: 8px;
  font-weight: 700; cursor: pointer; transition: all .2s;
  display: flex; align-items: center; gap: 8px; font-size: .9rem;
  margin-top: 8px;
}
.btn-calc-shipping:hover { background: var(--green); color: #000; }

.rate-option {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 16px; border-radius: 8px;
  border: 1px solid var(--border);
  cursor: pointer; margin-bottom: 8px; transition: border .2s;
}
.rate-option.selected { border-color: var(--green); }
.rate-name { flex: 1; font-weight: 600; }
.rate-price { color: var(--green); font-weight: 700; }
.rate-time { font-size: .75rem; color: var(--muted); }
.rate-option input { accent-color: var(--green); }

.order-summary { background: var(--card); border-radius: 12px; padding: 28px; border: 1px solid var(--border); height: fit-content; position: sticky; top: 70px; }
.summary-item { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 16px; padding-bottom: 16px; border-bottom: 1px solid var(--border); }
.summary-item img { width: 56px; height: 56px; object-fit: cover; border-radius: 6px; }
.summary-item p { font-size: .85rem; color: var(--muted); margin-top: 2px; }
.summary-line { display: flex; justify-content: space-between; padding: 8px 0; color: var(--muted); font-size: .9rem; }
.summary-line.total { color: #fff; font-weight: 700; font-size: 1.1rem; border-top: 1px solid var(--border); margin-top: 8px; padding-top: 16px; }

.checkout-steps { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: .85rem; }
.step.active { color: var(--green); font-weight: 700; }
.checkout-msg {
  margin-top: 16px; padding: 12px 16px;
  border-radius: 6px; font-size: .85rem;
}
.checkout-msg.error { background: rgba(255,68,68,.15); color: #ff4444; }
.checkout-msg.info  { background: rgba(77,191,0,.1); color: var(--green); }

/* ── Success ────────────────────────────────────────────────────────────── */
.success-page { display: flex; align-items: center; justify-content: center; min-height: calc(100vh - 55px); padding: 40px 24px; }
.success-card { background: var(--card); border-radius: 16px; padding: 48px; text-align: center; max-width: 480px; border: 1px solid var(--border); }
.success-icon { font-size: 4rem; color: var(--green); margin-bottom: 20px; }
.success-card h1 { font-family: "Sen", sans-serif; font-size: 2rem; margin-bottom: 16px; }
.success-card p { color: var(--muted); line-height: 1.7; }
.order-details { margin-top: 20px; color: var(--green); font-size: .9rem; }

/* ── Footer ─────────────────────────────────────────────────────────────── */
.site-footer {
  background: #000;
  border-top: 1px solid var(--border);
  padding: 48px 24px;
  margin-left: 50px;
  text-align: center;
}
.footer-inner { max-width: 600px; margin: 0 auto; }
.footer-inner .logo { font-size: 2rem; margin-bottom: 8px; }
.footer-inner > p { color: var(--muted); margin-bottom: 20px; font-size: .85rem; }
.footer-links { display: flex; gap: 24px; justify-content: center; margin-bottom: 24px; flex-wrap: wrap; }
.footer-links a { color: var(--muted); font-size: .85rem; text-decoration: none; transition: color .2s; }
.footer-links a:hover { color: var(--green); }
.footer-copy { color: #444; font-size: .75rem; }

/* ── Light Mode ─────────────────────────────────────────────────────────── */
.container.active { background: #f5f5f5; color: #111; }
.navbar-container.active { background: #fff; color: #111; }
.sidebar.active { background: #fff; border-right-color: #ddd; }
.sidebar.active .left-menu-icon { color: #555; }
.toggle.active { background: #ddd; }

/* ── Responsive ─────────────────────────────────────────────────────────── */
@media (max-width: 900px) {
  .menu-container { display: none; }
  .product-modal { grid-template-columns: 1fr; }
  .checkout-container { grid-template-columns: 1fr; }
  .order-summary { position: static; }
}

@media (max-width: 600px) {
  .content-container { margin-left: 0; }
  .sidebar { display: none; }
  .featured-content { padding: 40px 20px; }
  .shop-section { padding: 24px 16px; }
  .product-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }
  .card-img-wrap { height: 170px; }
  .site-footer { margin-left: 0; }
  .form-row { grid-template-columns: 1fr; }
  .cart-drawer { width: 100%; right: -100%; }
}
