/* ============================================================
   City Pride Shop — shop.css
   Brand: Navy #10255A | Accent #c1ba00 | Cream #ffd148
   ============================================================ */

/* --- Custom Properties ------------------------------------ */
:root {
  --brand:       #10255A;
  --accent:      #c1ba00;
  --cream:       #ffd148;
  --product-bg:  #f5f5f0;
  --white:       #ffffff;
  --border:      #e5e5e5;
  --muted:       rgba(16,37,90,0.5);
  --font-body:   'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-display:'Playfair Display', Georgia, serif;
  --max-w:       1400px;
  --transition:  all 0.3s ease;
}

/* --- Reset ------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  color: var(--brand);
  background: var(--white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; }
a { color: inherit; }
button { font-family: inherit; }
ul { list-style: none; }

/* --- Typography ------------------------------------------- */
.font-display { font-family: var(--font-display); }

/* --- Announce Bar ----------------------------------------- */
.announce-bar {
  background: var(--brand);
  color: var(--white);
  text-align: center;
  padding: 10px 16px;
  font-size: 11px;
  letter-spacing: 0.1em;
  font-weight: 500;
}

/* --- Header ----------------------------------------------- */
.site-header {
  background: var(--white);
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--border);
}
.header-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
}
.header-logo-row {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  padding: 20px 0;
}
.header-logo {
  font-family: var(--font-display);
  font-size: 22px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--brand);
  text-decoration: none;
}
.header-icons {
  position: absolute;
  right: 0;
  display: flex;
  gap: 16px;
  align-items: center;
}
.mobile-menu-btn {
  display: none;
  position: absolute;
  left: 0;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--brand);
  padding: 4px;
}

/* Desktop Nav */
.header-nav {
  display: flex;
  gap: 40px;
  justify-content: center;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--border);
}
.nav-link {
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--brand);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 4px;
  transition: opacity 0.2s;
}
.nav-link:hover { opacity: 0.6; }

/* Dropdown */
.nav-dropdown-wrap {
  position: relative;
}
.nav-dropdown {
  display: none;
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  background: var(--white);
  border: 1px solid var(--border);
  min-width: 180px;
  padding: 8px 0;
  padding-top: 16px;
  z-index: 100;
  box-shadow: 0 8px 24px rgba(0,0,0,0.08);
}
.nav-dropdown-wrap:hover .nav-dropdown { display: block; }
.nav-dropdown-link {
  display: block;
  padding: 10px 20px;
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--brand);
  text-decoration: none;
  transition: background 0.15s;
}
.nav-dropdown-link:hover { background: var(--product-bg); }
.nav-dropdown-divider { border-top: 1px solid var(--border); margin: 4px 0; }
.nav-dropdown-sub { opacity: 0.7; }

/* Mobile Nav */
.mobile-nav { display: none; }
.mobile-nav.open {
  display: block;
  border-top: 1px solid var(--border);
}
.mobile-nav-link {
  display: block;
  padding: 14px 24px;
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--brand);
  text-decoration: none;
  border-bottom: 1px solid var(--border);
}
.mobile-nav-link:hover { background: var(--product-bg); }

/* Cart Badge */
#cart-count {
  display: none;
  position: absolute;
  top: -8px;
  right: -8px;
  background: var(--brand);
  color: white;
  font-size: 10px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  align-items: center;
  justify-content: center;
  font-weight: 600;
}
#cart-count.visible {
  display: flex;
}

/* --- Hero -------------------------------------------------- */
.hero {
  position: relative;
  height: 85vh;
  min-height: 600px;
  overflow: hidden;
  background: var(--brand);
}
.hero-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hero-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.2);
}
.hero-content {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-bottom: 80px;
  text-align: center;
  color: var(--white);
}
.hero-title {
  font-size: 56px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  margin-bottom: 32px;
  line-height: 1.1;
  text-shadow: 0 2px 20px rgba(0,0,0,0.3);
}
.hero-cta {
  border: 1px solid rgba(255,255,255,0.8);
  padding: 16px 48px;
  font-size: 11px;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--white);
  text-decoration: none;
  transition: var(--transition);
  backdrop-filter: blur(2px);
}
.hero-cta:hover {
  background: var(--white);
  color: var(--brand);
}

/* --- Category Grid ----------------------------------------- */
.cat-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
}
.cat-card {
  position: relative;
  aspect-ratio: 3/4;
  overflow: hidden;
  display: block;
  text-decoration: none;
}
.cat-card-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 700ms ease;
}
.cat-card:hover .cat-card-img { transform: scale(1.05); }
.cat-card-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.15);
  transition: background 0.3s;
}
.cat-card:hover .cat-card-overlay { background: rgba(0,0,0,0.25); }
.cat-card-content {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding-bottom: 64px;
  text-align: center;
  color: var(--white);
}
.cat-card-name {
  font-size: 32px;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  margin-bottom: 16px;
  text-shadow: 0 2px 12px rgba(0,0,0,0.3);
}
.cat-card-cta {
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  border-bottom: 1px solid rgba(255,255,255,0.6);
  padding-bottom: 2px;
}

/* --- Section ----------------------------------------------- */
.section {
  padding: 64px 0;
}
.section-title {
  font-size: 28px;
  letter-spacing: 0.2em;
  text-align: center;
  text-transform: uppercase;
  margin-bottom: 48px;
  color: var(--brand);
}

/* --- Product Grid ------------------------------------------ */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 24px;
}
.section .product-grid,
.section > .product-carousel-wrap > .product-grid {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
}

/* --- Product Card ------------------------------------------ */
.product-card {
  cursor: pointer;
  display: block;
  text-decoration: none;
  color: inherit;
}
.product-card-img {
  aspect-ratio: 1;
  background: var(--product-bg);
  overflow: hidden;
  position: relative;
  margin-bottom: 14px;
}
.product-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 700ms ease;
}
.product-card:hover .product-card-img img { transform: scale(1.05); }
.product-card-name {
  font-size: 14px;
  color: var(--brand);
  margin-bottom: 4px;
  font-weight: 400;
}
.product-card-price {
  font-size: 14px;
  color: var(--brand);
  font-weight: 500;
}
.product-card-compare {
  text-decoration: line-through;
  opacity: 0.4;
  margin-left: 8px;
  font-weight: 400;
}

/* Quick Add */
.quick-add-btn {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--brand);
  color: var(--white);
  padding: 12px;
  font-size: 11px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  border: none;
  cursor: pointer;
  transform: translateY(100%);
  transition: transform 0.3s ease;
  font-family: var(--font-body);
}
.product-card:hover .quick-add-btn { transform: translateY(0); }

/* Badges */
.badge-new,
.badge-sale {
  position: absolute;
  top: 8px;
  left: 8px;
  font-size: 9px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 4px 8px;
  border-radius: 2px;
  font-weight: 600;
  z-index: 1;
}
.badge-new  { background: var(--accent); color: var(--brand); }
.badge-sale { background: #c0392b; color: var(--white); }

/* --- Product Detail --------------------------------------- */
.product-detail {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 48px 24px;
}
.product-gallery { position: sticky; top: 90px; }
.product-gallery-main {
  aspect-ratio: 1;
  background: var(--product-bg);
  overflow: hidden;
  margin-bottom: 12px;
}
.product-gallery-main img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.product-thumbs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.product-thumb {
  width: 72px;
  aspect-ratio: 1;
  background: var(--product-bg);
  cursor: pointer;
  overflow: hidden;
  border: 2px solid transparent;
  transition: border-color 0.2s;
}
.product-thumb img { width: 100%; height: 100%; object-fit: cover; }
.product-thumb.active { border-color: var(--brand); }
.product-thumb:hover { border-color: rgba(16,37,90,0.4); }

.product-info {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.product-title {
  font-size: 32px;
  line-height: 1.3;
}
.product-price {
  font-size: 20px;
  font-weight: 500;
}
.product-description {
  color: var(--muted);
  line-height: 1.7;
  font-size: 14px;
}

/* Size selector */
.size-options { display: flex; flex-wrap: wrap; gap: 8px; }
.size-btn {
  border: 1px solid var(--border);
  padding: 8px 16px;
  font-size: 12px;
  cursor: pointer;
  background: none;
  transition: var(--transition);
  font-family: var(--font-body);
  color: var(--brand);
}
.size-btn.active,
.size-btn:hover {
  border-color: var(--brand);
  background: var(--brand);
  color: var(--white);
}

/* Color swatches */
.color-options { display: flex; gap: 8px; flex-wrap: wrap; }
.color-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  border: 2px solid transparent;
  transition: border-color 0.2s;
  outline: none;
}
.color-btn.active { border-color: var(--brand); box-shadow: 0 0 0 2px white, 0 0 0 4px var(--brand); }
.color-btn:hover  { border-color: var(--brand); }

/* Add to Cart */
.add-to-cart {
  width: 100%;
  background: var(--brand);
  color: var(--white);
  padding: 16px;
  font-size: 12px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  border: none;
  cursor: pointer;
  transition: background 0.2s;
  font-family: var(--font-body);
  font-weight: 500;
}
.add-to-cart:hover { background: #1a3570; }

/* --- Cart Drawer ------------------------------------------ */
.cart-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  z-index: 199;
  display: none;
  opacity: 0;
  transition: opacity 0.3s;
}
.cart-overlay.open {
  display: block;
  opacity: 1;
}
.cart-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 400px;
  background: var(--white);
  z-index: 200;
  transform: translateX(100%);
  transition: transform 0.3s ease;
  display: flex;
  flex-direction: column;
  box-shadow: -4px 0 24px rgba(0,0,0,0.1);
}
.cart-drawer.open { transform: translateX(0); }
.cart-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.cart-items-wrap {
  flex: 1;
  overflow-y: auto;
  padding: 0 24px;
}
.cart-item {
  display: flex;
  gap: 16px;
  padding: 20px 0;
  border-bottom: 1px solid var(--border);
}
.cart-item-img {
  width: 72px;
  height: 72px;
  object-fit: cover;
  background: var(--product-bg);
  flex-shrink: 0;
}
.cart-item-info { flex: 1; }
.cart-item-name { font-size: 14px; font-weight: 500; }
.cart-item-meta { font-size: 12px; opacity: 0.6; margin-top: 2px; }
.cart-item-price { font-size: 14px; font-weight: 500; }
.cart-qty {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 8px;
}
.qty-btn {
  width: 24px;
  height: 24px;
  border: 1px solid var(--border);
  background: none;
  cursor: pointer;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  color: var(--brand);
}
.qty-btn:hover { border-color: var(--brand); background: var(--brand); color: white; }
.cart-remove {
  font-size: 11px;
  opacity: 0.5;
  cursor: pointer;
  margin-left: auto;
  text-decoration: underline;
  background: none;
  border: none;
  color: var(--brand);
}
.cart-remove:hover { opacity: 1; }
.cart-footer {
  padding: 20px 24px;
  border-top: 1px solid var(--border);
  flex-shrink: 0;
}
.cart-total {
  display: flex;
  justify-content: space-between;
  margin-bottom: 16px;
  font-weight: 600;
  font-size: 15px;
}
.cart-empty {
  text-align: center;
  padding: 48px 0;
  opacity: 0.5;
  font-size: 14px;
}

/* --- Cart Page -------------------------------------------- */
.cart-page {
  max-width: 1100px;
  margin: 0 auto;
  padding: 48px 24px;
}
.cart-page-grid {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 48px;
}
.cart-summary-box {
  background: var(--product-bg);
  padding: 32px;
  height: fit-content;
  position: sticky;
  top: 90px;
}

/* --- Checkout --------------------------------------------- */
.checkout-page {
  max-width: 900px;
  margin: 0 auto;
  padding: 48px 24px;
}
.checkout-grid {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 48px;
}
.form-group { margin-bottom: 20px; }
.form-label {
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 6px;
  display: block;
  color: var(--brand);
  opacity: 0.7;
}
.form-input {
  width: 100%;
  border: 1px solid var(--border);
  padding: 12px 16px;
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s;
  font-family: var(--font-body);
  color: var(--brand);
  background: white;
}
.form-input:focus { border-color: var(--brand); }

/* --- Buttons ---------------------------------------------- */
.btn-primary {
  background: var(--brand);
  color: var(--white);
  padding: 14px 32px;
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  border: none;
  cursor: pointer;
  transition: background 0.2s;
  display: inline-block;
  text-decoration: none;
  font-family: var(--font-body);
  font-weight: 500;
}
.btn-primary:hover { background: #1a3570; }
.btn-outline {
  border: 1px solid var(--brand);
  background: transparent;
  color: var(--brand);
  padding: 14px 32px;
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  cursor: pointer;
  transition: var(--transition);
  display: inline-block;
  text-decoration: none;
  font-family: var(--font-body);
  font-weight: 500;
}
.btn-outline:hover { background: var(--brand); color: var(--white); }

/* --- Split Banner ------------------------------------------ */
.split-banner {
  display: grid;
  grid-template-columns: 1fr 1fr;
}
.split-panel {
  position: relative;
  overflow: hidden;
  min-height: 400px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.split-content {
  background: var(--brand);
  padding: 64px;
  text-align: center;
}
.split-content h2 {
  font-family: var(--font-display);
  font-size: 36px;
  color: var(--white);
  margin-bottom: 24px;
}
.split-content p {
  color: rgba(255,255,255,0.7);
  margin-bottom: 32px;
  font-size: 14px;
  line-height: 1.8;
}

/* --- Newsletter -------------------------------------------- */
.newsletter {
  background: var(--white);
}
.newsletter-inner {
  max-width: 480px;
  margin: 0 auto;
  text-align: center;
  padding: 0 24px;
}
.newsletter-form {
  display: flex;
  gap: 0;
}
.newsletter-input {
  flex: 1;
  border: 1px solid var(--border);
  border-right: none;
  padding: 16px 20px;
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s;
  font-family: var(--font-body);
  color: var(--brand);
  min-width: 0;
}
.newsletter-input:focus { border-color: var(--brand); }
.newsletter-btn {
  background: var(--brand);
  color: var(--white);
  padding: 0 24px;
  font-size: 11px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  border: none;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.2s;
  font-family: var(--font-body);
  font-weight: 500;
}
.newsletter-btn:hover { background: #1a3570; }

/* --- Footer ----------------------------------------------- */
.footer {
  background: var(--brand);
  color: var(--white);
  padding-top: 64px;
  padding-bottom: 32px;
}
.footer-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
}
.footer-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 48px;
}
.footer-brand {
  font-family: var(--font-display);
  font-size: 20px;
  letter-spacing: 0.3em;
}
.footer-title {
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  margin-bottom: 16px;
  opacity: 0.6;
}
.footer-links { list-style: none; }
.footer-link {
  font-size: 13px;
  opacity: 0.7;
  padding: 4px 0;
  display: block;
  color: var(--white);
  text-decoration: none;
  transition: opacity 0.2s;
}
.footer-link:hover { opacity: 1; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.15);
  margin-top: 48px;
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  opacity: 0.5;
  flex-wrap: wrap;
  gap: 8px;
}

/* --- Product detail section wrapper */
.product-carousel-wrap {
  overflow: visible;
}

/* --- Utility ---------------------------------------------- */
.text-center { text-align: center; }
.sr-only { position: absolute; width:1px; height:1px; overflow:hidden; clip:rect(0,0,0,0); }

/* ============================================================
   RESPONSIVE BREAKPOINTS
   ============================================================ */

/* --- Tablet: max 1024px ----------------------------------- */
@media (max-width: 1024px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 40px; }
  .cart-page-grid { grid-template-columns: 1fr; }
  .checkout-grid  { grid-template-columns: 1fr; }
  .product-detail { gap: 32px; }
  .cart-summary-box { position: static; }
}

/* --- Mobile: max 768px ------------------------------------ */
@media (max-width: 768px) {
  /* Header */
  .header-nav        { display: none; }
  .mobile-menu-btn   { display: flex; }
  .header-logo-row   { padding: 16px 0; }
  .header-logo       { font-size: 18px; }

  /* Hero */
  .hero              { height: 70vh; min-height: 480px; }
  .hero-title        { font-size: 36px; letter-spacing: 0.2em; }
  .hero-content      { padding-bottom: 56px; }

  /* Category grid */
  .cat-grid { grid-template-columns: 1fr; }
  .cat-card { aspect-ratio: 4/3; }

  /* Products */
  .product-grid { grid-template-columns: 1fr 1fr; gap: 16px; }
  .section      { padding: 48px 0; }
  .section-title { font-size: 22px; margin-bottom: 32px; }

  /* Product detail */
  .product-detail {
    grid-template-columns: 1fr;
    padding: 24px 16px;
    gap: 32px;
  }
  .product-gallery { position: static; }
  .product-title   { font-size: 24px; }

  /* Cart drawer */
  .cart-drawer { width: 90vw; }

  /* Split banner */
  .split-banner { grid-template-columns: 1fr; }
  .split-panel  { min-height: 320px; }
  .split-content { padding: 48px 32px; }
  .split-content h2 { font-size: 28px; }

  /* Footer */
  .footer-grid   { grid-template-columns: 1fr 1fr; gap: 32px; }
  .footer-bottom { flex-direction: column; gap: 4px; }

  /* Cart page */
  .cart-page { padding: 32px 16px; }
  .cart-page-grid { grid-template-columns: 1fr; }

  /* Checkout */
  .checkout-page { padding: 32px 16px; }
  .checkout-grid { grid-template-columns: 1fr; }

  /* Newsletter */
  .newsletter-form { flex-direction: column; }
  .newsletter-input { border-right: 1px solid var(--border); border-bottom: none; }
  .newsletter-btn   { padding: 16px 24px; }
}

/* --- Small Mobile: max 480px ------------------------------ */
@media (max-width: 480px) {
  .footer-grid  { grid-template-columns: 1fr; }
  .hero-title   { font-size: 28px; }
  .cat-card-name { font-size: 24px; }
  .product-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
  .hero-cta     { padding: 14px 32px; }
}
