/* =========================================================
   ORBEADS — DESIGN TOKENS
   ========================================================= */
:root {
  --pink-soft: #FFF6FA;
  --pink-pale: #FFE1EF;
  --pink-hot: #FF3E9A;
  --pink-hot-dark: #d92e7a;
  --pink-line: #FFB6D9;
  --maroon: #4a2637;
  --maroon-soft: #6b4a5a;
  --white: #ffffff;

  --shadow-sm: 0 2px 8px rgba(255, 62, 154, 0.10);
  --shadow-md: 0 6px 18px rgba(255, 62, 154, 0.16);
  --shadow-lg: 0 12px 32px rgba(255, 62, 154, 0.20);

  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 22px;

  --transition: 0.22s ease;

  --sold-out-gray: #9a8a91;
}

/* ===== Base ===== */
* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  padding: 0;
  font-family: 'Poppins', sans-serif;
  background-color: var(--pink-soft);
  color: var(--maroon);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  font-family: 'Baloo 2', sans-serif;
}

a {
  text-decoration: none;
}

img {
  display: block;
}

button {
  font-family: 'Poppins', sans-serif;
}

/* Focus styles */
a:focus-visible,
button:focus-visible,
select:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--pink-hot-dark);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

section {
  padding: 70px 20px;
  text-align: center;
}

section h2 {
  color: var(--pink-hot);
  font-size: clamp(24px, 4vw, 30px);
  margin-bottom: 34px;
  position: relative;
}

section h2::after {
  content: "";
  display: block;
  width: 90px;
  height: 8px;
  margin: 12px auto 0;
  background-image: radial-gradient(circle, var(--pink-hot) 2.5px, transparent 2.6px);
  background-size: 14px 8px;
  background-repeat: repeat-x;
  opacity: 0.55;
}

/* ===== Announcement bar ===== */
.announcement-bar {
  background-color: var(--pink-hot);
  color: white;
  overflow: hidden;
  white-space: nowrap;
  padding: 9px 0;
}

.announcement-bar p {
  display: inline-block;
  padding-left: 100%;
  margin: 0;
  animation: scroll-left 18s linear infinite;
  font-size: 13.5px;
  letter-spacing: 0.3px;
}

@keyframes scroll-left {
  0% { transform: translateX(0); }
  100% { transform: translateX(-100%); }
}

/* ===== Navbar ===== */
.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 24px;
  background-color: rgba(255, 225, 239, 0.92);
  backdrop-filter: blur(6px);
  position: sticky;
  top: 0;
  z-index: 10;
  box-shadow: 0 1px 0 rgba(255, 62, 154, 0.12);
}

.navbar .logo {
  font-family: 'Baloo 2', sans-serif;
  font-size: 22px;
  font-weight: bold;
  color: var(--pink-hot);
  letter-spacing: 0.3px;
}

.nav-links {
  display: flex;
  align-items: center;
}

.nav-links a {
  color: var(--maroon);
  margin-left: 22px;
  font-weight: 600;
  font-size: 15px;
  transition: color var(--transition);
}

.nav-links a:hover {
  color: var(--pink-hot);
}

/* ===== Hero ===== */
.hero {
  background:
    radial-gradient(circle at 12% 20%, rgba(255, 62, 154, 0.10) 0, transparent 40%),
    radial-gradient(circle at 88% 75%, rgba(255, 62, 154, 0.12) 0, transparent 42%),
    var(--pink-pale);
  padding: 100px 20px 90px;
}

.hero h1 {
  font-size: clamp(30px, 6vw, 44px);
  color: var(--pink-hot);
  margin-bottom: 16px;
  line-height: 1.15;
}

.hero p {
  font-size: 17px;
  margin: 0 auto 28px;
  max-width: 420px;
  color: var(--maroon-soft);
}

.btn-primary {
  display: inline-block;
  background-color: var(--pink-hot);
  color: white;
  padding: 13px 30px;
  border-radius: 30px;
  font-weight: 600;
  font-size: 15px;
  border: none;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: background-color var(--transition), transform var(--transition), box-shadow var(--transition);
}

.btn-primary:hover {
  background-color: var(--pink-hot-dark);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-primary:active {
  transform: translateY(0);
}

/* ===== Collections ===== */
.collection-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 25px;
}

.collection-card {
  width: 200px;
  background: white;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  text-align: left;
  cursor: pointer;
  border: 2px solid transparent;
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}

.collection-card:hover,
.collection-card.active {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--pink-hot);
}

.collection-card img {
  width: 100%;
  height: 140px;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.collection-card:hover img {
  transform: scale(1.06);
}

.collection-card-icon {
  font-size: 40px;
  height: 140px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--pink-pale);
}

.collection-card h3 {
  margin: 12px 14px 2px;
  color: var(--maroon);
  font-size: 16px;
}

.collection-card p {
  margin: 0 14px 14px;
  font-size: 13px;
  color: var(--maroon-soft);
}

/* ===== Featured product ===== */
.featured {
  background-color: white;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 46px;
  text-align: left;
}

.featured img {
  width: 280px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
}

.featured-info {
  max-width: 320px;
}

.featured-info .label {
  color: var(--pink-hot);
  font-size: 12.5px;
  letter-spacing: 1.5px;
  font-weight: 700;
}

.featured-info h2 {
  text-align: left;
  margin: 8px 0 12px;
}

.featured-info h2::after {
  margin: 12px 0 0;
}

.featured-info .price {
  font-size: 22px;
  font-weight: bold;
  color: var(--maroon);
  margin: 10px 0 20px;
}

/* ===== Product grid (FIXED SIZING ISSUE) ===== */
.product-list {
  display: grid;
  /* Columns fix: prevents cards from stretching or zooming when fewer items are shown */
  grid-template-columns: repeat(auto-fill, minmax(220px, 240px));
  justify-content: center;
  gap: 26px;
  max-width: 1100px;
  margin: 0 auto;
}

.product {
  background-color: white;
  border-radius: var(--radius-md);
  padding: 16px;
  box-shadow: var(--shadow-sm);
  text-align: left;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: 100%;
  height: 380px; /* Fixed card height for consistency */
  cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition);
}

.product:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.product img {
  width: 100%;
  height: 200px; /* Locked height so images remain identical across categories */
  object-fit: cover; /* Fills the box; crops a little at the edges instead of leaving gaps */
  border-radius: var(--radius-md);
  transition: transform 0.4s ease;
}

.product:hover img {
  transform: scale(1.04);
}

.product-info {
  margin-bottom: 12px;
}

.product-info h3 {
  color: var(--maroon);
  font-size: 15.5px;
  margin: 12px 0 4px;
  line-height: 1.3;
}

.product-info p {
  color: var(--pink-hot);
  font-weight: bold;
  margin: 0;
}

/* Buttons in grid */
.open-modal-btn,
.add-to-cart-btn {
  margin-top: auto;
  background-color: var(--pink-hot);
  color: white;
  border: none;
  padding: 10px 16px;
  border-radius: 20px;
  font-weight: 600;
  cursor: pointer;
  font-size: 13.5px;
  min-height: 40px;
  transition: background-color var(--transition), transform var(--transition);
  text-align: center;
  width: 100%;
}

.open-modal-btn:hover,
.add-to-cart-btn:hover {
  background-color: var(--pink-hot-dark);
  transform: translateY(-1px);
}

.open-modal-btn:active,
.add-to-cart-btn:active {
  transform: translateY(0);
}

/* ===== Sold out state ===== */

/* Whole card: dimmed, no hover lift, "not-allowed" cursor since the
   card itself is unclickable (JS blocks the modal from opening) */
.product.is-sold-out,
.featured-info.is-sold-out {
  cursor: not-allowed;
}

.product.is-sold-out {
  opacity: 0.6;
}

.product.is-sold-out:hover {
  transform: none;
  box-shadow: var(--shadow-sm);
}

.product.is-sold-out img {
  filter: grayscale(65%);
}

.product.is-sold-out:hover img {
  transform: none;
}

/* Sold-out button, in both the product grid and the featured section */
.product.is-sold-out .open-modal-btn,
.product.is-sold-out .add-to-cart-btn,
.featured-info.is-sold-out .add-to-cart-btn {
  background-color: var(--sold-out-gray);
  cursor: not-allowed;
}

.product.is-sold-out .open-modal-btn:hover,
.product.is-sold-out .add-to-cart-btn:hover,
.featured-info.is-sold-out .add-to-cart-btn:hover {
  background-color: var(--sold-out-gray);
  transform: none;
}

/* The "(Sold Out)" tag added next to the product title */
.sold-out-tag {
  color: var(--sold-out-gray);
  font-size: 0.75em;
  font-weight: 600;
  font-family: 'Poppins', sans-serif;
  white-space: nowrap;
}

/* Sold-out variant options inside a product's type dropdown */
.product-type option:disabled {
  color: var(--sold-out-gray);
}

/* ===== Product Modal Styling ===== */
.product-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(74, 38, 55, 0.6);
  backdrop-filter: blur(4px);
  z-index: 250;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.product-modal.modal-open {
  display: flex;
}

.product-modal-box {
  background: white;
  border-radius: var(--radius-lg);
  padding: 28px;
  width: 580px;
  max-width: 95%;
  position: relative;
  box-shadow: var(--shadow-lg);
  animation: modalPop 0.25s ease-out;
}

@keyframes modalPop {
  from { opacity: 0; transform: scale(0.92); }
  to { opacity: 1; transform: scale(1); }
}

.close-modal-btn {
  position: absolute;
  top: 16px;
  right: 16px;
  background: var(--pink-soft);
  border: none;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  font-size: 16px;
  cursor: pointer;
  color: var(--maroon);
  transition: background-color var(--transition);
}

.close-modal-btn:hover {
  background: var(--pink-pale);
}

.product-modal-content {
  display: flex;
  gap: 22px;
  align-items: center;
}

.product-modal-content img {
  width: 200px;
  height: 220px;
  object-fit: contain; /* Shows the full image instead of cropping it */
  background-color: var(--white);
  border-radius: var(--radius-lg);
}

.product-modal-details {
  text-align: left;
  flex: 1;
}

.product-modal-details h2 {
  font-size: 22px;
  color: var(--maroon);
  margin: 0 0 6px;
}

.product-modal-details h2::after {
  display: none;
}

.product-modal-details .price {
  font-size: 20px;
  font-weight: bold;
  color: var(--pink-hot);
  margin-bottom: 12px;
}

.product-modal-details #modal-product-description {
  font-size: 14px;
  color: var(--maroon-soft);
  margin-bottom: 16px;
}

.modal-type-container {
  margin: 14px 0;
}

.modal-type-container label {
  font-size: 13px;
  font-weight: 600;
  color: var(--maroon);
}

.modal-type-container select {
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--pink-line);
  background-color: var(--pink-soft);
  color: var(--maroon);
  font-family: 'Poppins', sans-serif;
  font-size: 13.5px;
  margin-top: 6px;
  outline: none;
}

/* ===== Why shop with us ===== */
.why-us {
  background-color: var(--pink-pale);
}

.why-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 34px;
  max-width: 900px;
  margin: 0 auto;
}

.why-item {
  width: 200px;
}

.why-item .icon {
  font-size: 32px;
  margin-bottom: 8px;
}

.why-item h3 {
  margin: 6px 0;
  color: var(--maroon);
  font-size: 17px;
}

.why-item p {
  font-size: 14px;
  color: var(--maroon-soft);
  line-height: 1.5;
}

/* ===== About ===== */
.about {
  max-width: 600px;
  margin: 0 auto;
}

.about p {
  font-size: 16px;
  line-height: 1.7;
  color: var(--maroon-soft);
}

/* ===== Address ===== */
.address {
  background-color: var(--pink-pale);
}

.address p {
  font-size: 16px;
  font-weight: 600;
}

/* ===== FAQ ===== */
.faq {
  max-width: 600px;
  margin: 0 auto;
  text-align: left;
}

.faq details {
  background-color: white;
  border-radius: 14px;
  padding: 14px 18px;
  margin-bottom: 12px;
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition);
}

.faq details[open] {
  box-shadow: var(--shadow-md);
}

.faq summary {
  font-weight: 600;
  cursor: pointer;
  color: var(--maroon);
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: "+";
  color: var(--pink-hot);
  font-size: 20px;
  font-weight: 400;
  margin-left: 12px;
  transition: transform var(--transition);
  flex-shrink: 0;
}

.faq details[open] summary::after {
  transform: rotate(45deg);
}

.faq p {
  margin: 12px 0 0;
  font-size: 14px;
  color: var(--maroon-soft);
  line-height: 1.6;
}

/* ===== Cart icon in navbar ===== */
#cart-icon {
  color: var(--maroon);
  font-weight: 600;
  margin-left: 22px;
  font-size: 15px;
}

/* ===== Cart panel ===== */
.cart-panel {
  position: fixed;
  top: 0;
  right: -320px;
  width: 300px;
  max-width: 88vw;
  height: 100%;
  background-color: white;
  box-shadow: -6px 0 20px rgba(0,0,0,0.15);
  padding: 22px;
  transition: right 0.3s ease;
  z-index: 100;
  overflow-y: auto;
}

.cart-panel.cart-open {
  right: 0;
}

.cart-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.cart-header h3 {
  margin: 0;
}

.cart-header button {
  background: var(--pink-soft);
  border: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-size: 16px;
  cursor: pointer;
  color: var(--maroon);
  transition: background-color var(--transition);
}

.cart-header button:hover {
  background: var(--pink-pale);
}

.cart-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--pink-pale);
  font-size: 14px;
  text-align: left;
  gap: 8px;
}

.remove-item-btn {
  background: none;
  border: none;
  color: var(--pink-hot);
  cursor: pointer;
  font-size: 16px;
  padding: 4px;
  flex-shrink: 0;
}

.cart-footer {
  margin-top: 20px;
  text-align: left;
}

#cart-total {
  font-weight: bold;
  font-size: 16px;
}

#delivery-note {
  font-size: 13px;
  color: var(--maroon-soft);
  margin-bottom: 10px;
}

/* ===== Checkout Modal & Form ===== */
.checkout-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(74, 38, 55, 0.55);
  z-index: 200;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.checkout-modal.checkout-open {
  display: flex;
}

.checkout-box {
  background-color: white;
  border-radius: var(--radius-md);
  padding: 22px;
  width: 340px;
  max-width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
}

#checkout-form {
  display: flex;
  flex-direction: column;
  text-align: left;
}

#checkout-form label {
  font-size: 13px;
  font-weight: 600;
  margin-top: 12px;
  margin-bottom: 4px;
  color: var(--maroon);
}

#checkout-form input,
#checkout-form textarea,
#checkout-form select {
  width: 100%;
  padding: 11px 12px;
  border-radius: 10px;
  border: 1px solid var(--pink-line);
  background-color: var(--pink-soft);
  color: var(--maroon);
  font-family: 'Poppins', sans-serif;
  font-size: 14px;
  outline: none;
  transition: all var(--transition);
}

#checkout-form select {
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg fill='%23FF3E9A' height='24' viewBox='0 0 24 24' width='24' xmlns='http://www.w3.org/2000/svg'><path d='M7 10l5 5 5-5z'/></svg>");
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 18px;
  padding-right: 34px;
}

#checkout-form input:focus,
#checkout-form textarea:focus,
#checkout-form select:focus {
  border-color: var(--pink-hot);
  box-shadow: 0 0 5px rgba(255, 62, 154, 0.3);
}

#checkout-form textarea {
  resize: vertical;
  min-height: 60px;
}

#checkout-form button {
  margin-top: 20px;
  width: 100%;
}

/* ===== Footer ===== */
footer {
  background-color: var(--maroon);
  color: white;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-around;
  padding: 44px 20px;
  gap: 20px;
  text-align: left;
}

footer h3 {
  color: var(--pink-line);
  margin-bottom: 10px;
  font-size: 17px;
}

footer p {
  font-size: 14px;
  margin: 4px 0;
  color: #f3dbe6;
}

/* =========================================================
   MOBILE RESPONSIVE
   ========================================================= */
@media (max-width: 768px) {
  section {
    padding: 54px 18px;
  }

  .hero {
    padding: 76px 18px 66px;
  }

  .featured {
    flex-direction: column;
    text-align: center;
    gap: 26px;
  }

  .featured-info {
    text-align: center;
    max-width: 100%;
  }

  .featured-info h2 {
    text-align: center;
  }

  .featured-info h2::after {
    margin: 12px auto 0;
  }

  .featured img {
    width: 100%;
    max-width: 320px;
  }

  .product-list {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 16px;
  }

  .product {
    height: 360px;
  }

  .product img {
    height: 180px;
  }
}

@media (max-width: 550px) {
  .product-modal-content {
    flex-direction: column;
    text-align: center;
  }

  .product-modal-details {
    text-align: center;
  }

  .product-modal-content img {
    width: 100%;
    height: 180px;
  }
}

@media (max-width: 500px) {
  .navbar {
    padding: 14px 16px;
  }

  .navbar .logo {
    font-size: 19px;
  }

  .nav-links a {
    margin-left: 12px;
    font-size: 13.5px;
  }

  .hero h1 {
    font-size: 27px;
  }

  .hero p {
    font-size: 15px;
  }

  .collection-card {
    width: 45%;
  }

  .product-list {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }

  .product {
    padding: 12px;
    height: 320px;
  }

  .product img {
    height: 150px;
  }

  .product-info h3 {
    font-size: 13.5px;
    margin: 8px 0 2px;
  }

  .open-modal-btn,
  .add-to-cart-btn {
    width: 100%;
    font-size: 12px;
    padding: 8px 10px;
    min-height: 36px;
  }

  .why-item {
    width: 44%;
  }

  .cart-panel {
    width: 100%;
    max-width: 100vw;
    right: -100%;
  }

  .checkout-box {
    width: 100%;
  }

  footer {
    justify-content: flex-start;
  }
}
