/* ===== GLOBAL RESETS & BASE STYLES ===== */
html {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

*, *:before, *:after {
  box-sizing: inherit;
}

body {
  font-family: Arial, sans-serif;
  background: #fff;
  color: #333;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  margin: 0;
  padding: 0;
  overflow-x: hidden;
}

/* ===== CSS VARIABLES FOR UNIFORM COLORS ===== */
:root {
  --btn-default-bg: #e1e1e1;
  --btn-default-text: #1e2a3a;
  --btn-hover-bg: #2c7da0;
  --btn-hover-text: #ffffff;
  --btn-active-bg: #1f5e7a;
  --btn-border-radius: 8px;
  --transition-speed: 0.2s;
}

/* ===== HEADER STYLES ===== */
header {
  background-color: #1e4d61;
  color: #fff;
  padding-top: 33px;
  padding-right: 20px;
  padding-bottom: 30px;
  padding-left: 20px;
  text-align: center;
  font-size: 36px;
  font-weight: bold;
  letter-spacing: 1px;
}

/* ===== MAIN LAYOUT ===== */
.container {
  display: flex;
  max-width: 1080px;
  width: 100%;
  padding: 40px 20px;
  background: #fff;
  flex: 1;
  margin: 0 auto;
}

/* ===== PRODUCT IMAGE SECTION ===== */
.product-image {
  flex: 1 1 50%;
  padding: 20px;
}

.main-display {
  position: relative;
  width: 100%;
  padding-top: 100%; /* 1:1 aspect ratio */
  overflow: hidden;
}

.main-display img,
.main-display iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.thumbnails {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 10px;
  gap: 13px;
}

/* ===== UNIFORM BUTTON STYLES (thumb, qty, action, modal, etc.) ===== */
.thumb-button,
.qty-btn,
.action-btn,
.close-modal-btn,
#infoModalCloseBtn,
#submit-order-btn {
  background-color: var(--btn-default-bg);
  color: var(--btn-default-text);
  border: none;
  border-radius: var(--btn-border-radius);
  cursor: pointer;
  transition: all var(--transition-speed) ease;
  font-weight: bold;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

/* Specific sizes (keep original dimensions) */
.thumb-button {
  width: 38px;
  height: 38px;
  font-size: 16px;
}

.qty-btn {
  padding: 5px 12px;
  font-size: 20px;
}

.action-btn {
  padding: 10px 7px;
  font-size: 0.8em;
  min-width: 96px;
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.close-modal-btn,
#infoModalCloseBtn,
#submit-order-btn {
  padding: 10px 20px;
  font-size: 16px;
}

/* Hover & Active states – uniform for all */
.thumb-button:hover,
.qty-btn:hover,
.action-btn:hover,
.close-modal-btn:hover,
#infoModalCloseBtn:hover,
#submit-order-btn:hover {
  background-color: var(--btn-hover-bg);
  color: var(--btn-hover-text);
}

.thumb-button.active {
  background-color: var(--btn-hover-bg);
  color: var(--btn-hover-text);
}

/* Primary CTA button (Buy Now / Explore Now) */
.cta-button {
  background-color: var(--btn-hover-bg);
  color: var(--btn-hover-text);
  border: none;
  padding: 10px 20px;
  font-size: 26px;
  cursor: pointer;
  border-radius: 6px;
  transition: background var(--transition-speed) ease;
  text-decoration: none;
  text-align: center;
  display: inline-block;
  font-weight: bold;
}

.cta-button:hover {
  background-color: var(--btn-active-bg);
}

/* ===== PRODUCT DETAILS SECTION ===== */
.product-details {
  flex: 1 1 50%;
  padding: 18px;
}

.product-details h1 {
  font-size: 36px;
  margin: -9px 0 15px 0;
  line-height: 1.4em;
}

.price {
  font-size: 30px;
  font-weight: bold;
  margin-bottom: 20px;
}

.additional-info {
  margin-top: 30px;
  font-size: 15px;
  line-height: 1.6;
  color: #444;
}

/* ===== PRICING BOX STYLES ===== */
.pricing-box {
  background-color: #f8f9fa;
  border: 1px solid #dee2e6;
  border-radius: 8px;
  padding: 20px;
  margin: 25px 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.pricing-box .price-row,
.pricing-box .total-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 16px;
}

.pricing-box .label {
  color: #495057;
}

.pricing-box .value {
  font-weight: bold;
  color: #212529;
}

.quantity-controls {
  display: flex;
  align-items: center;
  border: 1px solid #ccc;
  border-radius: 5px;
  overflow: hidden;
}

#qty-minus {
  border-right: 1px solid #ccc;
}

#qty-plus {
  border-left: 1px solid #ccc;
}

.qty-display {
  padding: 5px 15px;
  font-size: 16px;
  font-weight: bold;
  background-color: white;
}

.price-separator {
  border: none;
  border-top: 1px dashed #ced4da;
  margin: 5px 0;
}

.total-row .label {
  font-weight: bold;
}

.total-price-value {
  font-size: 28px;
  font-weight: bold;
  color: #0264a5;
}

/* ===== FOOTER STYLES ===== */
footer {
  background: #1e4d61;
  color: #333;
  padding: 10px 20px;
  text-align: center;
  margin-top: auto;
}

footer p {
  margin: 8px 0;
  font-size: 11px;
  line-height: 1.5em;
  color: #fff;
  letter-spacing: 0.1em;
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 500px) {
  .container {
    flex-direction: column;
    padding: 0;
  }

  .product-image,
  .product-details {
    flex: 1 1 100%;
    padding: 20px;
    width: 100%;
  }

  header {
    padding: 20px 20px;
    font-size: 30px;
  }

  footer {
    padding: 0px 20px;
  }

  .product-image {
    display: flex;
    flex-direction: column;
    align-items: stretch;
  }

  .main-display {
    aspect-ratio: 1 / 1;
  }

  .product-details h1 {
    font-size: 23px;
    margin-top: -10px;
    line-height: 1.4em;
  }
}

@media (max-width: 400px) {
  .thumb-button {
    width: 32px;
    height: 32px;
    font-size: 14px;
  }

  .product-details p,
  .additional-info {
    font-size: 17px;
  }

  .product-image,
  .product-details,
  header,
  footer {
    padding-left: 15px;
    padding-right: 15px;
  }
}