:root {
  --bg-primary: #ffffff;
  --bg-secondary: #f8f8f8;
  --text-main: #111111;
  --text-muted: #666666;
  --border-color: #e6e6e6;
  --brand-color: #000000;
  --accent-green: #16a34a;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Plus Jakarta Sans', sans-serif;
}

body {
  background-color: var(--bg-primary);
  color: var(--text-main);
  overflow-x: hidden;
}

/* --- Top Announcement Bar --- */
.announcement-bar {
  background-color: var(--brand-color);
  color: #ffffff;
  text-align: center;
  padding: 8px 16px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

/* --- Landing Loader --- */
.loader-overlay {
  position: fixed;
  inset: 0;
  background: var(--brand-color);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  transition: opacity 0.6s ease, visibility 0.6s;
}

.loader-content {
  text-align: center;
}

.loader-logo {
  color: #ffffff;
  font-size: 2.8rem;
  letter-spacing: 0.35em;
  font-weight: 800;
  margin-bottom: 20px;
  animation: pulseLogo 1.4s infinite ease-in-out;
}

.loader-bar {
  width: 180px;
  height: 2px;
  background: rgba(255, 255, 255, 0.2);
  margin: 0 auto;
  overflow: hidden;
}

.loader-progress {
  width: 100%;
  height: 100%;
  background: #ffffff;
  transform: translateX(-100%);
  animation: loadProgress 1.4s forwards cubic-bezier(0.65, 0, 0.35, 1);
}

@keyframes pulseLogo {
  0%, 100% { opacity: 0.75; }
  50% { opacity: 1; }
}

@keyframes loadProgress {
  to { transform: translateX(0); }
}

.loader-hidden {
  opacity: 0;
  visibility: hidden;
}

/* --- Navigation Header --- */
.navbar {
  position: sticky;
  top: 0;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border-color);
  z-index: 1000;
}

.nav-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 18px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.brand-logo {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: 0.2em;
  color: var(--brand-color);
  text-decoration: none;
}

.nav-links {
  display: flex;
  gap: 32px;
}

.nav-links a {
  text-decoration: none;
  color: var(--text-main);
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  transition: opacity 0.2s;
}

.nav-links a:hover {
  opacity: 0.6;
}

.cart-button {
  background: none;
  border: none;
  cursor: pointer;
  position: relative;
  display: flex;
  align-items: center;
  padding: 4px;
}

.cart-badge {
  position: absolute;
  top: -4px;
  right: -8px;
  background: var(--brand-color);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* --- Hero Slider --- */
.hero-slider {
  position: relative;
  height: 80vh;
  min-height: 550px;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background-color: #000;
}

.slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity 1s ease-in-out;
  z-index: 1;
}

.slide.active {
  opacity: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  color: #fff;
  padding: 0 24px;
  max-width: 760px;
}

.hero-subtitle {
  font-size: 0.8rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: #ccc;
  display: block;
  margin-bottom: 14px;
}

.hero-title {
  font-size: clamp(2rem, 5vw, 3.8rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin-bottom: 18px;
}

.hero-desc {
  color: #dddddd;
  font-size: 1.05rem;
  max-width: 520px;
  margin: 0 auto 32px;
}

.slider-dots {
  position: absolute;
  bottom: 24px;
  z-index: 2;
  display: flex;
  gap: 10px;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.4);
  transition: background 0.3s;
}

.dot.active {
  background: #ffffff;
}

.btn {
  display: inline-block;
  padding: 14px 28px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  cursor: pointer;
  border: none;
  transition: transform 0.2s, opacity 0.2s;
}

.btn:active {
  transform: scale(0.98);
}

.btn-primary {
  background: var(--brand-color);
  color: #fff;
}

.hero-slider .btn-primary {
  background: #ffffff;
  color: #000000;
}

.hero-slider .btn-primary:hover {
  opacity: 0.9;
}

.btn-full {
  width: 100%;
  text-align: center;
}

/* --- Search, Filter & Sort Bar --- */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-secondary);
  padding: 16px 24px;
  border-radius: var(--radius-md);
  margin-bottom: 36px;
  border: 1px solid var(--border-color);
}

.search-box {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #fff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  flex: 1;
  min-width: 240px;
}

.search-box input {
  border: none;
  outline: none;
  width: 100%;
  font-size: 0.9rem;
  color: var(--text-main);
}

.filter-pills {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.filter-pill {
  background: #fff;
  border: 1px solid var(--border-color);
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.filter-pill.active {
  background: var(--brand-color);
  color: #fff;
  border-color: var(--brand-color);
}

.sort-box {
  display: flex;
  align-items: center;
  gap: 8px;
}

.sort-box label {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-muted);
}

.sort-box select {
  padding: 10px 12px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  background: #fff;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  outline: none;
}

.no-results {
  text-align: center;
  padding: 48px 24px;
  color: var(--text-muted);
  font-size: 1.05rem;
}

.no-results.hidden {
  display: none;
}

/* --- Collection Sections --- */
.collection-section {
  max-width: 1400px;
  margin: 0 auto;
  padding: 72px 24px;
}

.collection-section.alt-bg {
  background-color: var(--bg-secondary);
  max-width: 100%;
  padding: 72px 24px;
}

.section-header {
  text-align: center;
  margin-bottom: 48px;
}

.section-header h2 {
  font-size: 1.8rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  margin-bottom: 8px;
}

.section-header p {
  color: var(--text-muted);
  font-size: 0.95rem;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 28px;
  max-width: 1400px;
  margin: 0 auto;
}

.product-card {
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: transform 0.3s ease;
  cursor: pointer;
}

.product-card:hover {
  transform: translateY(-4px);
}

.product-image-container {
  aspect-ratio: 4 / 5;
  background: var(--bg-secondary);
  position: relative;
  overflow: hidden;
}

.product-image-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.product-card:hover .product-image-container img {
  transform: scale(1.05);
}

.product-info {
  padding: 16px 4px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.product-title {
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--text-main);
}

.product-price {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 16px;
}

.add-to-cart-btn {
  margin-top: auto;
  background: #000;
  color: #fff;
  border: 1px solid #000;
  padding: 10px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.add-to-cart-btn:hover {
  background: #333;
}

/* --- Product Details Modal --- */
.product-modal-box {
  background: #fff;
  width: 100%;
  max-width: 850px;
  border-radius: var(--radius-lg);
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow);
  max-height: 90vh;
  overflow-y: auto;
}

.modal-corner-close {
  position: absolute;
  top: 16px;
  right: 20px;
  z-index: 10;
  background: #fff;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  display: flex;
  align-items: center;
  justify-content: center;
}

.product-modal-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
}

.modal-image-container {
  background: var(--bg-secondary);
  aspect-ratio: 4 / 5;
}

.modal-image-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.modal-info-container {
  padding: 32px 32px 32px 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.modal-brand-tag {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  color: var(--text-muted);
  margin-bottom: 8px;
}

#modal-product-title {
  font-size: 1.6rem;
  font-weight: 800;
  margin-bottom: 12px;
}

.modal-price {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 16px;
  color: var(--text-main);
}

.modal-description {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 24px;
}

.size-selector {
  margin-bottom: 24px;
}

.size-label-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.size-label-row label {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
}

.size-guide-link {
  background: none;
  border: none;
  color: var(--text-main);
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: underline;
  cursor: pointer;
}

.size-options {
  display: flex;
  gap: 10px;
}

.size-btn {
  width: 44px;
  height: 44px;
  border: 1px solid var(--border-color);
  background: #fff;
  border-radius: var(--radius-sm);
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.size-btn.active {
  background: var(--brand-color);
  color: #fff;
  border-color: var(--brand-color);
}

.product-perks {
  margin-top: 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* --- Size Guide Table Modal --- */
.size-guide-box {
  background: #fff;
  width: 100%;
  max-width: 480px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.size-guide-content {
  padding: 24px;
}

.size-guide-note {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.size-guide-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.size-guide-table th, .size-guide-table td {
  padding: 12px 10px;
  border-bottom: 1px solid var(--border-color);
  font-size: 0.9rem;
}

.size-guide-table th {
  background: var(--bg-secondary);
  font-weight: 700;
  color: var(--text-main);
}

/* --- Footer --- */
.footer {
  background: #0a0a0a;
  color: #fff;
  padding: 64px 24px 24px;
  margin-top: 64px;
}

.footer-container {
  max-width: 1400px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 40px;
  padding-bottom: 48px;
  border-bottom: 1px solid #222;
}

.footer-logo {
  font-size: 1.5rem;
  letter-spacing: 0.2em;
  margin-bottom: 12px;
}

.footer-text {
  color: #888;
  font-size: 0.9rem;
  line-height: 1.6;
}

.footer-col h4 {
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 16px;
  color: #ddd;
}

.footer-col p {
  color: #999;
  font-size: 0.9rem;
  margin-bottom: 8px;
  line-height: 1.5;
}

.footer-bottom {
  max-width: 1400px;
  margin: 24px auto 0;
  text-align: center;
  color: #666;
  font-size: 0.8rem;
}

/* --- Modals & Drawer --- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  z-index: 2000;
  display: flex;
  justify-content: flex-end;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s;
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.cart-drawer {
  background: #fff;
  width: 100%;
  max-width: 420px;
  height: 100vh;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-overlay.active .cart-drawer {
  transform: translateX(0);
}

.cart-header, .modal-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.close-btn {
  background: none;
  border: none;
  font-size: 1.6rem;
  cursor: pointer;
}

.cart-items {
  flex-grow: 1;
  overflow-y: auto;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.empty-cart {
  text-align: center;
  color: var(--text-muted);
  margin-top: 40px;
}

.cart-item {
  display: flex;
  gap: 16px;
  align-items: center;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 16px;
}

.cart-item-img {
  width: 64px;
  height: 80px;
  object-fit: cover;
  border-radius: 4px;
  background: var(--bg-secondary);
}

.cart-item-details {
  flex-grow: 1;
}

.cart-item-title {
  font-weight: 600;
  font-size: 0.9rem;
}

.cart-item-price {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-top: 4px;
}

.remove-btn {
  background: none;
  border: none;
  color: #dc2626;
  font-size: 0.8rem;
  cursor: pointer;
  margin-top: 6px;
}

.cart-footer {
  padding: 24px;
  border-top: 1px solid var(--border-color);
  background: #fff;
}

.cart-total {
  display: flex;
  justify-content: space-between;
  font-weight: 700;
  font-size: 1.1rem;
  margin-bottom: 16px;
}

/* --- Checkout & Success Modals --- */
#checkout-modal, #success-modal, #product-modal, #size-guide-modal {
  justify-content: center;
  align-items: center;
  padding: 20px;
}

.checkout-box, .success-box {
  background: #fff;
  width: 100%;
  max-width: 500px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
  max-height: 90vh;
  overflow-y: auto;
}

#checkout-form {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group label {
  font-size: 0.85rem;
  font-weight: 600;
}

.form-group input, .form-group textarea {
  padding: 12px 14px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.2s;
}

.form-group input:focus, .form-group textarea:focus {
  border-color: var(--brand-color);
}

.radio-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 4px;
}

.radio-label {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.9rem;
  cursor: pointer;
  padding: 12px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  transition: border-color 0.2s;
}

.radio-label:hover {
  border-color: #999;
}

.success-box {
  text-align: center;
  padding: 40px 32px;
}

.checkmark-circle {
  width: 72px;
  height: 72px;
  background: var(--accent-green);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
}

.checkmark {
  font-size: 2.2rem;
  font-weight: bold;
}

.success-subtitle {
  color: var(--text-muted);
  margin: 10px 0 24px;
}

.tracking-info {
  background: var(--bg-secondary);
  padding: 16px;
  border-radius: var(--radius-sm);
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 24px;
}

.tracking-info span {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.tracking-info strong {
  font-size: 1.25rem;
  letter-spacing: 0.1em;
  color: var(--text-main);
}

.success-note {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 24px;
}

/* =========================================================
   RESPONSIVE MEDIA QUERIES (MOBILE SPECIFIC EDITS)
   ========================================================= */

@media (max-width: 768px) {
  .nav-links {
    display: none;
  }
  .hero-title {
    font-size: 2.2rem;
  }
  .product-modal-content {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .modal-info-container {
    padding: 20px;
  }
  .footer-container {
    gap: 24px;
  }

  /* 2 items in one row on Tablet & Medium screens */
  .product-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
  }

  .filter-bar {
    flex-direction: column;
    align-items: stretch;
  }
}

/* Specific optimizations for mobile phones */
@media (max-width: 600px) {
  .collection-section,
  .collection-section.alt-bg {
    padding: 48px 12px;
  }

  .section-header {
    margin-bottom: 32px;
  }

  .section-header h2 {
    font-size: 1.4rem;
  }

  /* Force exactly 2 elements per row on mobile phones */
  .product-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  /* Make mobile cards shorter, sleeker, and well-proportioned */
  .product-info {
    padding: 10px 6px;
  }

  .product-title {
    font-size: 0.82rem;
    margin-bottom: 4px;
    line-height: 1.3;
    /* Limit to 2 lines so cards stay equal height */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .product-price {
    font-size: 0.88rem;
    margin-bottom: 10px;
  }

  /* Compact mobile button */
  .add-to-cart-btn {
    padding: 8px 6px;
    font-size: 0.78rem;
    letter-spacing: 0.03em;
  }
}