/**
 * Siyal Mobile - Amazon-Inspired 3-Column Single Product Page Styles
 * File: siyal-single-product.css
 */

:root {
  --amz-dark: #131921;
  --amz-nav: #232f3e;
  --amz-yellow: #ffd814;
  --amz-yellow-hover: #f7ca00;
  --amz-orange: #ffa41c;
  --amz-orange-hover: #fa8900;
  --amz-link: #007185;
  --amz-link-hover: #c7511f;
  --amz-red: #cc0c39;
  --amz-green: #067d62;
  --amz-bg: #eaeded;
  --amz-card-bg: #ffffff;
  --amz-border: #d5d9d9;
  --amz-text: #0f1111;
  --amz-muted: #565959;
  --amz-font: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --amz-radius: 6px;
}

/* Remove Storefront Default Wrappers on Single Product Page */
body.single-product #primary,
body.single-product .content-area,
body.single-product .site-main {
  width: 100% !important;
  max-width: 1440px !important;
  float: none !important;
  margin: 0 auto !important;
  padding: 0 !important;
}
body.single-product #secondary {
  display: none !important;
}
body.single-product .site-content {
  padding: 0 !important;
}
body.single-product .site-content > .col-full {
  max-width: 1440px !important;
  margin: 0 auto !important;
  padding: 0 18px !important;
  width: 100% !important;
  box-sizing: border-box !important;
}
body.single-product .storefront-breadcrumb {
  display: none !important;
}

/* Master Container */
.sm-product-detail-page {
  padding: 20px 0 80px;
  background-color: #ffffff;
  font-family: var(--amz-font);
  color: var(--amz-text);
}

.sm-prod-breadcrumbs {
  font-size: 13px;
  color: var(--amz-muted);
  margin-bottom: 22px;
  line-height: 1.5;
}
.sm-prod-breadcrumbs a {
  color: var(--amz-link);
  text-decoration: none;
}
.sm-prod-breadcrumbs a:hover {
  text-decoration: underline;
  color: var(--amz-link-hover);
}

/* 3-COLUMN AMAZON LAYOUT */
.sm-amazon-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1.25fr) minmax(280px, 0.9fr);
  gap: 24px;
  align-items: start;
}

/* COLUMN 1: GALLERY */
.sm-gallery-wrapper {
  display: flex;
  gap: 16px;
  position: sticky;
  top: 85px;
}

.sm-gallery-thumbs {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 64px;
  flex-shrink: 0;
  max-height: 480px;
  overflow-y: auto;
  scrollbar-width: thin;
}

.sm-thumb-btn {
  width: 62px;
  height: 62px;
  border: 1px solid var(--amz-border);
  border-radius: var(--amz-radius);
  background: #ffffff;
  padding: 4px;
  cursor: pointer;
  overflow: hidden;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}
.sm-thumb-btn.active,
.sm-thumb-btn:hover {
  border-color: #e77600;
  box-shadow: 0 0 5px rgba(231, 118, 0, 0.45);
}
.sm-thumb-btn img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.sm-gallery-stage {
  flex: 1;
  aspect-ratio: 1 / 1;
  border: 1px solid #ebebeb;
  border-radius: var(--amz-radius);
  background: #ffffff;
  padding: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  min-height: 380px;
}
.sm-gallery-stage img {
  max-width: 100%;
  max-height: 460px;
  object-fit: contain;
  transition: opacity 0.2s ease;
}
.sm-stage-badge {
  position: absolute;
  top: 14px;
  left: 14px;
  background: var(--amz-red);
  color: #ffffff;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.5px;
  padding: 4px 10px;
  border-radius: 4px;
  box-shadow: 0 2px 6px rgba(204, 12, 57, 0.3);
  z-index: 2;
}

/* COLUMN 2: CENTER SPECS */
.sm-center-col {
  display: flex;
  flex-direction: column;
}
.sm-brand-tag {
  font-size: 13px;
  color: var(--amz-link);
  font-weight: 700;
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.sm-product-name {
  font-size: 24px;
  font-weight: 800;
  line-height: 1.3;
  color: #0f1111;
  margin: 0 0 10px;
}
.sm-product-rating-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  margin-bottom: 12px;
}
.sm-stars {
  color: #ffa41c;
  font-size: 15px;
  letter-spacing: 1px;
}
.sm-rating-val {
  font-weight: 800;
  color: #0f1111;
}
.sm-rating-count {
  color: var(--amz-link);
}
.sm-divider {
  height: 1px;
  background: #e7e7e7;
  margin: 14px 0;
}

.sm-price-main {
  display: flex;
  align-items: baseline;
  gap: 10px;
}
.sm-price-percent {
  color: var(--amz-red);
  font-size: 28px;
  font-weight: 500;
}
.sm-price-current {
  font-size: 30px;
  font-weight: 800;
  color: #0f1111;
}
.sm-price-was {
  font-size: 13px;
  color: var(--amz-muted);
  margin-top: 3px;
}
.sm-price-was del {
  color: var(--amz-muted);
}
.sm-tax-note {
  font-size: 12px;
  color: var(--amz-muted);
  margin-top: 6px;
}

.sm-feature-bullets {
  margin-top: 18px;
}
.sm-feature-bullets h3 {
  font-size: 15px;
  font-weight: 800;
  margin-bottom: 10px;
  color: #0f1111;
}
.sm-feature-bullets ul {
  padding-left: 20px;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 9px;
  list-style: disc;
}
.sm-feature-bullets li {
  font-size: 13.5px;
  color: #2c3e50;
  line-height: 1.55;
}

/* Trust Badges Tray */
.sm-trust-badges-tray {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 24px;
  padding: 14px 8px;
  border-top: 1px solid #e7e7e7;
  border-bottom: 1px solid #e7e7e7;
  background: #fafbfc;
  border-radius: 8px;
}
.sm-trust-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 5px;
}
.sm-trust-item .icon {
  font-size: 22px;
}
.sm-trust-item span:not(.icon) {
  font-size: 11.5px;
  color: var(--amz-link);
  font-weight: 700;
}

/* COLUMN 3: BUYBOX CARD */
.sm-buybox-card {
  border: 1px solid var(--amz-border);
  border-radius: 10px;
  padding: 20px;
  background: #ffffff;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
  position: sticky;
  top: 85px;
}
.sm-buybox-price {
  font-size: 26px;
  font-weight: 800;
  color: #0f1111;
  margin-bottom: 12px;
}
.sm-delivery-info {
  font-size: 12.5px;
  color: #102b50;
  margin-bottom: 14px;
  line-height: 1.5;
  background: #f4f8fe;
  padding: 10px 12px;
  border-radius: 6px;
}
.sm-delivery-info .sm-location {
  color: var(--amz-muted);
  font-size: 11px;
  margin-top: 4px;
}
.sm-stock-status {
  font-size: 15px;
  font-weight: 800;
  margin-bottom: 16px;
}
.sm-stock-status.in-stock {
  color: #007600;
}
.sm-stock-status.out-of-stock {
  color: #b12704;
}

.sm-qty-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
  font-size: 13px;
  font-weight: 700;
}
.sm-qty-control {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--amz-border);
  border-radius: 6px;
  overflow: hidden;
  background: #fff;
}
.sm-qty-btn {
  background: #f0f2f2;
  border: none;
  width: 32px;
  height: 32px;
  cursor: pointer;
  font-weight: 800;
  font-size: 16px;
  color: #0f1111;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
}
.sm-qty-btn:hover {
  background: #e2e5e5;
}
.sm-qty-control input.qty {
  width: 44px;
  height: 32px;
  text-align: center;
  border: none;
  border-left: 1px solid var(--amz-border);
  border-right: 1px solid var(--amz-border);
  font-size: 14px;
  font-weight: 700;
  color: #0f1111;
  background: #fff;
}

/* Call-to-Action Buttons */
.sm-cta-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.sm-btn-amazon {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 16px;
  border-radius: 25px;
  font-size: 13.5px;
  font-weight: 800;
  cursor: pointer;
  border: none;
  text-decoration: none !important;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
  transition: all 0.2s ease;
}
.sm-btn-amazon.sm-btn-cart {
  background: var(--amz-yellow);
  color: #0f1111 !important;
  border: 1px solid var(--amz-yellow-hover);
}
.sm-btn-amazon.sm-btn-cart:hover {
  background: var(--amz-yellow-hover);
  box-shadow: 0 4px 10px rgba(247, 202, 0, 0.4);
}
.sm-btn-amazon.sm-btn-buynow {
  background: var(--amz-orange);
  color: #0f1111 !important;
  border: 1px solid var(--amz-orange-hover);
}
.sm-btn-amazon.sm-btn-buynow:hover {
  background: var(--amz-orange-hover);
  box-shadow: 0 4px 10px rgba(255, 164, 28, 0.4);
}
.sm-btn-amazon.sm-btn-wa {
  background: #25d366;
  color: #ffffff !important;
}
.sm-btn-amazon.sm-btn-wa:hover {
  background: #1eb857;
  box-shadow: 0 4px 10px rgba(37, 211, 102, 0.4);
}

.sm-buybox-security {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid #e7e7e7;
  font-size: 11.5px;
  color: var(--amz-muted);
  display: flex;
  flex-direction: column;
  gap: 6px;
  line-height: 1.5;
}

/* Tabs: Full Description & Specifications */
.sm-product-info-tabs {
  margin-top: 48px;
  border-top: 1px solid #e7e7e7;
  padding-top: 24px;
}
.sm-tabs-header {
  display: flex;
  gap: 16px;
  border-bottom: 2px solid #e7e7e7;
}
.sm-tab-btn {
  background: none;
  border: none;
  padding: 12px 20px;
  font-size: 16px;
  font-weight: 800;
  color: var(--amz-muted);
  cursor: pointer;
  position: relative;
  top: 2px;
}
.sm-tab-btn.active {
  color: #e77600;
  border-bottom: 3px solid #e77600;
}
.sm-tab-content {
  padding: 28px 0;
  font-size: 15px;
  line-height: 1.8;
  color: #2c3e50;
}
.sm-tab-content h2, .sm-tab-content h3 {
  color: #102b50;
  font-weight: 800;
  margin: 24px 0 12px;
}
.sm-tab-content table {
  width: 100%;
  max-width: 800px;
  border-collapse: collapse;
  margin: 16px 0 24px;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid #e2eaf5;
}
.sm-tab-content table th {
  background: #f4f8fe;
  color: #102b50;
  font-weight: 800;
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid #e2eaf5;
}
.sm-tab-content table td {
  padding: 12px 16px;
  border-bottom: 1px solid #edf2f9;
  color: #334d6e;
}
.sm-tab-content table tr:nth-child(even) td {
  background: #fafcff;
}

/* Mobile Sticky Bottom Bar */
.sm-mobile-sticky-bar {
  display: none;
}

/* RESPONSIVENESS */
@media (max-width: 960px) {
  .sm-amazon-grid {
    grid-template-columns: 48% 48%;
    gap: 20px;
  }
  .sm-buybox-card {
    grid-column: 1 / -1;
    position: static;
  }
}

@media (max-width: 768px) {
  .sm-amazon-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .sm-gallery-wrapper {
    flex-direction: column-reverse;
    position: static;
  }
  .sm-gallery-thumbs {
    flex-direction: row;
    width: 100%;
    max-height: none;
    overflow-x: auto;
    padding-bottom: 6px;
  }
  .sm-gallery-stage {
    min-height: 280px;
    padding: 12px;
  }
  .sm-product-name {
    font-size: 20px;
  }
  .sm-product-detail-page {
    padding-bottom: 95px;
  }

  /* Mobile Sticky Bottom Bar */
  .sm-mobile-sticky-bar {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: #ffffff;
    box-shadow: 0 -4px 18px rgba(0, 0, 0, 0.12);
    padding: 10px 14px;
    z-index: 99999;
    align-items: center;
    justify-content: space-between;
    box-sizing: border-box;
  }
  .sm-mobile-sticky-info {
    display: flex;
    flex-direction: column;
    max-width: 42%;
  }
  .sm-sticky-price {
    font-size: 17px;
    font-weight: 800;
    color: #0f1111;
  }
  .sm-sticky-title {
    font-size: 11px;
    color: var(--amz-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .sm-mobile-sticky-actions {
    display: flex;
    gap: 8px;
  }
  .sm-sticky-btn {
    padding: 10px 14px;
    font-size: 12px;
    font-weight: 800;
    border-radius: 20px;
    text-decoration: none !important;
    text-align: center;
  }
  .sm-sticky-cart {
    background: var(--amz-yellow);
    color: #0f1111 !important;
  }
  .sm-sticky-wa {
    background: #25d366;
    color: #ffffff !important;
  }
}
