* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
html,
body {
  min-height: 100vh; /* viewport height */
  margin: 0;
}
body {
  background: linear-gradient(#000000, #737373) no-repeat;
  background-size: cover;
  background-attachment: fixed; /* optional: keeps it fixed on scroll */
  font-family: 'Montserrat', sans-serif;
}

@view-transition {
  navigation: auto;
}

::view-transition-old(root),
::view-transition-new(root) {
  animation-duration: 0.6s;
  animation-timing-function: ease-in-out;
}

::view-transition-old(root) {
  animation-name: fade-out;
}
::view-transition-new(root) {
  animation-name: fade-in;
}

@keyframes fade-in {
  from {
    opacity: 0;
    transform: scale(0.98);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}
@keyframes fade-out {
  from {
    opacity: 1;
    transform: scale(1);
  }
  to {
    opacity: 0;
    transform: scale(1.02);
  }
}

:root {
  --primary-gold: #bd986a;
  --primary-gray: #a9a8a8;
  --primary-white: #fff;

  --box-shadow: rgba(0, 0, 0, 0.35) 0px 5px 15px;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  width: 90%;
}
.row {
  display: flex;
}
.col {
  width: 100%;
}

.home-section {
  width: 100%;
  height: 100vh;
}
img {
  width: 100%;
}

.logo {
  max-width: 100px;
  border-radius: 50%;
}
.nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 150px;
  padding: 20px;
  margin-bottom: 20px;
}

nav > div {
  gap: 20px;
  position: relative;
}
nav > div > p {
  position: absolute;
  top: -8px;
  right: -8px;
  background-color: var(--primary-accent, #e63946);
  color: var(--primary-white, #fff);
  font-size: 12px;
  font-weight: 700;
  padding: 4px 6px;
  min-width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}
.shopping-cart {
  font-size: 40px;
  color: var(--primary-gold);
  position: relative;
}

.shopping-cart:hover {
  transition: 0.2s ease-in-out;
  transform: scale(1.2);
  cursor: pointer;
}

.home-image-container {
  width: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 20px;
  margin: 60px 0;
}
.home-image-container img {
  width: 100%;
  max-width: 500px;
}

.social-icons-wrapper {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  max-width: 300px;
  margin: 20px 0;
}
.social-icons-wrapper i {
  font-size: 50px;
  color: var(--primary-gold);
}
.social-icons-wrapper i:hover {
  transition: 0.2s ease-in-out;
  transform: scale(1.2);
  cursor: pointer;
}

.ads-card-wrapper {
  display: flex;
  width: 100%;
  margin: 50px 0;
  gap: 30px;
  justify-content: center;
}

.ads-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  background-color: var(--primary-gold);
  padding: 20px;
  border-radius: 10px;
  box-shadow: rgba(0, 0, 0, 0.35) 0px 5px 15px;
  color: var(--primary-white);
  text-align: center;
  width: 100%;
  max-width: 300px;
  text-decoration: none;
}

.ads-card h1 {
  font-weight: 1000;
  font-size: 30px;
}

.ads-card:hover {
  transition: 0.3s ease-in-out;
  transform: scale(1.1);
  cursor: pointer;
}
.ads-card:nth-child(even) {
  background-color: var(--primary-gray);
}

.upfront-plus-btn {
  padding: 10px 18px;
  background-color: var(--primary-gold);
  color: white;
  border-radius: 10px;
  box-shadow: var(--box-shadow);
  text-decoration: none;
  text-transform: uppercase;
  font-weight: 800;
}
.back-btn {
  padding: 10px 18px;
  background-color: var(--primary-gold);
  color: white;
  border-radius: 10px;
  box-shadow: var(--box-shadow);
  text-decoration: none;
  text-transform: uppercase;
  font-weight: 800;
}
.back-btn:hover {
  filter: brightness(1.1);
}

.product-section {
  margin: 100px 0;
}

.product-section h1 {
  text-align: center;
  color: white;
  font-size: 40px;
  margin: 20px 0;
}

/* Container styling */
.product-container {
  display: grid;
  grid-template-columns: repeat(3, 1fr); /* Default: 3 columns */
  gap: 30px;
  padding: 20px;
}

/* Product card styling */
.product-card {
  border-radius: 8px;
  text-align: center;
  cursor: pointer;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.product-card:hover {
  transition: 0.2s ease-in-out;
  transform: scale(1.05);
}

.product-card img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 5px;
  display: block;
}

.product-card h3 {
  font-size: 20px;
  color: var(--primary-white);
  font-weight: 800;
}

.product-card p {
  font-size: 20px;
  color: var(--primary-white);
}

/* 
Product Page
*/

.product-row {
  display: flex;
  margin: 100px 0;
  gap: 40px;
}

.product-imgs-col {
  width: 100%;
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(2, 1fr);
}

/* If there's only one image inside */
.product-imgs-col > *:only-child {
  grid-column: 1 / -1; /* span full width */
}
.product-imgs-col img {
  border: 2px solid var(--primary-gray);
  box-shadow: var(--box-shadow);
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 5px;
  display: block;
}

.product-info-col {
  display: flex;
  flex-direction: column;
  gap: 20px;
  width: 80%;
}
.product-info-col h3 {
  color: var(--primary-white);
  font-size: 40px;
}
.product-info-col h5 {
  color: white;
  font-size: 30px;
  font-weight: 400;
}
.product-info-col p {
  color: var(--primary-white);
}

.quantity-container {
  margin-top: 50px;
  width: 100%;
  display: flex;
  gap: 20px;
}
.quantity-container select {
  width: 20%;
  background-color: transparent;
  color: var(--primary-white);
  text-align: center;
  border: 2px solid var(--primary-gray);
  cursor: pointer;
  font-size: 20px;
  border-radius: 10px;
}
.quantity-container select option {
  background-color: transparent;
  border: 2px solid var(--primary-gray);
  color: black;
  text-align: center;
}
.add-cart-btn {
  width: 100%;
  padding: 18px 25px;
  background-color: var(--primary-gray);
  border: none;
  color: var(--primary-white);
  font-size: 20px;
  box-shadow: var(--box-shadow);
  font-weight: 600;
  transition: 0.1s ease-in-out;
  border-radius: 10px;
}
.add-cart-btn:hover {
  outline: 2px solid var(--primary-gray);
  color: var(--primary-white);
  background-color: transparent;
  cursor: pointer;
}

.sizes {
  display: flex;
  gap: 10px;
  margin: 10px 0;
}

.error-text {
  color: red;
  margin: 10px 0;
}

.size-option input[type='radio'] {
  display: none; /* hide the default circle */
}

.size-option label {
  display: inline-block;
  padding: 0.5rem 1rem;
  border: 2px solid #ccc;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.2s ease;
  min-width: 40px;
  text-align: center;
  color: var(--primary-white);
}

.size-option input[type='radio']:checked + label {
  border-color: var(--primary-gold);
  background-color: var(--primary-gold);
  color: #fff;
}

.size-option input[type='radio']:disabled + label {
  border-color: black;
  background-color: black;
  color: var(--primary-gray);
  cursor: not-allowed;
}
.color-option {
  display: inline-block;
  margin: 0.5rem;
  position: relative;
}

.color-option input[type='radio'] {
  display: none; /* hide the default circle */
}

.color-option label {
  display: inline-block;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.25s ease;
}

/* When checked */
.color-option input[type='radio']:checked + label {
  border-color: black;
  box-shadow: var(--box-shadow);
  background-clip: content-box; /* pushes bg inside */
  padding: 4px; /* creates the gap */
  border: 2px solid #ccc; /* border ring */
}

/* Disabled */
.color-option input[type='radio']:disabled + label {
  opacity: 1;
  border-color: #999;
  cursor: not-allowed;
}

/* Hover (only if enabled) */
.color-option input[type='radio']:not(:disabled) + label:hover {
  transform: scale(1.1);
}

/*
Cart page
*/

.cart-container {
  margin: 30px auto;
}

.cart-container h3 {
  color: var(--primary-white);
  font-size: 40px;
}
.empty-cart-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 50px 0;
  gap: 50px;
}
.empty-cart-container h1 {
  color: var(--primary-white);
  font-size: 40px;
}
.empty-cart-btn {
  width: 100%;
  padding: 18px 25px;
  background-color: var(--primary-white);
  border: none;
  color: black;
  font-size: 20px;
  box-shadow: var(--box-shadow);
  font-weight: 600;
  transition: 0.1s ease-in-out;
  text-decoration: none;
  max-width: 300px;
  text-align: center;
}
.empty-cart-btn:hover {
  outline: 2px solid var(--primary-gray);
  color: var(--primary-white);
  background-color: transparent;
  cursor: pointer;
}

.cart-select {
  background-color: transparent;
  color: var(--primary-white);
  text-align: center;
  border: 2px solid var(--primary-gray);
  cursor: pointer;
  font-size: 20px;
  width: 80px;
  height: 50px;
}
.cart-select option {
  background-color: transparent;
  color: black;
}

.cart-header,
.cart-card {
  display: flex;
  align-items: center;
  border-bottom: 1px solid #ddd;
  padding: 20px 0;
  color: var(--primary-white);
}

.cart-header {
  font-weight: bold;
  font-size: 20px;
  margin: 20px 0;
}

.cart-card img {
  width: 60px;
  height: 60px;
  margin-right: 10px;
  object-fit: cover;
}

/* Column sizing */
.col.item {
  flex: 2;
  display: flex;
  align-items: center;
  gap: 10px;
  text-transform: capitalize;
}
.col.quantity {
  flex: 1;
  text-align: center;
}
.col.quantity > span {
  font-weight: 600;
  margin: 0 5px;
}

.col.quantity > span[role='button'] {
  color: var(--primary-white);
  cursor: pointer;
  font-size: 20px;
}

.col.price {
  flex: 1;
  text-align: right;
}
.col.close {
  flex: 0.5;
  text-align: right;
}

#cart-close {
  cursor: pointer;
  transition: 0.1s ease-in;
}
#cart-close:hover {
  transform: scale(1.1);
  filter: brightness(1.3);
}

.subtotal-wrapper {
  display: flex;
  width: 100%;
  justify-content: flex-end;
  color: var(--primary-white);
  margin: 20px 0;
  gap: 100px;
}

.checkout-wrapper {
  width: 100%;
  display: flex;
  justify-content: space-between;
  gap: 50px;
}
.checkout-wrapper button {
  background-color: var(--primary-white);
  color: white;
  width: 100%;
  padding: 20px 30px;
  font-size: 20px;
  cursor: pointer;
  border: none;
  background-color: var(--primary-gray);
  border-radius: 10px;
  transition: 0.2s ease-in;
  box-shadow: var(--box-shadow);
  max-width: 500px;
  font-weight: 600;
}
.checkout-wrapper button:hover {
  filter: brightness(0.8);
}
.checkout-wrapper button:nth-child(even) {
  background-color: var(--primary-gold);
}

.success-container {
  width: 100%;
  margin: 50px 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  word-wrap: break-word; /* breaks long words/IDs like cs_test_... */
  overflow-wrap: anywhere; /* modern alternative */
  gap: 20px;
  color: white;
  padding: 20px;
}
.success-container h1 {
  font-size: 50px;
}
.success-container p {
  font-size: 20px;
}

@media (width < 1000px) {
  .product-container {
    grid-template-columns: repeat(2, 1fr);
  }
  .product-row {
    flex-direction: column;
  }
}

@media (width < 780px) {
  .ads-card-wrapper {
    flex-direction: column;
    align-items: center;
  }
  .ads-card {
    max-width: none;
    width: 80%;
  }
  .product-container {
    grid-template-columns: 1fr; /* 1 column on small screens */
  }
  .product-imgs-col {
    grid-template-columns: repeat(1, 1fr);
  }
  .subtotal-wrapper {
    justify-content: space-between;
  }
  .checkout-wrapper {
    flex-direction: column;
    gap: 20px;
  }
  .checkout-wrapper button {
    max-width: none;
    width: 100%;
  }
  .success-container h1 {
    font-size: 30px;
  }
  .success-container p {
    font-size: 12px;
  }
}
