/* Cart drawer + cart/checkout pages */

.fs-cart-actions {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 8px;
}

.fs-qty-btn,
.fs-remove-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 1px solid #ddd;
  border-radius: 4px;
  background: #fff;
  color: #333;
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  transition: background .15s, border-color .15s, color .15s;
}

.fs-qty-btn:hover,
.fs-remove-btn:hover {
  border-color: #c9a227;
  color: #c9a227;
}

.fs-qty-btn:disabled,
.fs-remove-btn:disabled {
  opacity: .45;
  cursor: not-allowed;
}

.fs-qty-val {
  min-width: 28px;
  text-align: center;
  font-size: 13px;
  font-weight: 600;
}

.fs-remove-btn {
  margin-left: 4px;
  color: #b45309;
}

.fs-empty-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 72px;
  height: 72px;
  margin: 0 auto 16px;
  border-radius: 50%;
  background: #f3f3f3;
  color: #8a8a8a;
}

.fs-empty-icon svg {
  display: block;
}

.fs-success-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 72px;
  height: 72px;
  margin: 0 auto 16px;
  border-radius: 50%;
  background: #ecfdf5;
  color: #0f6b4c;
}

.fs-success-icon svg {
  display: block;
}

.fs-checkout-success {
  text-align: center;
  max-width: 520px;
  margin: 24px auto;
  padding: 48px 28px !important;
  background: #fff;
  border: 1px solid #eee;
  border-radius: 12px;
  box-sizing: border-box;
}

.fs-checkout-success-title {
  margin: 0 0 10px;
  font-size: 24px;
  font-weight: 600;
  color: #222;
  text-transform: none !important;
  letter-spacing: 0 !important;
  line-height: 1.3;
}

.fs-checkout-success .fs-muted {
  margin: 0 0 18px;
  line-height: 1.55;
  font-size: 15px;
}

.fs-checkout-success-ref {
  display: inline-flex;
  flex-direction: column;
  gap: 4px;
  margin: 0 0 22px;
  padding: 12px 18px;
  background: #f8faf8;
  border: 1px dashed #cfe8dc;
  border-radius: 8px;
  font-size: 13px;
  color: #666;
}

.fs-checkout-success-ref strong {
  font-size: 15px;
  color: #222;
  word-break: break-all;
}

.fs-checkout-success-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin: 0;
}

.fs-checkout-success-actions .btn {
  min-width: 170px;
}

/* Header cart dropdown */
nav .cart-wrapper {
  overflow: visible !important;
  max-width: 360px !important;
  padding: 12px !important;
  box-sizing: border-box;
}

.cart-wrapper > .container {
  padding-left: 16px !important;
  padding-right: 16px !important;
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box;
}

.cart-wrapper .cart-block,
.cart-wrapper #fs-cart-items {
  float: none !important;
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 !important;
  padding: 16px 4px 8px !important;
  overflow: visible !important;
  box-sizing: border-box;
}

.cart-wrapper .cart-block-buttons {
  float: none !important;
  width: 100% !important;
  margin: 0 !important;
  padding: 8px 4px 12px !important;
  box-sizing: border-box;
}

.cart-wrapper .cart-block-buttons .btn {
  white-space: nowrap;
}

.fs-drawer-empty {
  text-align: center;
  padding: 8px 8px 4px;
  max-width: 100%;
  margin: 0 auto;
  box-sizing: border-box;
}

.fs-drawer-empty .fs-empty-icon {
  width: 56px;
  height: 56px;
  margin-bottom: 12px;
}

.fs-drawer-empty-title {
  margin: 0 0 8px;
  font-size: 15px;
  font-weight: 600;
  color: #222;
  line-height: 1.35;
  white-space: normal !important;
  word-break: normal;
  overflow: visible !important;
  text-overflow: clip !important;
  text-transform: none !important;
  letter-spacing: 0 !important;
}

.fs-drawer-empty-text {
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
  color: #777;
  white-space: normal !important;
  overflow: visible !important;
  text-transform: none !important;
}

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

.fs-drawer-item {
  padding: 12px 0 !important;
  border-bottom: 1px solid #eee;
  box-sizing: border-box;
}

.fs-drawer-item:last-child {
  border-bottom: 0;
}

.fs-drawer-item .image {
  float: left;
  width: 64px;
  margin-right: 12px;
}

.fs-drawer-item .image img {
  width: 60px;
  height: 60px;
  object-fit: cover;
  border-radius: 6px;
}

.fs-drawer-item .text {
  overflow: hidden;
  padding-right: 4px;
}

.fs-drawer-item .title {
  display: block;
  font-weight: 600;
  margin-bottom: 2px;
}

.fs-drawer-item .price {
  display: block;
  font-size: 13px;
  color: #666;
}

.fs-drawer-total {
  text-align: center;
  margin: 12px 0 4px;
}

.cart-wrapper .cart-items .qty,
.cart-wrapper .fs-drawer-list .qty {
  display: none !important;
}

/* Cart / checkout pages */
.fs-cart-shell,
.fs-checkout-shell {
  padding: 24px 0 48px;
}

.fs-cart-layout,
.fs-checkout-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(280px, 0.9fr);
  gap: 28px;
  align-items: start;
}

@media (max-width: 900px) {
  .fs-cart-layout,
  .fs-checkout-layout {
    grid-template-columns: 1fr;
  }
}

.fs-cart-main {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.fs-cart-item {
  display: grid !important;
  grid-template-columns: 96px minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  padding: 20px !important;
  margin: 0 !important;
  background: #fff !important;
  border: 1px solid #eee;
  border-radius: 10px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
  box-sizing: border-box;
  overflow: visible !important;
  position: relative;
}

.fs-cart-item-media {
  display: block;
  width: 96px;
  height: 96px;
  border-radius: 8px;
  overflow: hidden;
  background: #f5f5f5;
  flex-shrink: 0;
}

.fs-cart-item-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.fs-cart-item-body {
  min-width: 0;
  padding-right: 4px;
}

.fs-cart-item-title {
  display: block;
  font-weight: 600;
  color: #222;
  margin-bottom: 4px;
  line-height: 1.35;
}

.fs-cart-item-meta {
  font-size: 13px;
  color: #777;
  margin-bottom: 6px;
}

.fs-cart-item-controls {
  text-align: right;
  padding-left: 8px;
}

.fs-cart-line {
  display: block;
  font-size: 15px;
  white-space: nowrap;
}

.fs-cart-empty {
  text-align: center;
  max-width: 440px;
  margin: 24px auto;
  padding: 48px 28px !important;
  background: #fff;
  border: 1px solid #eee;
  border-radius: 12px;
  box-sizing: border-box;
}

.fs-cart-empty-title {
  margin: 0 0 8px;
  font-size: 22px;
  font-weight: 600;
  color: #222;
  text-transform: none !important;
  letter-spacing: 0 !important;
  line-height: 1.3;
}

.fs-cart-empty h3 {
  margin: 0 0 8px;
  font-size: 22px;
  font-weight: 600;
  color: #222;
  text-transform: none !important;
  letter-spacing: 0 !important;
  line-height: 1.3;
}

.fs-cart-empty .fs-muted {
  margin: 0 0 20px;
  line-height: 1.5;
  font-size: 14px;
}

.fs-cart-empty .btn {
  min-width: 180px;
}

.fs-muted {
  color: #777;
  font-size: 13px;
}

.fs-cart-summary,
.fs-checkout-card {
  background: #fff;
  border: 1px solid #eee;
  border-radius: 10px;
  padding: 22px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}

.fs-cart-summary {
  position: sticky;
  top: 90px;
}

.fs-cart-summary h3,
.fs-checkout-card h3 {
  margin: 0 0 16px;
  font-size: 18px;
}

.fs-cart-summary-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
  font-size: 14px;
}

.fs-cart-summary-row.total {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid #e5e5e5;
  font-size: 16px;
  font-weight: 600;
}

.fs-cart-summary .btn,
.fs-checkout-card .btn {
  width: 100%;
  margin-top: 10px;
}

.fs-checkout-card .form-group {
  margin-bottom: 14px;
}

.fs-pay-methods {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.fs-pay-methods .btn {
  width: auto;
  margin: 0;
}

.fs-pay-methods .btn.is-active {
  background: #c9a227;
  border-color: #c9a227;
  color: #fff;
}

.fs-bank-panel {
  margin-top: 16px;
  padding: 16px;
  border: 1px solid #e8dfc0;
  background: #fffdf6;
  border-radius: 8px;
  line-height: 1.55;
}

.fs-bank-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 6px 0;
  border-bottom: 1px dashed #eee;
  font-size: 14px;
}

.fs-bank-row:last-of-type {
  border-bottom: 0;
}

.fs-proof-box {
  margin-top: 16px;
}

.fs-proof-box input[type="file"] {
  display: block;
  margin: 8px 0 12px;
}

.fs-checkout-err {
  color: #b91c1c;
  margin-top: 10px;
  display: none;
}

.fs-checkout-ok {
  color: #0f6b4c;
  margin-top: 10px;
  display: none;
}

.fs-product-qty {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 12px 0 16px;
}

.fs-product-qty label {
  margin: 0 8px 0 0;
  font-weight: 600;
}

@media (max-width: 640px) {
  .fs-cart-item {
    grid-template-columns: 72px minmax(0, 1fr);
    padding: 14px !important;
    gap: 12px;
  }

  .fs-cart-item-media {
    width: 72px;
    height: 72px;
  }

  .fs-cart-item-controls {
    grid-column: 1 / -1;
    text-align: left;
    padding-left: 0;
    padding-top: 4px;
  }
}

/* Product detail page */
.fs-product-page .product-flex-gallery {
  position: relative;
  margin-bottom: 28px;
}

.fs-product-gallery-shell {
  background: #f8fafc;
  border: 1px solid #e8e8e8;
  border-radius: 10px;
  overflow: hidden;
  min-height: 320px;
}

.fs-product-gallery-host,
#fs-product-gallery.fs-product-gallery-host {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  width: 100%;
}

.fs-product-photo--loading {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 280px;
  margin: 0;
  color: #64748b;
  font-size: 14px;
}

.fs-product-gallery,
#fs-product-gallery {
  width: 100%;
}

.fs-product-gallery .fs-product-photo,
.fs-product-gallery .fs-product-photo img,
#fs-product-gallery img {
  display: block !important;
  width: 100%;
  max-width: 100%;
  height: auto;
  min-height: 280px;
  max-height: 560px;
  object-fit: contain;
  background: #fff;
}

.fs-product-gallery .fs-product-photo {
  margin: 0;
}

.fs-product-gallery--multi.owl-carousel .owl-item img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
}

.fs-product-buy-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: 16px;
}

.fs-product-page .product-flex-gallery .btn.btn-buy {
  position: static;
  width: auto;
  min-width: 160px;
  height: auto;
  min-height: 48px;
  padding: 12px 20px;
  border-radius: 999px;
  font-size: 14px;
  line-height: 1.2;
  overflow: visible;
}

.fs-product-page .product-flex-gallery .btn.btn-buy:before,
.fs-product-page .product-flex-gallery .btn.btn-buy:after {
  position: static;
  display: inline;
  line-height: inherit;
  transform: none !important;
  width: auto;
  height: auto;
}

.fs-product-page .product-flex-gallery .btn.btn-buy:before {
  margin-right: 8px;
}

.fs-product-page .product-flex-info .title[data-fs-no-watermark="1"]:before,
.fs-product-page .product-flex-info .title[data-title=""]:before {
  display: none;
}

.fs-product-page .product-flex-info .title {
  position: relative;
  z-index: 2;
}

.fs-product-gallery.fs-product-gallery--single,
.fs-product-gallery.fs-product-gallery--single .fs-product-photo,
.fs-product-gallery.fs-product-gallery--single img,
#fs-product-gallery.fs-product-gallery--single,
#fs-product-gallery.fs-product-gallery--single img {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
}

/* Mixed image + video gallery */
.fs-product-gallery--media {
  display: block !important;
}

.fs-gallery-stage {
  position: relative;
  width: 100%;
  min-height: 280px;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.fs-gallery-stage .fs-product-photo,
.fs-gallery-stage .fs-product-photo img {
  width: 100%;
  margin: 0;
}

.fs-gallery-video,
.fs-gallery-embed {
  display: block;
  width: 100%;
  max-width: 100%;
  min-height: 280px;
  max-height: 560px;
  background: #0f172a;
}

.fs-gallery-embed {
  aspect-ratio: 16 / 9;
  min-height: 240px;
  border: 0;
}

.fs-gallery-video {
  object-fit: contain;
  height: auto;
}

.fs-gallery-thumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 12px;
  background: #f8fafc;
  border-top: 1px solid #e8e8e8;
}

.fs-gallery-thumb {
  position: relative;
  width: 72px;
  height: 72px;
  padding: 0;
  border: 2px solid transparent;
  border-radius: 8px;
  overflow: hidden;
  background: #e2e8f0;
  cursor: pointer;
  flex: 0 0 auto;
}

.fs-gallery-thumb img {
  width: 100% !important;
  height: 100% !important;
  min-height: 0 !important;
  max-height: none !important;
  object-fit: cover;
  display: block !important;
}

.fs-gallery-thumb.is-active {
  border-color: #0f6b4c;
  box-shadow: 0 0 0 1px #0f6b4c;
}

.fs-gallery-thumb--video .fs-gallery-thumb-play {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(15, 23, 42, 0.35);
  color: #fff;
  font-size: 14px;
  pointer-events: none;
}

.fs-gallery-thumb-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  font-size: 11px;
  font-weight: 600;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.fs-product-page .owl-carousel,
.fs-product-page .owl-carousel .owl-wrapper,
.fs-product-page .owl-carousel .owl-wrapper-outer {
  display: block !important;
  visibility: visible !important;
  height: auto !important;
}

@media (min-width: 992px) {
  .fs-product-page .fs-product-layout {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
  }

  .fs-product-page .product-flex-gallery {
    order: 1;
  }

  .fs-product-page .product-flex-info {
    order: 2;
  }
}
