/* ── Single Product Page ── */

.shiku-single-product-layout {
  display: flex;
  flex-direction: column;
  background-color: #fefefc;
  width: 100%;
}

/* Hide WooCommerce Default Tabs */
.woocommerce-tabs {
  display: none !important;
}

/* ── Desktop Layout ── */
@media (min-width: 992px) {
  .shiku-single-product-layout {
    flex-direction: row;
    padding-left: 64px;
    padding-right: 64px;
    padding-top: calc(var(--nav-height-desktop) + 32px);
    padding-bottom: 64px;
    gap: 64px;
  }

  .shiku-product-info-wrap {
    width: 480px;
    flex-shrink: 0;
    position: relative;
  }

  .shiku-product-info {
    position: sticky;
    top: calc(var(--nav-height-desktop) + 32px);
    display: flex;
    flex-direction: column;
    gap: 24px;
  }

  .shiku-product-images-container {
    flex: 1;
    display: flex;
    flex-direction: column;
  }

  .shiku-product-images {
    display: flex;
    flex-direction: column;
    gap: 16px;
  }

  .shiku-carousel-dots {
    display: none;
  }

  .shiku-product-images img.shiku-single-img {
    width: 100%;
    height: auto;
    object-fit: cover;
    display: block;
  }
}

/* ── Mobile Layout ── */
@media (max-width: 991px) {
  .shiku-single-product-layout {
    padding-top: var(--nav-height-mobile);
    padding-bottom: 32px;
    display: flex;
    flex-direction: column;
  }

  .shiku-product-images-container {
    order: -1;
    width: 100%;
    position: relative;
    margin-bottom: 8px; /* Reduced to bring it closer to title */
    padding: 0 16px; /* Added left right padding */
  }

  .shiku-product-images {
    position: relative;
    width: 100%;
    aspect-ratio: 0.8;
    overflow: hidden;
  }

  .shiku-product-images img.shiku-single-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
    z-index: 1;
  }
  
  .shiku-product-images img.shiku-single-img.active {
    opacity: 1;
    z-index: 2;
  }

  /* Carousel Dots */
  .shiku-carousel-dots {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-top: 8px; /* Reduced margin from image */
  }
  .shiku-carousel-dot {
    width: 8px;
    height: 8px;
    border: 1px solid var(--color-dark);
    background: transparent;
    padding: 0;
    cursor: pointer;
    border-radius: 0; /* Changed to square */
  }
  .shiku-carousel-dot.active {
    background: var(--color-dark);
  }

  .shiku-product-info-wrap {
    padding: 0 16px;
    order: 2;
  }

  .shiku-product-info {
    display: flex;
    flex-direction: column;
    gap: 16px;
  }
  
  /* Make sure header aligns left on mobile */
  .shiku-product-header {
    align-items: flex-start;
    text-align: left;
  }
}

/* ── Info Panel Elements ── */

.shiku-product-header {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
}

.shiku-product-title {
  font-family: var(--font-heading);
  font-size: clamp(48px, 8vw, 96px);
  font-weight: 400;
  color: var(--color-dark);
  line-height: 1;
  letter-spacing: -2px;
  margin: 0;
  word-break: break-word;
}
@media (min-width: 992px) {
  .shiku-product-title { letter-spacing: -6px; }
}

.shiku-product-subtitle {
  font-family: var(--font-body);
  font-size: 16px;
  color: var(--color-dark);
  align-self: flex-end;
}

.shiku-product-price {
  display: flex;
  align-items: center;
  gap: 4px;
}
.shiku-product-price .currency {
  font-family: var(--font-body);
  font-weight: 200;
  font-size: 12px;
}
.shiku-product-price .amount {
  font-family: var(--font-body);
  font-size: 24px;
  color: var(--color-dark);
}

.shiku-product-desc {
  font-family: var(--font-body);
  font-weight: 200;
  font-size: 12px;
  line-height: 1.5;
  color: var(--color-dark);
}
.shiku-product-desc p {
  margin-bottom: 8px;
}
.shiku-product-desc p:last-child {
  margin-bottom: 0;
}

/* ── Custom Attributes ── */

.shiku-product-attributes {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.shiku-product-attr {
  display: flex;
  align-items: flex-start;
  width: 100%;
  gap: 24px; /* Matches the gap on variations form */
}

.shiku-product-attr .attr-label {
  width: 86px;
  flex-shrink: 0;
  font-family: var(--font-body);
  font-weight: 200;
  font-size: 12px;
  display: flex;
  align-items: center;
  gap: 4px;
}
/* Use colon next to the label */
.shiku-product-attr .attr-label::after {
  content: ":";
  display: inline-block;
}

.shiku-product-attr .attr-value {
  flex: 1;
  font-family: var(--font-body);
  font-size: 12px;
  color: var(--color-dark);
  line-height: 1.5;
}

/* ── Form / Variations ── */

.shiku-product-form {
  width: 100%;
  margin-top: 8px;
}

/* Hide Quantity */
.shiku-product-form .quantity {
  display: none !important;
}

.shiku-product-form table.variations {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 16px;
}

.shiku-product-form table.variations tbody {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.shiku-product-form table.variations tr {
  display: flex;
  align-items: flex-start; /* Prevent label from moving down when options expand */
  width: 100%;
  gap: 24px; /* Added gap to push dropdown away from label */
}

.shiku-product-form table.variations th.label {
  width: 86px; /* Keep consistent with attr-label, gap handles the distance */
  flex-shrink: 0;
  padding: 0;
  font-family: var(--font-body);
  font-weight: 200 !important;
  font-size: 12px;
  color: var(--color-dark);
  text-transform: lowercase;
  display: flex;
  align-items: center;
  gap: 4px;
}
.shiku-product-form table.variations th.label label {
  font-weight: 200 !important;
  margin: 0;
}
.shiku-product-form table.variations th.label::after {
  content: ":";
  display: inline-block;
}

.shiku-product-form table.variations td.value {
  flex: 1;
  padding: 0 0 2px 0;
  position: relative;
}

/* Custom Variations UI (Expandable Flow) */
.shiku-custom-select-wrapper {
  position: relative;
  width: 100%;
}

.shiku-custom-select-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  padding: 0 0 4px 0;
  border-bottom: 0.5px solid rgba(0,0,0,0.4);
  font-family: var(--font-body);
  font-size: 12px;
  color: var(--color-dark); /* Default to dark when selected */
}
.shiku-custom-select-trigger.is-placeholder {
  color: rgba(0,0,0,0.4); /* Gray when placeholder */
}

/* Remove the arrow icon as per screenshot */
.shiku-custom-select-trigger::after {
  display: none;
}

.shiku-custom-select-dropdown {
  position: relative; /* Not absolute! Pushes content down */
  width: 100%;
  background-color: transparent;
  display: none;
  flex-direction: column;
  margin-top: 8px; /* Gap between trigger border and options */
}
.shiku-custom-select-dropdown.open {
  display: flex;
}

.shiku-custom-option {
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 200;
  color: var(--color-dark);
  cursor: pointer;
  padding: 6px 12px;
  border: 0.5px solid rgba(0,0,0,0.2);
  margin-bottom: 4px;
  background-color: #fefefc;
  transition: all 0.2s ease;
}

.shiku-custom-option:hover {
  background-color: var(--color-vanilla); /* Yellow like footer */
}

.shiku-custom-option.selected {
  font-weight: 400;
  background-color: rgba(0,0,0,0.03);
}

.shiku-custom-option.disabled {
  opacity: 0.3;
  text-decoration: line-through;
  cursor: not-allowed;
}

/* Hide WooCommerce Select and Reset */
.shiku-product-form table.variations select {
  display: none !important;
}
.shiku-product-form .reset_variations {
  display: none !important;
}

/* WooCommerce Price in variations */
.woocommerce-variation-price {
  margin-bottom: 16px;
  font-family: var(--font-body);
  font-size: 16px;
}
.woocommerce-variation-availability {
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 200;
  margin-bottom: 16px;
}

/* The Add to Bag button - Override WooCommerce defaults completely! */
.woocommerce #content .shiku-product-form button.single_add_to_cart_button,
.woocommerce .shiku-product-form button.single_add_to_cart_button.button.alt {
  width: max-content !important;
  margin-left: auto !important; /* Push the button to the right */
  display: flex !important;
  flex-direction: row !important;
  justify-content: flex-end !important;
  align-items: center !important;
  gap: 16px !important; /* Space between text and arrow */
  text-align: right !important;
  background: transparent !important;
  border: none !important;
  border-bottom: 0.5px solid rgba(0,0,0,0.4) !important;
  border-radius: 0 !important;
  padding: 8px 0 12px 0 !important; /* Match padding to design */
  font-family: var(--font-body) !important;
  font-weight: 400 !important;
  font-size: 11px !important;
  letter-spacing: 1px !important;
  color: var(--color-dark) !important;
  text-transform: lowercase !important;
  cursor: pointer;
  opacity: 0.5;
  transition: opacity 0.3s ease;
  box-shadow: none !important;
  margin-top: 16px;
}

/* Hide any ::before pseudo-elements the theme might have added */
.woocommerce .shiku-product-form button.single_add_to_cart_button::before {
  display: none !important;
}

.woocommerce #content .shiku-product-form button.single_add_to_cart_button:hover,
.woocommerce .shiku-product-form button.single_add_to_cart_button.button.alt:hover {
  opacity: 1;
  background: transparent !important;
  color: var(--color-dark) !important;
}

.woocommerce .shiku-product-form button.single_add_to_cart_button::after {
  content: "";
  display: block;
  width: 62px;
  height: 11px;
  background-color: var(--color-dark);
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 62 11'%3E%3Cpath fill='%23000' d='M61.354 5.854a.5.5 0 000-.708L58.172 1.964a.5.5 0 10-.707.708L60.293 5.5l-2.828 2.828a.5.5 0 10.707.708l3.182-3.182zM0 6h61V5H0v1z'/%3E%3C/svg%3E");
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 62 11'%3E%3Cpath fill='%23000' d='M61.354 5.854a.5.5 0 000-.708L58.172 1.964a.5.5 0 10-.707.708L60.293 5.5l-2.828 2.828a.5.5 0 10.707.708l3.182-3.182zM0 6h61V5H0v1z'/%3E%3C/svg%3E");
  mask-size: contain;
  -webkit-mask-size: contain;
  mask-repeat: no-repeat;
  -webkit-mask-repeat: no-repeat;
}
/* When disabled (e.g. variation not selected) */
.woocommerce .shiku-product-form button.single_add_to_cart_button.disabled {
  opacity: 0.2;
  cursor: not-allowed;
}


