:root {
  --bg-white: #ffffff;
  --bg-light: #f9f9fb;
  --text-primary: #1a1c1d;
  --text-secondary: #4d4353;
  --accent-purple: #4c0080;
  --accent-purple-light: #6a0dad;
  --border-color: #eeeef0;
  --glass-bg: rgba(255, 255, 255, 0.1);
  --card-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family:
    "Inter",
    -apple-system,
    sans-serif;
}

body {
  background-color: var(--bg-white);
  color: var(--text-primary);
}

.main-content {
  padding-top: 72px;
}

@media (max-width: 768px) {
  .main-content {
    padding-top: 64px;
    padding-bottom: 110px;
  }
}

/* Hero Section */
.hero {
  background: var(--bg-light);
  padding: 100px 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 80px;
}

.hero-content {
  max-width: 500px;
}

.hero-title {
  font-size: 64px;
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: -3px;
  margin-bottom: 24px;
}

.hero-title span {
  color: var(--accent-purple-light);
}

.hero-description {
  font-size: 20px;
  color: var(--text-secondary);
  font-weight: 300;
  margin-bottom: 32px;
}

.hero-image-container {
  flex: 1;
  max-width: 600px;
}

.hero-image {
  width: 100%;
  border-radius: 24px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08);
}

/* Section Common */
.section {
  max-width: 1280px;
  margin: 0 auto;
  padding: 80px 48px;
}

.section-label {
  font-size: 14px;
  font-weight: 500;
  color: var(--accent-purple-light);
  text-transform: uppercase;
  letter-spacing: 1.2px;
  margin-bottom: 8px;
  display: block;
}

.section-title {
  font-size: 32px;
  font-weight: 700;
  margin-bottom: 40px;
}

/* Categories Section */
.section.categories {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 96px 32px; /* Horizontal padding matches the gap for even spacing */
  gap: 48px;
  width: 100%;
  max-width: 1536px;
  margin: 0 auto;
}

.category-header {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 0px;
  gap: 8px;
  width: 100%;
}

.section-label {
  font-family: "Inter";
  font-style: normal;
  font-weight: 700;
  font-size: 12px;
  line-height: 16px;
  display: flex;
  align-items: center;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: #4c0080;
  margin-bottom: 0;
}

.section-title {
  font-family: "Inter";
  font-style: normal;
  font-weight: 800;
  font-size: 36px;
  line-height: 40px;
  display: flex;
  align-items: center;
  letter-spacing: -0.9px;
  color: #1a1c1d;
  margin: 0;
}

.category-grid-container {
  width: 100%; /* Fill the container */
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px; /* Even spacing between items */
}

.category-card {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: flex-start;
  padding: 32px;
  isolation: isolate;
  position: relative; /* Changed from absolute to relative for grid flow */
  height: 320px; /* Adjusted height for better proportions in flexible grid */
  background: #ffffff;
  border-radius: 24px;
  overflow: hidden;
}

.category-img {
  position: absolute;
  left: 0px;
  right: 0px;
  top: 0px;
  bottom: 0px;
  background-size: cover;
  background-position: center;
  z-index: 0;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.category-card:hover .category-img {
  transform: scale(1.05);
}

.category-gradient {
  position: absolute;
  left: 0px;
  right: 0px;
  top: 0px;
  bottom: 0px;
  background: linear-gradient(
    0deg,
    rgba(0, 0, 0, 0.6) 0%,
    rgba(0, 0, 0, 0) 100%
  );
  z-index: 1;
}

.category-content {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 0px;
  width: 100%;
  z-index: 2;
}

.category-name {
  font-family: "Inter";
  font-style: normal;
  font-weight: 600;
  font-size: 24px;
  line-height: 32px;
  display: flex;
  align-items: center;
  color: #ffffff;
  margin: 0;
}

.category-description {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400;
  font-size: 14px;
  line-height: 20px;
  display: flex;
  align-items: center;
  color: rgba(255, 255, 255, 0.8);
  margin: 0;
}

/* Featured Products Section */
.section.featured {
  background: #f3f3f5;
  padding: 96px 0px;
  width: 100%;
  max-width: 1536px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.featured-container {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 0px 32px;
  gap: 48px;
  width: 100%;
  max-width: 1280px;
}

.featured-title {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400;
  font-size: 36px;
  line-height: 40px;
  display: flex;
  align-items: center;
  letter-spacing: -0.9px;
  color: #1a1c1d;
  margin: 0;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  column-gap: 64px;
  row-gap: 32px;
  width: 100%;
}

.product-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 16px;
  gap: 4px;
  height: 428px;
  background: #ffffff;
  border-radius: 24px;
  position: relative;
  transition: transform 0.3s ease;
}

.product-card:hover {
  transform: translateY(-8px);
}

.product-img-container {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  padding: 0px;
  isolation: isolate;
  width: 100%;
  height: 248px;
  background: #eeeef0;
  border-radius: 16px;
  overflow: hidden;
  position: relative;
}

.product-img {
  width: 100%;
  height: 100%;
  background-size: contain;
  background-position: center;
  background-repeat: no-repeat;
  transition: transform 0.6s ease;
}

.product-card:hover .product-img {
  transform: scale(1.1);
}

.wishlist-btn {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 8px;
  position: absolute;
  width: 32px;
  height: 32px;
  right: 16px;
  top: 16px;
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(6px);
  border-radius: 9999px;
  cursor: pointer;
  border: none;
  color: #4d4353;
  z-index: 10;
}

.product-info {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 20px 0px 0px;
  width: 100%;
}

.product-name {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400;
  font-size: 18px;
  line-height: 28px;
  display: flex;
  align-items: center;
  color: #1a1c1d;
  margin: 0;
}

.product-price-container {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 0px 0px 12px;
  width: 100%;
}

.product-price {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400;
  font-size: 20px;
  line-height: 28px;
  display: flex;
  align-items: center;
  color: #4c0080;
  margin: 0;
}

.add-cart-btn {
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  padding: 12px 0px;
  width: 100%;
  height: 48px;
  background: #4c0080;
  border-radius: 16px;
  border: none;
  color: #ffffff;
  font-family: "Inter";
  font-style: normal;
  font-weight: 700;
  font-size: 16px;
  line-height: 24px;
  cursor: pointer;
  transition: background 0.3s ease;
}

.add-cart-btn:hover {
  background: #3b0066;
}

.add-cart-btn i {
  margin-right: 8px;
}

/* Best Sellers Section */
.section.best-sellers {
  background: #ffffff;
  padding: 96px 24px;
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 48px;
}

.best-sellers-title {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400;
  font-size: 36px;
  line-height: 40px;
  display: flex;
  align-items: center;
  color: #1a1c1d;
  width: 100%;
  margin: 0;
  padding-left: 8px;
}

.best-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
  width: 100%;
  justify-content: center;
}

.best-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 24px;
  width: 100%;
  height: 356px;
  background: #ffffff;
  border-radius: 16px;
  position: relative;
  box-shadow: 0px 4px 24px rgba(0, 0, 0, 0.04);
  transition: transform 0.3s ease;
  box-sizing: border-box;
  overflow: hidden;
}

.best-card:hover {
  transform: translateY(-8px);
}

.best-img-container {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  padding: 0px;
  width: 100%;
  height: 236px;
  background: #f9f9fb;
  border-radius: 16px;
  overflow: hidden;
  position: relative;
  flex: none;
}

.best-img {
  width: 100%;
  height: 100%;
  background-size: contain;
  background-position: center;
  background-repeat: no-repeat;
  transition: transform 0.6s ease;
}

.best-card:hover .best-img {
  transform: scale(1.05);
}

.best-tag {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 4px 12px;
  position: absolute;
  width: fit-content;
  height: 24px;
  left: 16px;
  top: 16px;
  background: #6a0dad;
  border-radius: 9999px;
  z-index: 3;
}

.best-tag span {
  font-family: "Inter";
  font-style: normal;
  font-weight: 700;
  font-size: 12px;
  line-height: 16px;
  display: flex;
  align-items: center;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: #ffffff;
}

.best-info {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 24px 0px 0px;
  width: 100%;
  height: 72px;
  box-sizing: border-box;
}

.best-name {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400;
  font-size: 16px;
  line-height: 24px;
  display: flex;
  align-items: center;
  color: #1a1c1d;
  margin: 0;
  width: 100%;
  height: 24px;
}

.best-price {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400;
  font-size: 16px;
  line-height: 24px;
  display: flex;
  align-items: center;
  color: #4c0080;
  margin: 0;
  width: 100%;
  height: 24px;
}

/* Today's Deals Section */
.section.deals {
  background: #f3f3f5;
  padding: 96px 24px;
  width: 100%;
}

.deals-container {
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 48px;
}

.deals-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}

.deal-card {
  background: linear-gradient(135deg, #6a0dad 0%, #4c0080 100%);
  border-radius: 24px;
  padding: 40px;
  position: relative;
  color: #ffffff;
  overflow: hidden;
  height: 320px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: flex-start;
  transition: transform 0.3s ease;
  cursor: pointer;
}

.deal-card:hover {
  transform: translateY(-8px);
}

.deal-badge {
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 4px;
  padding: 4px 10px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 20px;
  backdrop-filter: blur(4px);
}

.deal-title {
  font-family: "Inter";
  font-size: 28px;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 12px;
  max-width: 80%;
}

.deal-text {
  font-family: "Inter";
  font-size: 14px;
  line-height: 1.5;
  opacity: 0.8;
  margin-bottom: 32px;
  max-width: 85%;
}

.deal-btn {
  background: #ffffff;
  color: #4c0080;
  padding: 12px 28px;
  border-radius: 9999px;
  font-weight: 700;
  font-size: 14px;
  text-decoration: none;
  transition:
    background 0.3s ease,
    transform 0.2s ease;
  display: inline-block;
  border: none;
  cursor: pointer;
}

.deal-btn:hover {
  background: #f9f9fb;
  transform: scale(1.05);
}

.deal-icon-bg {
  position: absolute;
  bottom: -20px;
  right: -20px;
  width: 160px;
  height: 160px;
  opacity: 0.1;
  color: #ffffff;
  pointer-events: none;
}

/* Apple Lifestyle Section */
.section.lifestyle {
  background: #ffffff;
  padding: 96px 24px;
  width: 100%;
}

.lifestyle-container {
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 64px;
}

.lifestyle-title {
  font-family: "Inter";
  font-size: 36px;
  font-weight: 700;
  text-align: center;
  color: #1a1c1d;
}

.lifestyle-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  height: 900px;
  width: 100%;
}

.lifestyle-card {
  height: 100%;
  border-radius: 24px;
  overflow: hidden;
  position: relative;
  cursor: pointer;
}

.lifestyle-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.lifestyle-card:hover .lifestyle-img {
  transform: scale(1.05);
}

.lifestyle-left {
  height: 100%;
}

.lifestyle-right {
  display: flex;
  flex-direction: column;
  gap: 24px;
  height: 100%;
}

.lifestyle-right-top {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  height: 400px;
}

.lifestyle-right-bottom {
  flex: 1;
}

/* Responsive */
/* ==========================================
   TABLET RESPONSIVE
========================================== */

@media (max-width: 1024px) {
  .hero {
    flex-direction: column;
    text-align: center;
    gap: 48px;
    padding: 80px 32px;
  }

  .hero-content {
    max-width: 100%;
  }

  .hero-title {
    font-size: 52px;
    letter-spacing: -2px;
  }

  .hero-image-container {
    max-width: 700px;
  }

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

  .product-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
  }

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

  .best-card {
    width: 100%;
  }

  .best-img-container {
    width: 100%;
  }

  .best-info {
    width: 100%;
  }

  .deals-grid {
    grid-template-columns: 1fr;
  }

  .lifestyle-grid {
    grid-template-columns: 1fr;
    height: auto;
  }

  .lifestyle-left {
    height: 500px;
  }

  .lifestyle-right {
    height: auto;
  }

  .lifestyle-right-top {
    height: 300px;
  }
}

/* ==========================================
   MOBILE RESPONSIVE
========================================== */

@media (max-width: 768px) {
  .section {
    padding: 64px 20px;
  }

  .hero {
    padding: 64px 20px;
  }

  .hero-title {
    font-size: 38px;
    line-height: 1.15;
    letter-spacing: -1px;
  }

  .hero-description {
    font-size: 16px;
  }

  .category-grid-container {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .category-card {
    height: 260px;
  }

  .featured-container {
    padding: 0 20px;
  }

  .featured-title {
    font-size: 30px;
  }

  .product-grid {
    grid-template-columns: 1fr;
  }

  .product-card {
    height: auto;
  }

  .best-grid {
    grid-template-columns: 1fr;
  }

  .best-card {
    width: 100%;
  }

  .deal-card {
    padding: 28px;
    height: auto;
    min-height: 260px;
  }

  .deal-title {
    font-size: 24px;
  }

  .lifestyle-title {
    font-size: 30px;
  }

  .lifestyle-left {
    height: 320px;
  }

  .lifestyle-right-top {
    grid-template-columns: 1fr;
    height: auto;
  }

  .lifestyle-right-top .lifestyle-card {
    height: 260px;
  }

  .lifestyle-right-bottom {
    height: 300px;
  }
}

/* ==========================================
   SMALL MOBILE
========================================== */

@media (max-width: 480px) {
  .hero-title {
    font-size: 32px;
  }

  .section-title {
    font-size: 28px;
  }

  .featured-title {
    font-size: 28px;
  }

  .best-sellers-title {
    font-size: 28px;
  }

  .lifestyle-title {
    font-size: 28px;
  }

  .product-price {
    font-size: 18px;
  }

  .category-name {
    font-size: 20px;
  }
}
