/* ===========================
   RESET
=========================== */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  min-height: 100%;
}


/* ===========================
   BODY
=========================== */

body {
  min-height: 100vh;

  background-color: #35404b;
  background-image: url("website-bg.gif");
  background-repeat: no-repeat;
  background-position: center center;
  background-size: 100% 100%;
  background-attachment: fixed;

  color: #fff;

  font-family: Helvetica, Arial, sans-serif;
}


/* ===========================
   HOME LOGO
=========================== */

.logo {
  position: fixed;

  top: 10px;
  left: 10px;

  width: 60px;
  height: auto;

  z-index: 99999;

  -webkit-user-drag: none;
  user-drag: none;

  -webkit-user-select: none;
  user-select: none;
}


/* ===========================
   CART CORNER BUTTON
=========================== */

.cart-button {
  position: fixed;

  top: 10px;
  right: 10px;

  width: 60px;
  height: 60px;

  padding: 0;

  background: transparent;
  border: none;

  cursor: pointer;

  z-index: 99999;

  -webkit-tap-highlight-color: transparent;
}


.cart-icon {
  width: 100%;
  height: 100%;

  object-fit: contain;

  display: block;

  pointer-events: none;

  -webkit-user-drag: none;
  user-drag: none;

  -webkit-user-select: none;
  user-select: none;
}


/* ===========================
   STORE
=========================== */

.store-container {
  width: min(1200px, 92vw);

  margin: 0 auto;

  padding-top: 130px;
  padding-bottom: 100px;

  display: grid;

  grid-template-columns: repeat(4, 1fr);

  gap: 45px 28px;
}


/* ===========================
   PRODUCT CARD
=========================== */

.product-card {
  width: 100%;

  background: transparent;
  border: none;

  color: #fff;

  font-family: Helvetica, Arial, sans-serif;

  cursor: pointer;

  text-align: left;

  -webkit-tap-highlight-color: transparent;
}


.product-image-wrapper {
  position: relative;

  width: 100%;
}


.product-image {
  width: 100%;

  aspect-ratio: 1 / 1;

  object-fit: contain;

  display: block;

  margin-bottom: 14px;

  opacity: 1;

  pointer-events: none;

  -webkit-user-drag: none;
  user-drag: none;
}


/* ===========================
   AUTOMATIC SOLD OUT
=========================== */

.product-card.sold-out .product-image {
  opacity: 0.65;
}


.sold-out-label {
  position: absolute;

  inset: 0;

  display: flex;

  align-items: center;
  justify-content: center;

  color: white;

  font-family: Helvetica, Arial, sans-serif;

  font-size: clamp(15px, 2vw, 22px);

  font-weight: 700;

  text-transform: lowercase;

  pointer-events: none;

  opacity: 1;
}


/* ===========================
   PRODUCT TEXT
=========================== */

.product-name,
.product-price {
  font-family: Helvetica, Arial, sans-serif;

  font-size: clamp(18px, 2vw, 23px);

  font-weight: 700;

  line-height: 1.35;

  text-transform: lowercase;
}


.product-price {
  margin-top: 3px;
}


/* ===========================
   DISPLAY LAYER
=========================== */

.display-layer {
  position: fixed;

  inset: 0;

  z-index: 50000;

  display: flex;

  align-items: center;
  justify-content: center;

  padding: 30px 20px;

  overflow: hidden;

  pointer-events: none;

  opacity: 0;
  visibility: hidden;

  transition:
    opacity 0.25s ease,
    visibility 0.25s ease;
}


.display-layer.open {
  opacity: 1;

  visibility: visible;

  pointer-events: auto;
}


/* ===========================
   DISPLAY PANEL
=========================== */

.display-panel {
  position: relative;

  width: min(600px, 90vw);

  margin: 0 auto;

  opacity: 0;

  transform: translateY(3px);

  transition:
    opacity 0.25s ease,
    transform 0.25s ease;
}


.display-layer.open .display-panel {
  opacity: 1;

  transform: translateY(0);
}


/* ===========================
   DISPLAYING.PNG
=========================== */

.display-frame {
  position: relative;

  display: block;

  width: 100%;
  height: auto;

  opacity: 0.90;

  z-index: 1;

  pointer-events: none;

  -webkit-user-drag: none;
  user-drag: none;

  -webkit-user-select: none;
  user-select: none;
}


/* ===========================
   POPUP CONTENT
=========================== */

.display-close,
.display-product-image-area,
.display-product-text,
.size-selector,
.add-cart-button,
.cart-title,
.cart-items,
.cart-total,
.checkout-button,
.stripe-secure {
  z-index: 2;
}


/* ===========================
   X BUTTON
=========================== */

.display-close {
  position: absolute;

  top: 5%;
  right: 6%;

  width: 10%;

  aspect-ratio: 1 / 1;

  display: flex;

  align-items: center;
  justify-content: center;

  background: transparent;

  color: white;

  border: none;

  font-family: Helvetica, Arial, sans-serif;

  font-size: clamp(18px, 3vw, 28px);

  font-weight: 700;

  cursor: pointer;

  text-transform: lowercase;
}


/* ===========================
   PRODUCT DISPLAY IMAGE
=========================== */

.display-product-image-area {
  position: absolute;

  top: 13%;
  left: 15%;

  width: 70%;
  height: 38%;

  display: flex;

  align-items: center;
  justify-content: center;
}


.display-product-image {
  width: 100%;
  height: 100%;

  object-fit: contain;

  opacity: 1;

  pointer-events: none;

  -webkit-user-drag: none;
  user-drag: none;
}


/* ===========================
   PRODUCT DISPLAY TEXT
=========================== */

.display-product-text {
  position: absolute;

  top: 53%;
  left: 12%;

  width: 76%;
  height: 11%;

  display: flex;

  flex-direction: column;

  justify-content: center;
}


.display-product-name,
.display-product-price {
  font-family: Helvetica, Arial, sans-serif;

  font-size: clamp(16px, 2vw, 22px);

  font-weight: 700;

  line-height: 1.35;

  text-transform: lowercase;
}


/* ===========================
   SIZE SELECTOR
=========================== */

.size-selector {
  position: absolute;

  top: 66%;
  left: 12%;

  width: 76%;
  height: 10%;

  display: flex;

  align-items: center;
  justify-content: space-between;

  gap: 5%;
}


.size-button {
  flex: 1;

  height: 100%;

  background: transparent;

  color: white;

  border: 1px solid white;

  font-family: Helvetica, Arial, sans-serif;

  font-size: clamp(15px, 2vw, 21px);

  font-weight: 700;

  cursor: pointer;

  text-transform: lowercase;
}


/* ===========================
   SELECTED SIZE
=========================== */

.size-button.selected,
.size-button.selected-size {
  background: white;

  color: black;
}


/* ===========================
   LOCKED SIZE
=========================== */

.size-button:disabled {
  opacity: 0.35;

  cursor: default;
}


/* ===========================
   SELECTED + LOCKED SIZE

   Keeps chosen size highlighted
   after product enters cart.
=========================== */

.size-button.selected:disabled,
.size-button.selected-size:disabled {
  opacity: 1;

  background: white;

  color: black;

  cursor: default;
}


/* ===========================
   ADD TO CART
=========================== */

.add-cart-button {
  position: absolute;

  left: 20%;
  bottom: 9%;

  width: 60%;
  height: 9%;

  background: transparent;

  color: white;

  border: 1px solid white;

  font-family: Helvetica, Arial, sans-serif;

  font-size: clamp(14px, 2vw, 20px);

  font-weight: 700;

  cursor: pointer;

  text-transform: lowercase;
}


.add-cart-button:disabled {
  opacity: 0.5;

  cursor: default;
}


/* ===========================
   CART TITLE
=========================== */

.cart-title {
  position: absolute;

  top: 10%;
  left: 12%;

  width: 60%;

  font-family: Helvetica, Arial, sans-serif;

  font-size: clamp(18px, 2vw, 24px);

  font-weight: 700;

  text-transform: lowercase;
}


/* ===========================
   CART ITEMS
=========================== */

.cart-items {
  position: absolute;

  top: 20%;
  left: 10%;

  width: 80%;
  height: 43%;

  overflow-y: auto;
  overflow-x: hidden;

  padding-right: 5px;

  text-transform: lowercase;
}


.cart-item {
  width: 100%;

  padding: 12px 0;

  border-bottom: 1px solid rgba(255, 255, 255, 0.35);

  display: flex;

  align-items: center;
  justify-content: space-between;

  gap: 20px;

  font-family: Helvetica, Arial, sans-serif;

  font-size: clamp(14px, 2vw, 18px);

  font-weight: 700;

  line-height: 1.35;
}


.cart-item-info {
  flex: 1;

  min-width: 0;
}


/* ===========================
   REMOVE BUTTON
=========================== */

.remove-cart-item {
  flex-shrink: 0;

  padding: 0;
  margin: 0;

  background: transparent;

  color: white;

  border: none;

  appearance: none;
  -webkit-appearance: none;

  font-family: Helvetica, Arial, sans-serif;

  font-size: clamp(13px, 1.8vw, 17px);

  font-weight: 700;

  line-height: 1.35;

  text-transform: lowercase;

  cursor: pointer;

  text-decoration: none;

  -webkit-tap-highlight-color: transparent;
}


.remove-cart-item:hover {
  text-decoration: underline;
}


.cart-item + .cart-item {
  margin-top: 5px;
}


.cart-empty,
.empty-cart-message {
  font-family: Helvetica, Arial, sans-serif;

  font-size: clamp(14px, 2vw, 18px);

  font-weight: 700;

  text-transform: lowercase;
}


/* ===========================
   CART TOTAL
=========================== */

.cart-total {
  position: absolute;

  left: 10%;
  bottom: 24%;

  width: 80%;
  height: 7%;

  display: flex;

  align-items: center;
  justify-content: space-between;

  font-family: Helvetica, Arial, sans-serif;

  font-size: clamp(16px, 2vw, 22px);

  font-weight: 700;

  text-transform: lowercase;
}


/* ===========================
   CHECKOUT BUTTON
=========================== */

.checkout-button {
  position: absolute;

  left: 20%;
  bottom: 13%;

  width: 60%;
  height: 8%;

  background: transparent;

  color: white;

  border: 1px solid white;

  font-family: Helvetica, Arial, sans-serif;

  font-size: clamp(14px, 2vw, 20px);

  font-weight: 700;

  cursor: pointer;

  text-transform: lowercase;
}


.checkout-button:disabled {
  opacity: 0.5;

  cursor: default;
}


/* ===========================
   STRIPE SECURE AREA

   Dedicated area directly
   underneath Checkout.

   Uses:
   stripelogo.png
=========================== */

.stripe-secure {
  position: absolute;

  left: 10%;
  bottom: 3%;

  width: 80%;
  height: 7%;

  display: flex;

  align-items: center;
  justify-content: center;

  gap: 7px;

  color: white;

  white-space: nowrap;

  pointer-events: none;
}


.stripe-secure-text {
  font-family: Helvetica, Arial, sans-serif;

  font-size: clamp(10px, 1.5vw, 14px);

  font-weight: 700;

  line-height: 1;

  text-transform: lowercase;
}


.stripe-secure-logo {
  display: block;

  width: auto;
  height: auto;

  max-width: 78px;
  max-height: 30px;

  object-fit: contain;

  opacity: 1;

  pointer-events: none;

  -webkit-user-drag: none;
  user-drag: none;

  -webkit-user-select: none;
  user-select: none;
}


/* ===========================
   DEBUG BOXES
=========================== */

.debug-box {
  outline: 2px solid rgba(255, 0, 0, 0.8);
}


/* ===========================
   MOBILE PORTRAIT
=========================== */

@media (max-width: 600px) {

  .store-container {
    width: 90vw;

    grid-template-columns: repeat(2, 1fr);

    padding-top: 110px;

    gap: 35px 18px;
  }


  .display-layer {
    padding: 24px 0;
  }


  .display-panel {
    width: 88vw;

    max-width: 520px;

    margin-left: auto;
    margin-right: auto;
  }


  .stripe-secure {
    gap: 5px;
  }


  .stripe-secure-text {
    font-size: clamp(8px, 2.5vw, 11px);
  }


  .stripe-secure-logo {
    max-width: 62px;
    max-height: 24px;
  }

}


/* ===========================
   PHONE LANDSCAPE
=========================== */

@media (max-height: 500px) and (orientation: landscape) {

  .display-layer {
    padding: 12px;
  }


  .display-panel {
    width: auto;

    height: calc(100vh - 24px);
    height: calc(100dvh - 24px);

    max-width: 80vw;

    margin: 0 auto;
  }


  .display-frame {
    width: auto;
    height: 100%;

    max-width: 100%;

    object-fit: contain;
  }


  .stripe-secure-text {
    font-size: clamp(8px, 1.8vh, 11px);
  }


  .stripe-secure-logo {
    max-width: 55px;
    max-height: 20px;
  }

}
