/* ================= FONTS ================= */

@font-face {
  font-family: 'sf';
  src: url('/fonts/sf.otf') format('opentype');
}

/* ================= PC ================= */

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: white;
  color: #1a1a1a;
  font-family: 'sf';
}

/* ================= LAYOUT ================= */

.product-wrapper {
  max-width: 1200px;
  margin: auto;
  padding: 40px 20px;
}

.product-layout {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 60px;
}

/* ================= IMAGES ================= */

.product-images {
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin-left: 100px;
}

.image-frame {
  width: 70%;
  aspect-ratio: 1 / 1;
  background: #f8f8f8;
  border-radius: 14px;
  overflow: hidden;
}

.main-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.thumbnail-row {
  display: flex;
  gap: 12px;
  overflow-x: auto;
}

.thumbnail-row img {
  width: 70px;
  height: 70px;
  border-radius: 10px;
  object-fit: cover;
  cursor: pointer;
  opacity: 0.7;
  transition: 0.3s;
}

.thumbnail-row img:hover {
  opacity: 1;
}

/* ================= DETAILS ================= */

.product-details {
  display: flex;
  flex-direction: column;
}

.product-title {
  font-size: 28px;
  font-weight: 500;
  letter-spacing: 0.3px;
  margin-bottom: 12px;
}

.product-price {
  font-size: 20px;
  margin-bottom: 18px;
}

.old-price {
  text-decoration: line-through;
  color:  #7a7a7a;
  margin-right: 8px;
}

.new-price {
  font-weight: 500;
}

.product-description {
  color:  #7a7a7a;
  font-size: 14.5px;
  line-height: 1.7;
  margin-bottom: 30px;
}

/* ================= OPTIONS ================= */

.option-block {
  margin-bottom: 26px;
}

.option-label {
  display: block;
  font-size: 13px;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 5px;
  color: #444;
}

.option-label2 {
  display: block;
  font-size: 12px;
  margin-bottom: 20px;
  color: #444;
}

/* ================= COLORS ================= */

.color-header {
  display: flex;
  align-items: center;
  gap: 12px;
}

.color-title {
  font-size: 13px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: #444;
}

.lens-btn {
  background: none;
  border: none;
  padding: 0;
  margin-left: 8px;
  cursor: pointer;
  font-size: 18px;
  color: #000;
  display: flex;
  align-items: center;
}

.lens-btn:hover {
  color: #4169E1;
}

.lens-btn:focus {
  outline: none;
}

#colorPalette {
  margin-top: 20px;
}

.color-palette {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  width: 190%;        
}

.color-swatch {
  width: 70px;
  height: 70px;
  cursor: pointer;
  border: 1px solid lightgrey;
  transition: 0.25s;
}

.color-swatch:hover {
  transform: scale(1.1);
}

.color-swatch.active {
  outline: 2px solid gold;
  outline-offset: 3px;
}

.camera-modal {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: white;
  padding: 15px;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.2);
  z-index: 9999;
}

.camera-box video {
  width: 250px;
  border-radius: 8px;
}

.camera-controls {
  margin-top: 10px;
  display: flex;
  gap: 10px;
}

.camera-controls button {
  padding: 6px 12px;
  border: none;
  background: #4169E1;
  color: white;
  border-radius: 6px;
  cursor: pointer;
}

/* ================= QUALITY ================= */

#qualityOptions {
  margin-top: 20px;
}

.quality-options {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.quality-box {
  padding: 10px 16px;
  border-radius: 20px;
  border: 1px solid grey;
  font-size: 14px;
  cursor: pointer;
  transition: 0.25s;
}

.quality-box:hover {
  border-color: #4169E1;
}

.quality-box.active {
  background:#4169E1;
  color: white;
  border-color: #4169E1;
}

/* ================= QUANTITY ================= */

#quantityControl {
  margin-top: 30px;
}

.quantity-buttons {
  display: inline-flex;
  align-items: center;
  gap: 20px;
  margin-top: -100px;
}

.quantity-buttons button {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid #ccc;
  background: white;
  font-size: 18px;
  cursor: pointer;
  transition: 0.2s ease;
}

.quantity-buttons button:hover {
  background: #f2f2f2;
}

.quantity-buttons span {
  min-width: 110px;
  text-align: center;
  font-size: 18px;
  font-weight: 500;
  white-space: nowrap;
}

/* ================= CTA ================= */

.add-to-cart-btn {
  margin-top: 10px;
  padding: 16px;
  border-radius: 40px;
  border: none;
  align-items: center;
  background: #4169E1;
  color: white;
  font-size: 14px;
  letter-spacing: 1px;
  cursor: pointer;
  transition: 0.3s;
  width: 190px;
}

.add-to-cart-btn:hover {
  background: #000;
}

/* ================= IMAGE ZOOM OVERLAY ================= */

.image-zoom-overlay {
  position: fixed !important;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2147483647; 
}

.image-zoom-overlay img {
  max-width: 90vw;
  max-height: 90vh;
  object-fit: contain;
  border-radius: 12px;
}

.main-image {
  cursor: zoom-in;
  pointer-events: auto;
}

.cart-popup {
  position: fixed;
  top: 20px;
  right: 20px;
  background: #111;
  color: #fff;
  padding: 14px 20px;
  border-radius: 6px;
  transform: translateY(-20px);
  opacity: 0;
  transition: all 0.3s ease;
  z-index: 9999;
}

.cart-popup.show {
  transform: translateY(0);
  opacity: 1;
}

.cart-popup-content {
  display: flex;
  align-items: center;
  gap: 10px;
}

.cart-popup i {
  color: #4CAF50;
  font-size: 18px;
}

/* ================= COLOR PALETTE ================= */

#colorPalette {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.color-section-heading {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #888;
  margin: 14px 0 8px 0;
}

.color-section-heading:first-child {
  margin-top: 0;
}

.color-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.color-swatch-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  cursor: pointer;
}

.color-swatch-wrapper .color-swatch {
  width: 70px;
  height: 70px;
  border: 2px solid transparent;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
  transition: transform 0.15s ease, border-color 0.15s ease;
}

.color-swatch-wrapper .color-swatch:hover {
  transform: scale(1.12);
}

.color-swatch-wrapper .color-swatch.active {
  border-color: #333;
  transform: scale(1.12);
  box-shadow: 0 0 0 3px rgba(0,0,0,0.12);
}

.color-swatch-label {
  font-size: 0.6rem;
  color: #555;
  text-align: center;
  max-width: 42px;
  line-height: 1.2;
  word-break: break-word;
}


#colorPalette {
  display: flex !important;
  flex-direction: column !important;
  gap: 0 !important;
  width: 100% !important;
}

.color-section-heading {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #888;
  margin: 16px 0 10px 0;
}

.color-section-heading:first-child {
  margin-top: 0;
}

.color-grid {
  display: grid !important;
  grid-template-columns: repeat(auto-fill, 60px) !important;
  gap: 10px 0 !important;
  width: 190% !important;
}

.color-swatch-wrapper {
  width: 52px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  cursor: pointer;
}

.color-swatch-wrapper .color-swatch {
  width: 50px !important;
  height: 50px !important;
  min-width: 36px !important;
  min-height: 36px !important;
  border: 2px solid transparent !important;
  outline: none !important;
  box-shadow: 0 1px 4px rgba(0,0,0,0.2);
  transition: transform 0.15s ease;
}

.color-swatch-wrapper .color-swatch:hover {
  transform: scale(1.12) !important;
}

.color-swatch-wrapper .color-swatch.active {
  border: 2px solid #333 !important;
  outline: 2px solid gold !important;
  outline-offset: 2px !important;
  transform: scale(1.1) !important;
}

.color-swatch-label {
  font-size: 0.58rem;
  color: #666;
  text-align: center;
  width: 52px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.2;
}

.quantity-manual {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: -100px;
}

.quantity-input-field {
  width: 100px;
  height: 40px;
  border: 1px solid #ccc;
  border-radius: 8px;
  font-size: 16px;
  font-family: 'sf', sans-serif;
  font-weight: 500;
  text-align: center;
  padding: 0 10px;
  outline: none;
  transition: border-color 0.2s;
  -moz-appearance: textfield;
}

.quantity-input-field:focus {
  border-color: #4169E1;
}

.quantity-input-field::-webkit-outer-spin-button,
.quantity-input-field::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.quantity-unit-label {
  font-size: 15px;
  font-weight: 500;
  color: #1a1a1a;
}

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

@media (max-width: 768px) {

  /* ---------- LAYOUT ---------- */

  .product-wrapper {
    padding: 50px 14px;
  }

  .product-layout {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  /* ---------- IMAGES ---------- */

  .product-images {
    margin-left: 0;
    align-items: center;
  }

  .thumbnail-row {
    gap: 10px;
    padding-bottom: 6px;
  }

  .thumbnail-row img {
    width: 56px;
    height: 56px;
    border-radius: 8px;
  }

  /* ---------- DETAILS ---------- */

  .product-details {
    padding: 0 4px;
  }

  .product-title {
    font-size: 22px;
    margin-bottom: 10px;
  }

  .product-price {
    font-size: 18px;
    margin-bottom: 14px;
  }

  .product-description {
    font-size: 13.5px;
    margin-bottom: 22px;
  }

  /* ---------- OPTIONS ---------- */

  .option-block {
    margin-bottom: 22px;
  }

  .option-label {
    font-size: 12px;
    margin-bottom: 6px;
  }

  .option-label2 {
    font-size: 11px;
    margin-bottom: 14px;
  }

  /* ---------- COLORS ---------- */

  .color-palette {
    gap: 10px;
  }

  .color-swatch {
    width: 28px;
    height: 28px;
  }

.color-palette {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  width: 100%;
  justify-content: center; 
}

  .lens-btn {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: #f2f2f2;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: 10px;
    transition: all 0.2s ease;
  }

  .lens-btn:active {
    background: #e0e0e0;
    transform: scale(0.95);
  }

  /* ---------- CLEAN MINIMAL CENTER CAMERA ---------- */

.camera-modal {
  position: fixed;
  top: 50% !important;
  left: 50% !important;
  bottom: auto !important;
  right: auto !important;
  transform: translate(-50%, -50%);
  background: white;
  padding: 10px;
  border-radius: 14px;
  box-shadow: 0 15px 40px rgba(0,0,0,0.25);
  z-index: 9999;
}

.camera-box {
  width: 170px;
  height: 170px;
  overflow: hidden;
  border-radius: 10px;
  background: black;
}

.camera-box video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.camera-controls {
  margin-top: 20px;
  margin-bottom: 20px;
  display: flex;
  justify-content: center;
  gap: 6px;
}

.camera-controls button {
  padding: 10px 20px;
  font-size: 11px;
  border-radius: 6px;
}

  /* ---------- QUALITY ---------- */

  .quality-options {
    gap: 10px;
  }

  .quality-box {
    padding: 8px 14px;
    font-size: 13px;
  }

  /* ---------- QUANTITY ---------- */

  .quantity-buttons button {
    width: 34px;
    height: 34px;
    font-size: 16px;
  }

  .quantity-buttons span {
    width: 36px;
    font-size: 14px;
  }

  .quantity-input input {
  width: 190px;
  }

  /* ---------- CTA ---------- */

  .add-to-cart-btn {

    bottom: 14px;
    width: 100%;
    padding: 16px;
    border-radius: 999px;
    font-size: 15px;
    z-index: 10;
    margin-bottom: 50px;
  }

  /* ---------- IMAGE ZOOM ---------- */

  .image-zoom-overlay img {
    max-width: 94vw;
    max-height: 94vh;
    border-radius: 10px;
  }

  .color-grid {
    grid-template-columns: repeat(auto-fill, 48px) !important;
    gap: 10px 0px !important;
  width:100% !important;
}

  .color-swatch-wrapper {
    width: 48px;
  }

  .color-swatch-wrapper .color-swatch {
  width: 45px !important;
  height: 45px !important;
  }
  
  .color-swatch-label {
    width: 48px;
  }

  .quantity-manual {
    margin-top: 0;
  }

  .quantity-input-field {
    width: 100px;
    height: 38px;
    font-size: 15px;
  }
}
