/* ===== Reset & Base ===== */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: #dce3ed;
  color: #333;
  max-width: 480px;
  margin: 0 auto;
  padding-bottom: 70px;
  min-height: 100vh;
  position: relative;
}

img {
  max-width: 100%;
  display: block;
}

button {
  cursor: pointer;
  border: none;
  background: none;
  font-family: inherit;
}

a {
  text-decoration: none;
  color: inherit;
}

/* ===== Top Header ===== */
.top-header {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 12px;
  z-index: 10;
  background: transparent;
}

.header-btn {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #555;
  border-radius: 50%;
  transition: background 0.2s;
}

.header-btn:hover {
  background: rgba(0,0,0,0.05);
}

.header-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.cart-btn {
  position: relative;
}

.cart-badge {
  position: absolute;
  top: -2px;
  right: -2px;
  background: #e74c3c;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

/* ===== Product Carousel ===== */
.product-carousel {
  position: relative;
  background: linear-gradient(135deg, #c5cdd8 0%, #e8ecf1 50%, #d0d7e2 100%);
  overflow: hidden;
  aspect-ratio: 1 / 1;
}

.carousel-track {
  display: flex;
  width: 100%;
  height: 100%;
  transition: transform 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.carousel-slide {
  min-width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #fff;
  padding: 10px;
}

.carousel-slide img {
  max-height: 100%;
  max-width: 100%;
  object-fit: contain;
}

.carousel-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.7);
  border-radius: 50%;
  color: #555;
  backdrop-filter: blur(4px);
  transition: background 0.2s;
}

.carousel-arrow:hover {
  background: rgba(255,255,255,0.9);
}

.carousel-arrow.right {
  right: 10px;
}

.carousel-arrow.left {
  left: 10px;
}

.carousel-counter {
  position: absolute;
  bottom: 12px;
  right: 12px;
  background: rgba(0,0,0,0.5);
  color: #fff;
  font-size: 12px;
  padding: 3px 10px;
  border-radius: 12px;
  font-weight: 500;
}

/* ===== Price Section ===== */
.price-section {
  background: #e8531e;
  color: #fff;
  padding: 14px 16px 10px;
}

.price-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.price-left {
  display: flex;
  align-items: baseline;
  gap: 6px;
}

.discount-badge {
  background: #c0392b;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 4px;
}

.discount-badge.small {
  font-size: 11px;
  padding: 2px 6px;
}

.price-currency {
  font-size: 16px;
  font-weight: 600;
}

.price-value {
  font-size: 36px;
  font-weight: 800;
  letter-spacing: -1px;
}

.price-right {
  text-align: right;
  font-size: 12px;
}

.flash-icon {
  font-size: 14px;
}

.flash-label {
  font-weight: 600;
  font-size: 13px;
}

.countdown {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 4px;
  font-size: 12px;
}

.countdown-boxes {
  display: flex;
  align-items: center;
  gap: 2px;
}

.countdown-box {
  background: rgba(0,0,0,0.3);
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: 700;
  font-size: 13px;
  min-width: 28px;
  text-align: center;
}

.countdown-sep {
  font-weight: 700;
  margin: 0 1px;
}

.price-original {
  font-size: 13px;
  text-decoration: line-through;
  opacity: 0.75;
  margin-top: 2px;
}

/* ===== Savings Tags ===== */
.savings-tags {
  display: flex;
  gap: 8px;
  padding: 10px 16px;
  background: #fff;
  flex-wrap: wrap;
}

.tag {
  font-size: 12px;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: 20px;
}

.tag-red {
  color: #e74c3c;
  border: 1.5px solid #e74c3c;
  background: #fdf0ef;
}

.tag-outline {
  color: #555;
  border: 1.5px solid #ccc;
  background: #f9f9f9;
}

/* ===== Product Info ===== */
.product-info {
  background: #fff;
  padding: 14px 16px 12px;
}

.product-title-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.product-title {
  font-size: 17px;
  font-weight: 600;
  color: #222;
  line-height: 1.3;
}

.bookmark-btn {
  color: #aaa;
  flex-shrink: 0;
  padding: 4px;
  transition: color 0.2s;
}

.bookmark-btn:hover {
  color: #e74c3c;
}

.product-rating {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 8px;
  font-size: 13px;
  color: #777;
}

.star {
  font-size: 14px;
}

.rating-value {
  font-weight: 700;
  color: #333;
}

.rating-count {
  color: #2196F3;
}

.rating-sep {
  color: #ccc;
  margin: 0 4px;
}

/* ===== Delivery Info ===== */
.delivery-info {
  background: #fff;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.delivery-row {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

.delivery-icon {
  font-size: 20px;
  flex-shrink: 0;
  width: 28px;
  text-align: center;
}

.delivery-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 14px;
  color: #333;
}

.shipping-old {
  font-size: 12px;
  color: #999;
}

.shipping-free {
  font-size: 13px;
  color: #27ae60;
  font-weight: 600;
}

.cancel-text {
  font-size: 12px;
  color: #999;
}

/* ===== Divider ===== */
.divider {
  border: none;
  height: 8px;
  background: #f0f2f5;
}

/* ===== Reviews ===== */
.reviews-section {
  background: #fff;
  padding: 16px;
}

.section-title {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 14px;
  color: #222;
}

.reviews-summary {
  display: flex;
  align-items: baseline;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid #f0f0f0;
}

.reviews-summary-score {
  font-size: 32px;
  font-weight: 800;
  color: #222;
}

.reviews-summary-max {
  font-size: 14px;
  color: #999;
  margin-left: 2px;
  margin-right: 12px;
}

.reviews-summary-stars {
  font-size: 16px;
}

.review-card {
  padding: 14px 0;
  border-bottom: 1px solid #f0f0f0;
}

.review-card:last-child {
  border-bottom: none;
}

.review-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
}

.review-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
}

.review-name {
  font-size: 14px;
  font-weight: 600;
  color: #222;
  display: block;
}

.review-time {
  font-size: 12px;
  color: #2196F3;
}

.review-stars {
  font-size: 13px;
  margin-bottom: 6px;
  letter-spacing: 1px;
}

.review-text {
  font-size: 14px;
  color: #444;
  line-height: 1.5;
  margin-bottom: 8px;
}

.review-photo {
  width: 120px;
  height: 90px;
  object-fit: cover;
  border-radius: 8px;
}

/* ===== Seller Section ===== */
.seller-section {
  background: #fff;
  padding: 16px;
}

.seller-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.seller-logo {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.norisk-logo {
  font-size: 11px;
  font-weight: 800;
  color: #222;
  text-transform: uppercase;
  letter-spacing: 1px;
  border: 2px solid #222;
  padding: 4px 6px;
  border-radius: 4px;
}

.seller-info {
  display: flex;
  flex-direction: column;
}

.seller-name {
  font-size: 15px;
  font-weight: 700;
  color: #222;
}

.seller-products {
  font-size: 12px;
  color: #999;
}

.follow-btn {
  border: 1.5px solid #333;
  color: #333;
  padding: 8px 20px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  transition: all 0.2s;
}

.follow-btn:hover {
  background: #333;
  color: #fff;
}

/* ===== Description ===== */
.description-section {
  background: #fff;
  padding: 16px;
}

.description-text {
  font-size: 14px;
  line-height: 1.7;
  color: #555;
}

/* ===== Accordion ===== */
.accordion-section {
  background: #fff;
}

.accordion-item {
  border-bottom: 1px solid #f0f0f0;
}

.accordion-header {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px;
  font-size: 15px;
  font-weight: 600;
  color: #333;
  transition: background 0.2s;
}

.accordion-header:hover {
  background: #fafafa;
}

.accordion-chevron {
  transition: transform 0.3s;
  color: #999;
}

.accordion-item.open .accordion-chevron {
  transform: rotate(180deg);
}

.accordion-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, padding 0.3s ease;
}

.accordion-item.open .accordion-body {
  max-height: 400px;
  padding: 0 16px 16px;
}

.accordion-body p {
  font-size: 14px;
  color: #666;
  line-height: 1.5;
}

.accordion-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.accordion-list li {
  font-size: 14px;
  color: #555;
  padding: 8px 0;
  border-bottom: 1px solid #f5f5f5;
  line-height: 1.4;
}

.accordion-list li:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

/* ===== Trust Badges ===== */
.trust-badges {
  background: #fff;
  display: flex;
  justify-content: center;
  gap: 24px;
  padding: 16px;
  border-top: 1px solid #f0f0f0;
}

.trust-item {
  font-size: 13px;
  color: #666;
  font-weight: 500;
}

/* ===== App Links ===== */
.app-links {
  background: #fff;
  display: flex;
  justify-content: center;
  gap: 12px;
  padding: 16px;
  border-top: 1px solid #f0f0f0;
}

.app-badge img {
  height: 40px;
  border-radius: 6px;
}

/* ===== Bottom Bar ===== */
.bottom-bar {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 480px;
  display: flex;
  align-items: center;
  background: #fff;
  border-top: 1px solid #eee;
  z-index: 100;
  height: 60px;
  box-shadow: 0 -2px 10px rgba(0,0,0,0.05);
}

.bottom-bar-icon {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 6px 14px;
  font-size: 10px;
  color: #777;
  border-right: 1px solid #eee;
  height: 100%;
  transition: color 0.2s;
}

.bottom-bar-icon:hover {
  color: #333;
}

.bottom-bar-icon span {
  font-size: 10px;
}

.btn-add-to-cart-bar {
  flex: 1;
  height: 100%;
  font-size: 13px;
  font-weight: 600;
  color: #333;
  text-align: center;
  line-height: 1.3;
  transition: background 0.2s;
}

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

.btn-buy-now-bar {
  flex: 1.2;
  height: 100%;
  background: #e74c6f;
  color: #fff;
  font-size: 13px;
  font-weight: 500;
  text-align: center;
  line-height: 1.3;
  border-radius: 24px 0 0 0;
  transition: background 0.2s;
}

.btn-buy-now-bar:hover {
  background: #d63d60;
}

.btn-buy-now-bar strong {
  font-weight: 800;
}

/* ===== Purchase Modal ===== */
.bottom-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 200;
}

.modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.4);
  animation: fadeIn 0.3s;
}

.modal-content {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 480px;
  background: #fff;
  border-radius: 16px 16px 0 0;
  max-height: 85vh;
  overflow-y: auto;
  animation: slideUp 0.35s cubic-bezier(0.25, 0.8, 0.25, 1);
}

@keyframes fadeIn {
  from { opacity: 0; } to { opacity: 1; }
}

@keyframes slideUp {
  from { transform: translateX(-50%) translateY(100%); }
  to { transform: translateX(-50%) translateY(0); }
}

.modal-header {
  padding: 12px 16px 0;
  position: sticky;
  top: 0;
  background: #fff;
  border-radius: 16px 16px 0 0;
  z-index: 2;
}

.modal-drag-handle {
  width: 40px;
  height: 4px;
  background: #ddd;
  border-radius: 4px;
  margin: 0 auto 12px;
}

.modal-product-summary {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding-bottom: 16px;
  border-bottom: 1px solid #f0f0f0;
}

.modal-product-img {
  width: 64px;
  height: 64px;
  border-radius: 8px;
  object-fit: cover;
}

.modal-product-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.modal-price {
  display: flex;
  align-items: baseline;
  gap: 4px;
}

.modal-price .price-currency {
  font-size: 14px;
  color: #222;
}

.modal-price .price-value {
  font-size: 24px;
  color: #222;
}

.modal-product-info .price-original {
  color: #999;
  font-size: 12px;
  text-decoration: line-through;
  opacity: 1;
}

.modal-free-shipping {
  font-size: 12px;
  color: #27ae60;
  font-weight: 600;
}

.modal-pix {
  font-size: 12px;
  color: #777;
}

.modal-close {
  font-size: 18px;
  color: #999;
  padding: 4px;
  transition: color 0.2s;
}

.modal-close:hover {
  color: #333;
}

/* Modal Body */
.modal-body {
  padding: 16px;
}

.modal-section-title {
  font-size: 13px;
  font-weight: 700;
  color: #333;
  margin-bottom: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.size-guide-link {
  font-size: 13px;
  color: #2196F3;
  font-weight: 500;
}

/* Models Grid */
.models-grid {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 12px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.models-grid::-webkit-scrollbar {
  display: none;
}

.model-card {
  min-width: 72px;
  text-align: center;
  cursor: pointer;
  padding: 6px;
  border: 2px solid transparent;
  border-radius: 8px;
  transition: border-color 0.2s;
}

.model-card.active {
  border-color: #2196F3;
}

.model-card img {
  width: 56px;
  height: 56px;
  object-fit: contain;
  margin: 0 auto;
}

.model-card span {
  display: block;
  font-size: 10px;
  color: #555;
  margin-top: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 72px;
}

/* Flash Offer Banner */
.flash-offer-banner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #e74c6f;
  color: #fff;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  margin: 12px 0 16px;
}

/* Sizes Grid */
.sizes-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 16px;
}

.size-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 10px 8px;
  border: 2px solid #e8e8e8;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
}

.size-card:hover {
  border-color: #ccc;
}

.size-card.active {
  border-color: #e74c6f;
  background: #fef0f3;
}

.size-card.active span {
  color: #e74c6f;
  font-weight: 600;
}

.size-card img {
  width: 40px;
  height: 40px;
  object-fit: contain;
}

.size-card span {
  font-size: 13px;
  font-weight: 500;
  color: #333;
}

/* Modal Trust */
.modal-trust {
  display: flex;
  justify-content: center;
  gap: 16px;
  font-size: 13px;
  color: #777;
  padding: 12px 0;
}

/* Modal Actions */
.modal-actions {
  padding: 12px 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  position: sticky;
  bottom: 0;
  background: #fff;
}

.btn-buy {
  width: 100%;
  padding: 16px;
  background: #e74c6f;
  color: #fff;
  font-size: 16px;
  font-weight: 800;
  border-radius: 28px;
  letter-spacing: 0.5px;
  transition: background 0.2s, transform 0.15s;
}

.btn-buy:hover {
  background: #d63d60;
}

.btn-buy:active {
  transform: scale(0.98);
}

.btn-add-cart {
  width: 100%;
  padding: 14px;
  background: #fce4ec;
  color: #e74c6f;
  font-size: 15px;
  font-weight: 700;
  border-radius: 28px;
  transition: background 0.2s, transform 0.15s;
}

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

.btn-add-cart:active {
  transform: scale(0.98);
}

/* ===== Responsive ===== */
@media (max-width: 480px) {
  body {
    max-width: 100%;
  }
  .bottom-bar, .modal-content {
    max-width: 100%;
  }
}
