/* ===== District Clothes - Main Stylesheet ===== */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;500;600;700&family=Poppins:wght@300;400;500;600;700&display=swap');

/* ===== CSS Variables ===== */
:root {
  --background: #ffffff;
  --foreground: #262626;
  --primary: #d4577a;
  --primary-foreground: #ffffff;
  --secondary: #f7f3f0;
  --muted: #f2eeeb;
  --muted-foreground: #737373;
  --accent: #d4a844;
  --border: #e8e2dc;
  --card: #ffffff;
  --destructive: #e53e3e;
  --blush: #faf5f3;
  --gold: #c8962e;
  --gold-light: #d4a844;
  --radius: 0.5rem;
  --font-display: 'Playfair Display', serif;
  --font-body: 'Poppins', sans-serif;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
  --shadow-md: 0 4px 14px rgba(0,0,0,0.08);
  --shadow-lg: 0 20px 40px -12px rgba(0,0,0,0.12);
  --shadow-primary: 0 8px 25px -8px rgba(212,87,122,0.3);
}

/* ===== Reset & Base ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  color: var(--foreground);
  background: var(--background);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4, h5, h6 { font-family: var(--font-display); line-height: 1.2; }
a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }
ul { list-style: none; }
input, textarea { font-family: inherit; }

/* ===== Utility Classes ===== */
.container { max-width: 1200px; margin: 0 auto; padding: 0 1rem; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }

/* ===== Buttons ===== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  padding: 0.625rem 1.5rem; border-radius: var(--radius); font-size: 0.875rem;
  font-weight: 500; transition: all 0.3s ease; white-space: nowrap;
}
.btn:active { transform: scale(0.95); }
.btn-primary {
  background: var(--primary); color: var(--primary-foreground);
}
.btn-primary:hover { opacity: 0.9; transform: translateY(-2px); box-shadow: var(--shadow-primary); }
.btn-outline {
  border: 1px solid var(--border); background: transparent; color: var(--foreground);
}
.btn-outline:hover { background: var(--muted); transform: translateY(-2px); }
.btn-hero-outline {
  border: 1px solid rgba(255,255,255,0.3); background: rgba(255,255,255,0.1);
  color: #fff;
}
.btn-hero-outline:hover { background: rgba(255,255,255,0.2); transform: translateY(-2px); }
.btn-ghost { background: transparent; color: var(--muted-foreground); padding: 0.5rem; }
.btn-ghost:hover { background: var(--muted); color: var(--foreground); }
.btn-sm { padding: 0.5rem 1rem; font-size: 0.8rem; }
.btn-lg { padding: 0.75rem 2rem; font-size: 1rem; }
.btn-icon { width: 2.5rem; height: 2.5rem; padding: 0; border-radius: var(--radius); }
.btn-icon:hover { transform: scale(1.1); }
.btn-icon:active { transform: scale(0.95); }

/* ===== Header ===== */
.header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,0.95); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border); transition: box-shadow 0.3s;
}
.header.scrolled { box-shadow: var(--shadow-sm); }
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 4rem;
}
.logo {
  display: flex; align-items: center; gap: 0.5rem;
  font-family: var(--font-display); font-size: 1.25rem; font-weight: 700;
}
.logo svg { color: var(--primary); transition: transform 0.3s; }
.logo:hover svg { transform: rotate(12deg) scale(1.1); }
.logo:hover { color: var(--primary); }

.nav-desktop { display: flex; align-items: center; gap: 1.5rem; }
.nav-link {
  font-size: 0.875rem; font-weight: 500; color: var(--muted-foreground);
  position: relative; transition: color 0.2s;
}
.nav-link::after {
  content: ''; position: absolute; bottom: -4px; left: 0; width: 100%;
  height: 2px; background: var(--primary); transform: scaleX(0);
  transform-origin: right; transition: transform 0.3s;
}
.nav-link:hover { color: var(--primary); }
.nav-link:hover::after { transform: scaleX(1); transform-origin: left; }

.header-actions { display: flex; align-items: center; gap: 0.5rem; }
.cart-btn { position: relative; }
.cart-count {
  position: absolute; top: -4px; right: -4px; width: 1.25rem; height: 1.25rem;
  border-radius: 50%; background: var(--primary); color: #fff; font-size: 0.7rem;
  display: flex; align-items: center; justify-content: center; font-weight: 600;
  animation: scaleIn 0.3s ease;
}
.search-input {
  height: 2.25rem; width: 10rem; border: 1px solid var(--border); border-radius: var(--radius);
  padding: 0 0.75rem; font-size: 0.875rem; outline: none; transition: box-shadow 0.2s;
}
.search-input:focus { box-shadow: 0 0 0 2px rgba(212,87,122,0.2); }

.hamburger { display: none; }
.mobile-menu { display: none; }

/* ===== Hero ===== */
.hero {
  position: relative; min-height: 80vh; display: flex; align-items: center;
  overflow: hidden; background: linear-gradient(135deg, #2d2d2d, #1a1a1a);
}
.hero-bg {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
}
.hero-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to right, rgba(0,0,0,0.7), rgba(0,0,0,0.4), transparent);
}
.hero-content { position: relative; z-index: 1; max-width: 540px; }
.hero h1 {
  font-size: clamp(2rem, 5vw, 3.5rem); font-weight: 700; color: #fff;
  margin-bottom: 1rem; animation: fadeUp 0.6s ease forwards;
}
.hero p {
  font-size: 1.125rem; color: rgba(255,255,255,0.8); margin-bottom: 1.5rem;
  animation: fadeUp 0.6s ease 0.2s both;
}
.hero-buttons { display: flex; gap: 1rem; animation: fadeUp 0.6s ease 0.4s both; }

/* ===== Category Section ===== */
.categories-section { padding: 4rem 0; background: var(--blush); }
.section-title {
  font-size: 1.875rem; font-weight: 700; text-align: center; margin-bottom: 2.5rem;
}
.categories-grid {
  display: grid; grid-template-columns: repeat(5, 1fr); gap: 1rem;
}
.category-card {
  position: relative; aspect-ratio: 3/4; border-radius: var(--radius);
  overflow: hidden; cursor: pointer; transition: all 0.3s ease;
}
.category-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.category-card img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.7s ease;
}
.category-card:hover img { transform: scale(1.1); }
.category-card .overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.6), transparent);
}
.category-card h3 {
  position: absolute; bottom: 1rem; left: 1rem;
  color: #fff; font-size: 1.125rem; font-weight: 600;
}

/* ===== Products Grid ===== */
.products-section { padding: 4rem 0; }
.products-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem;
}
.product-card {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden; transition: all 0.3s ease; position: relative;
}
.product-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.product-card .image-wrap {
  aspect-ratio: 3/4; overflow: hidden; background: var(--muted); position: relative;
}
.product-card img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.7s ease;
}
.product-card:hover img { transform: scale(1.1); }
.product-card .hover-actions {
  position: absolute; top: 0.75rem; right: 0.75rem;
  display: flex; flex-direction: column; gap: 0.5rem;
  opacity: 0; transform: translateX(1rem);
  transition: all 0.3s ease;
}
.product-card:hover .hover-actions { opacity: 1; transform: translateX(0); }
.hover-action-btn {
  width: 2.25rem; height: 2.25rem; border-radius: 50%;
  background: rgba(255,255,255,0.9); backdrop-filter: blur(4px);
  box-shadow: var(--shadow-md); display: flex; align-items: center; justify-content: center;
  color: var(--muted-foreground); transition: all 0.3s;
}
.hover-action-btn:hover { transform: scale(1.1); color: var(--primary); }
.hover-action-btn.wishlisted { color: var(--primary); }
.hover-action-btn.wishlisted svg { fill: var(--primary); }

.product-card .info { padding: 1rem; }
.product-card .category-label {
  font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.1em;
  color: var(--muted-foreground); font-weight: 500;
}
.product-card .product-name {
  font-family: var(--font-display); font-weight: 600; margin: 0.25rem 0;
}
.product-card .price {
  color: var(--primary); font-weight: 700; font-size: 1.125rem;
}

/* Size Selector */
.sizes { display: flex; gap: 0.5rem; margin: 0.75rem 0; }
.size-btn {
  width: 2rem; height: 2rem; border-radius: var(--radius); border: 1px solid var(--border);
  font-size: 0.75rem; font-weight: 500; color: var(--muted-foreground);
  transition: all 0.2s; display: flex; align-items: center; justify-content: center;
}
.size-btn:hover { border-color: var(--primary); transform: scale(1.05); }
.size-btn:active { transform: scale(0.9); }
.size-btn.active {
  background: var(--primary); color: #fff; border-color: var(--primary); transform: scale(1.05);
}

/* Quantity */
.quantity-wrap { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 0.75rem; }
.qty-btn {
  width: 2rem; height: 2rem; border-radius: var(--radius); border: 1px solid var(--border);
  color: var(--muted-foreground); transition: all 0.2s;
  display: flex; align-items: center; justify-content: center;
}
.qty-btn:hover { background: var(--muted); }
.qty-btn:active { transform: scale(0.9); }
.qty-val { font-size: 0.875rem; font-weight: 500; width: 1.5rem; text-align: center; }

.add-cart-btn {
  width: 100%; padding: 0.625rem; border-radius: var(--radius);
  background: var(--primary); color: #fff; font-size: 0.875rem; font-weight: 500;
  transition: all 0.3s; display: flex; align-items: center; justify-content: center; gap: 0.5rem;
}
.add-cart-btn:hover { opacity: 0.9; transform: translateY(-2px); box-shadow: var(--shadow-primary); }
.add-cart-btn:active { transform: scale(0.95); }
.add-cart-btn.added { background: #38a169; }

/* ===== Filter Chips ===== */
.filter-chips { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 2rem; }
.chip {
  padding: 0.5rem 1rem; border-radius: 2rem; font-size: 0.875rem; font-weight: 500;
  background: var(--muted); color: var(--muted-foreground); transition: all 0.2s; cursor: pointer;
}
.chip:hover { background: var(--blush); }
.chip.active { background: var(--primary); color: #fff; }

/* ===== Cart Page ===== */
.cart-layout { display: grid; grid-template-columns: 2fr 1fr; gap: 2rem; }
.cart-item {
  display: flex; gap: 1rem; padding: 1rem; background: var(--card);
  border: 1px solid var(--border); border-radius: var(--radius); transition: all 0.2s;
}
.cart-item:hover { box-shadow: var(--shadow-sm); }
.cart-item img { width: 5rem; height: 6rem; object-fit: cover; border-radius: var(--radius); }
.cart-item .item-info { flex: 1; }
.cart-item .item-name { font-family: var(--font-display); font-weight: 600; }
.cart-item .item-size { font-size: 0.875rem; color: var(--muted-foreground); }
.cart-item .item-price { color: var(--primary); font-weight: 700; }
.cart-item .item-total { text-align: right; font-weight: 700; }
.remove-btn { color: var(--destructive); transition: all 0.2s; margin-left: auto; }
.remove-btn:hover { opacity: 0.8; }

.cart-summary {
  background: var(--blush); border-radius: var(--radius); padding: 1.5rem;
  height: fit-content; position: sticky; top: 5rem;
}
.cart-summary h3 { font-family: var(--font-display); font-weight: 600; font-size: 1.125rem; margin-bottom: 1rem; }
.summary-row { display: flex; justify-content: space-between; font-size: 0.875rem; margin-bottom: 0.5rem; }
.summary-total {
  display: flex; justify-content: space-between; border-top: 1px solid var(--border);
  padding-top: 1rem; margin-top: 1rem;
}
.summary-total span:first-child { font-family: var(--font-display); font-weight: 700; }
.summary-total span:last-child { color: var(--primary); font-weight: 700; font-size: 1.125rem; }

/* ===== Checkout ===== */
.checkout-form { max-width: 40rem; margin: 0 auto; }
.form-group { margin-bottom: 1rem; }
.form-group label { display: block; font-size: 0.875rem; font-weight: 500; margin-bottom: 0.25rem; }
.form-group input, .form-group textarea {
  width: 100%; height: 2.5rem; border: 1px solid var(--border); border-radius: var(--radius);
  padding: 0 0.75rem; font-size: 0.875rem; outline: none; transition: box-shadow 0.2s;
}
.form-group textarea { height: 8rem; padding: 0.75rem; resize: none; }
.form-group input:focus, .form-group textarea:focus {
  box-shadow: 0 0 0 2px rgba(212,87,122,0.2);
}
.payment-box {
  background: var(--blush); border-radius: var(--radius); padding: 1rem; margin: 1rem 0;
}
.payment-box h3 { font-family: var(--font-display); font-weight: 600; margin-bottom: 0.75rem; }
.radio-label { display: flex; align-items: center; gap: 0.75rem; cursor: pointer; font-size: 0.875rem; }
.radio-label input { accent-color: var(--primary); }
.order-total-bar {
  background: var(--muted); border-radius: var(--radius); padding: 1rem;
  display: flex; justify-content: space-between; align-items: center; margin: 1rem 0;
}
.spinner {
  width: 1rem; height: 1rem; border: 2px solid rgba(255,255,255,0.3);
  border-top-color: #fff; border-radius: 50%; animation: spin 0.6s linear infinite;
}

/* ===== Success Page ===== */
.success-page {
  display: flex; align-items: center; justify-content: center;
  min-height: 60vh; text-align: center;
}
.success-content { animation: fadeUp 0.6s ease; max-width: 28rem; }
.success-icon { font-size: 5rem; color: #38a169; margin-bottom: 1rem; }
.success-content h1 { margin-bottom: 1rem; }
.success-content p { color: var(--muted-foreground); margin-bottom: 1.5rem; }
.success-buttons { display: flex; gap: 0.75rem; justify-content: center; flex-wrap: wrap; }

/* ===== Contact Page ===== */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2.5rem; }
.contact-info h3 { font-family: var(--font-display); font-weight: 600; margin-bottom: 0.5rem; }
.contact-info p { font-size: 0.875rem; color: var(--muted-foreground); margin-bottom: 1.5rem; }

/* ===== About Page ===== */
.about-icon { display: flex; justify-content: center; margin-bottom: 1rem; }
.about-icon svg { width: 3rem; height: 3rem; color: var(--primary); }
.prose { color: var(--muted-foreground); line-height: 1.8; }
.prose h2 { color: var(--foreground); margin-top: 2.5rem; margin-bottom: 0.75rem; }
.prose ul { margin-top: 0.5rem; }
.prose li { margin-bottom: 0.5rem; }

/* ===== Legal Pages ===== */
.legal-content { max-width: 48rem; }
.legal-content h2 {
  font-family: var(--font-display); font-weight: 600; font-size: 1.125rem;
  margin: 1.5rem 0 0.5rem; color: var(--foreground);
}
.legal-content p { font-size: 0.875rem; color: var(--muted-foreground); line-height: 1.8; margin-bottom: 1rem; }

/* ===== Footer ===== */
.footer { background: var(--foreground); color: rgba(255,255,255,0.7); }
.footer-inner { padding: 3rem 0; }
.footer-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 2rem;
}
.footer h4 { color: #fff; font-family: var(--font-display); font-weight: 600; margin-bottom: 0.75rem; }
.footer p { font-size: 0.875rem; line-height: 1.6; }
.footer a { transition: all 0.2s; }
.footer a:hover { color: var(--primary); transform: translateX(2px); display: inline-block; }
.footer ul li { margin-bottom: 0.5rem; font-size: 0.875rem; }
.footer .social-links { display: flex; gap: 0.75rem; margin-top: 1rem; }
.footer .social-icon {
  width: 2.25rem; height: 2.25rem; border-radius: 50%;
  background: rgba(255,255,255,0.1); display: flex; align-items: center; justify-content: center;
  transition: all 0.3s;
}
.footer .social-icon:hover { background: var(--primary); transform: scale(1.1); }
.footer .social-icon:active { transform: scale(0.95); }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1); padding: 1.5rem 0;
  text-align: center; font-size: 0.75rem; color: rgba(255,255,255,0.4);
}
.footer .contact-btn {
  margin-top: 1rem; padding: 0.5rem 1rem; border-radius: var(--radius);
  background: var(--primary); color: #fff; font-size: 0.8rem; font-weight: 500;
  transition: all 0.3s;
}
.footer .contact-btn:hover { opacity: 0.9; transform: translateY(-2px); box-shadow: var(--shadow-primary); }

/* ===== Quick View Modal ===== */
.modal-overlay {
  position: fixed; inset: 0; z-index: 100; display: flex; align-items: center;
  justify-content: center; padding: 1rem; display: none;
}
.modal-overlay.active { display: flex; }
.modal-backdrop {
  position: absolute; inset: 0; background: rgba(0,0,0,0.5); backdrop-filter: blur(4px);
  animation: fadeIn 0.2s ease;
}
.modal-content {
  position: relative; background: var(--card); border-radius: 0.75rem;
  box-shadow: 0 25px 50px -12px rgba(0,0,0,0.25);
  max-width: 42rem; width: 100%; display: grid; grid-template-columns: 1fr 1fr;
  overflow: hidden; animation: scaleIn 0.3s ease;
}
.modal-content img { width: 100%; height: 100%; object-fit: cover; }
.modal-info { padding: 1.5rem; }
.modal-info h2 { font-family: var(--font-display); font-size: 1.5rem; font-weight: 700; }
.modal-info .price { color: var(--primary); font-size: 1.5rem; font-weight: 700; margin: 0.5rem 0; }
.modal-close { width: 100%; text-align: center; font-size: 0.875rem; color: var(--muted-foreground); margin-top: 0.75rem; cursor: pointer; transition: color 0.2s; }
.modal-close:hover { color: var(--foreground); }

/* ===== Toast ===== */
.toast {
  position: fixed; bottom: 1.5rem; right: 1.5rem; z-index: 200;
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 1rem 1.5rem; box-shadow: var(--shadow-lg);
  transform: translateY(100px); opacity: 0; transition: all 0.3s ease;
  max-width: 20rem;
}
.toast.show { transform: translateY(0); opacity: 1; }
.toast h4 { font-family: var(--font-display); font-size: 0.875rem; font-weight: 600; }
.toast p { font-size: 0.8rem; color: var(--muted-foreground); margin-top: 0.25rem; }

/* ===== Empty State ===== */
.empty-state {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  min-height: 40vh; text-align: center; gap: 1rem;
}
.empty-state h1 { font-family: var(--font-display); }
.empty-state p { color: var(--muted-foreground); }

/* ===== Page Header ===== */
.page-section { padding: 2.5rem 0 4rem; }
.page-title { font-size: 1.875rem; font-weight: 700; margin-bottom: 0.5rem; }
.page-subtitle { color: var(--muted-foreground); margin-bottom: 1.5rem; }

/* ===== Animations ===== */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.9); }
  to { opacity: 1; transform: scale(1); }
}
@keyframes spin {
  to { transform: rotate(360deg); }
}
@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}
.animate-fade-up { animation: fadeUp 0.6s ease forwards; }
.animate-fade-up-d1 { animation: fadeUp 0.6s ease 0.1s both; }
.animate-fade-up-d2 { animation: fadeUp 0.6s ease 0.2s both; }
.animate-fade-up-d3 { animation: fadeUp 0.6s ease 0.3s both; }
.animate-bounce { animation: bounce 0.5s ease; }

/* ===== Responsive ===== */
@media (max-width: 1024px) {
  .categories-grid { grid-template-columns: repeat(3, 1fr); }
  .products-grid { grid-template-columns: repeat(3, 1fr); }
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .nav-desktop { display: none; }
  .header .contact-desktop { display: none; }
  .hamburger { display: flex; }
  .mobile-menu.active { display: block; }
  .mobile-menu {
    border-top: 1px solid var(--border); background: var(--background);
    padding: 1rem;
  }
  .mobile-menu a {
    display: block; padding: 0.75rem; font-size: 0.875rem; font-weight: 500;
    color: var(--muted-foreground); border-radius: var(--radius); transition: all 0.2s;
  }
  .mobile-menu a:hover { background: var(--muted); color: var(--primary); }

  .hero { min-height: 60vh; }
  .hero h1 { font-size: 2rem; }
  .hero-buttons { flex-direction: column; }

  .categories-grid { grid-template-columns: repeat(2, 1fr); }
  .products-grid { grid-template-columns: repeat(2, 1fr); }

  .cart-layout { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
  .modal-content { grid-template-columns: 1fr; }
  .modal-content img { height: 16rem; }
  .footer-grid { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .products-grid { grid-template-columns: 1fr; }
  .categories-grid { grid-template-columns: 1fr; }
}
