/* ------------------------ BASE ------------------------ */
* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  font-family: "Inter", Roboto, Arial, sans-serif;
  background: linear-gradient(180deg, #f5f7ff 0%, #eef2ff 100%);
  color: var(--dark);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.45;
  padding: 0;
}

/* Centered page frame */
.page {
  max-width: none;
  margin: 0;
}

/* Top header (small) */
.topbar {
  background: #fff;
  padding: 12px 20px;
  display: flex;
  justify-content: center;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
  border-radius: 6px;
}

.topbar-inner {
  display: flex;
  width: 100%;
  max-width: 1200px;
  align-items: center;
  justify-content: space-between;
}

.header-left .logo {
  height: 45px;
  width: auto;
}

.header-center {
  display: flex;
  gap: 20px;
  justify-content: center;
  flex: 1;
}

.header-center a {
  text-decoration: none;
  color: #333;
  font-weight: 600;
  transition: color 0.2s;
}

.header-center a:hover {
  color: #006699;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 15px;
}

.user-dropdown {
  position: relative;
}

.user-dropdown button {
  background: none;
  border: none;
  font-weight: 600;
  color: #333;
  cursor: pointer;
}

.dropdown-content {
  display: none;
  position: absolute;
  right: 0;
  top: 120%;
  background: #fff;
  border: 1px solid #ccc;
  border-radius: 6px;
  min-width: 150px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  z-index: 100;
}

.dropdown-content a {
  display: block;
  padding: 10px 15px;
  text-decoration: none;
  color: #333;
  transition: background 0.2s;
}

.dropdown-content a:hover {
  background: #f0f0f0;
}

.site-header.site-header--shop {
  position: sticky;
  top: 0;
  z-index: 1100;
}

.shop-detail-main {
  max-width: 1240px;
  margin: 0 auto;
  padding: 32px 12px 0;
}

/* Page card (boxed) */
.card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
  border: var(--border);
}

.card.product-outer {
  padding-top: 3rem;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(8px);
}

/* MAIN LAYOUT */
.product-outer {
  grid-template-columns: 1fr !important;
  justify-items: center;
  padding: 12px;
  border-radius: 22px;
}

/* Left column: content within inner card */
.left-col {
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
}

/* Gallery + info area */
.product-top {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 24px;
  align-items: start;
}

/* MEDIA/GALLERY */
.gallery {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.media-frame {
  width: 320px;
  height: 320px;
  background: #f7f7f8;
  border-radius: 12px;
  border: var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  max-width: 680px;
  aspect-ratio: 1 / 1;
  box-shadow: 0 6px 30px rgba(16, 16, 16, 0.06);
  position: relative;
}

.media-frame img,
.media-frame video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.media-actions {
  display: flex;
  gap: 8px;
  position: absolute;
  right: 10px;
  top: 10px;
  z-index: 5;
}

.icon-btn {
  background: rgba(255, 255, 255, 0.9);
  border-radius: 8px;
  padding: 8px;
  border: 1px solid #eee;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.04);
}

.thumbs-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
  max-width: 340px;
  margin: 0;
}

.media-thumbs {
  display: flex;
  gap: 10px;
  align-items: center;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 8px 0;
  scroll-behavior: smooth;
  flex-wrap: nowrap;
  scrollbar-width: thin;
}

.media-thumbs::-webkit-scrollbar {
  height: 8px;
}

.media-thumbs::-webkit-scrollbar-thumb {
  background: #ccc;
  border-radius: 10px;
}

.media-thumbs::-webkit-scrollbar-track {
  background: transparent;
}

.thumb {
  width: 72px;
  height: 72px;
  flex: 0 0 72px;
  border-radius: 8px;
  overflow: hidden;
  border: 2px solid transparent;
  cursor: pointer;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.thumb img,
.thumb video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.thumb video {
  border-radius: 8px;
}

.thumb.active {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(109, 94, 252, 0.12);
}

.thumb[data-type="video"]::after {
  content: "\f04b";
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  color: white;
  font-size: 20px;
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.35);
  border-radius: 8px;
  pointer-events: none;
}

.scroll-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid #ddd;
  border-radius: 50%;
  width: 28px;
  height: 28px;
  cursor: pointer;
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
  transition: background 0.2s ease;
}

.scroll-btn:hover {
  background: rgba(255, 255, 255, 1);
}

.scroll-btn.left {
  left: -12px;
}

.scroll-btn.right {
  right: -12px;
}

.lb-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 1000;
  cursor: pointer;
  pointer-events: auto;
}

.lb-content video {
  pointer-events: none;
}

/* Middle info area (title / price / actions) */
.info {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.title {
  font-size: 1.45rem;
  font-weight: 700;
  color: var(--dark);
  margin: 0;
}

.meta {
  font-size: 0.9rem;
  color: var(--muted);
}

.price-block {
  display: flex;
  gap: 12px;
  align-items: baseline;
  flex-wrap: wrap;
  padding-left: 12px;
}

.price-current {
  font-size: 1.6rem;
  font-weight: 800;
  color: #333333;
}

.price-old {
  font-size: 1rem;
  color: #9a9a9a;
  text-decoration: line-through;
}

.price-badge {
  background: #fdecea;
  padding: 4px 8px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--accent-600);
}

/* Add to cart panel */
.buy-panel {
  margin-top: 8px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 14px;
  border-radius: 22px;
  border: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(201, 181, 138, 0.04), rgba(255, 255, 255, 0));
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.06);
}

.stock {
  font-weight: 600;
  color: #2d6a2f;
}

.qty-row {
  display: flex;
  gap: 8px;
  align-items: center;
}

.qty-controls {
  display: flex;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid #e0d9c8;
}

.qty-controls button {
  width: 44px;
  height: 40px;
  border: none;
  color: #fff;
  cursor: pointer;
  font-size: 18px;
}

.qty-controls input {
  width: 70px;
  height: 40px;
  border: none;
  text-align: center;
  font-size: 16px;
  padding: 0 8px;
}

.buy-actions {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-top: 6px;
}

.add-btn {
  background: linear-gradient(135deg, #4b477b, #a27ddb);
  color: #fff;
  padding: 12px 16px;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  font-weight: 700;
  box-shadow: 0 12px 24px rgba(109, 94, 252, 0.25);
}

.add-btn:hover {
  filter: brightness(1.03);
  transform: translateY(-1px);
}

.add-btn[disabled] {
  opacity: 0.6;
  cursor: not-allowed;
}

.wish-btn {
  background: transparent;
  border: 1px solid #eee;
  padding: 10px;
  border-radius: 10px;
  cursor: pointer;
}

#qty-inc,
#submit-rating {
  background: linear-gradient(135deg, #4b477b, #a27ddb);
}

#qty-dec {
  background: linear-gradient(135deg, #a27ddb,#4b477b);
}

/* Right column: sidebar */
.right-col {
  display: none;
  flex-direction: column;
  gap: 16px;
  max-width: 380px;
}

.right-col .card {
  border: 1px solid var(--border);
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.06);
}

.mini-card {
  padding: 14px;
  border-radius: 12px;
  background: var(--card);
  border: var(--border);
  box-shadow: var(--shadow);
}

/* description & tabs */
.tabs {
  margin-top: 8px;
  display: flex;
  gap: 12px;
  border-bottom: 1px solid #eee;
  padding-bottom: 10px;
}

.tab {
  padding: 8px 12px;
  cursor: pointer;
  color: var(--muted);
  border-radius: 8px;
}

.tab.active {
  background: linear-gradient(135deg, #4b477b, #a27ddb);
  color: #fff;
  box-shadow: 0 10px 24px rgba(109, 94, 252, 0.28);
}

/* content sections */
.section {
  margin-top: 16px;
  background: var(--card);
  border: 1px solid var(--border);
  padding: 16px;
  border-radius: 22px;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.06);
}

.section h3 {
  margin: 0 0 8px 0;
  font-size: 1.05rem;
  color: var(--dark);
}

.section h3 a,
.crumbs a,
.related-card a:hover,
.topbar a:hover {
  color: var(--accent-600);
}

.specs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.spec-row {
  font-size: 0.95rem;
  color: var(--muted);
  padding: 8px;
  border-radius: 22px;
  background: #f8f9ff;
  border: 1px solid var(--border);
}

/* related products grid */
.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 12px;
  margin-top: 12px;
}

.related-card {
  font-size: 0.85rem;
  padding: 6px;
  border-radius: 22px;
  background: #fff;
  border: 1px solid var(--border);
}

.related-thumb {
  width: 100%;
  height: 100px;
}

.related-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.related-card div.title {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.related-card label {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
}

.related-card .related-title {
  flex: 1 1 auto;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.related-label {
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  margin-top: 4px;
}

.related-label input {
  flex-shrink: 0;
}

.related-label span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* footer small note */
.small {
  font-size: 0.9rem;
  color: var(--muted);
}

/* Warenkorb */
.cart-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  font-family: Arial, sans-serif;
}

.cart-icon {
  position: relative;
  font-size: 1.2em;
  color: #222;
}

.cart-badge {
  position: absolute;
  top: -11px;
  right: -13px;
  background-color: red;
  color: white;
  border-radius: 50%;
  padding: 2px 6px;
  font-size: 0.65em;
  font-weight: bold;
}

.cart-price {
  font-size: 0.9em;
}

/* --------------------- FOOTER --------------------- */
footer {
  flex-shrink: 0;
  padding: 20px;
  text-align: center;
  font-size: 0.85em;
  margin-top: 40px;
}

.footer-links a {
  color: #006699;
  text-decoration: none;
  margin: 0 10px;
  font-weight: bold;
}

.footer-links a:hover {
  text-decoration: underline;
}

.shop-footer {
  margin-top: 40px;
}

.shop-footer .footer-doc a {
  color: #c7d2fe;
}

.shop-footer .footer-doc a:hover {
  color: #fff;
}

/* Produktoptionen */
.product-option {
  margin: 0.5em 0;
  display: flex;
  flex-direction: column;
  font-size: 0.95em;
}

.product-option label {
  margin-bottom: 0.2em;
  font-weight: 600;
}

.product-option select.option-select {
  padding: 0.55em 0.5em;
  border: 1px solid #ccc;
  border-radius: 8px;
  font-size: 0.95em;
  width: 150px;
}

.product-option select.option-select:focus {
  outline: none;
  border-color: #007bff;
  box-shadow: 0 0 3px rgba(0, 123, 255, 0.5);
}

/* Bilder Upload und Freitext */
.upload-section {
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.upload-preview {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 4px;
  border: 1px solid #e6e6e6;
  border-radius: 8px;
}

.upload-preview img {
  height: 80px;
  object-fit: cover;
  border-radius: 6px;
  cursor: pointer;
}

.upload-preview .remove-btn {
  position: absolute;
  top: 2px;
  right: 2px;
  background: #fff;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  font-size: 0.8rem;
}

.custom-text-section {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 12px;
}

.custom-text-section textarea {
  min-height: 80px;
  padding: 8px;
  border: 1px solid #e6e6e6;
  border-radius: 8px;
  font-family: inherit;
  font-size: 0.95rem;
  resize: vertical;
}

#cropper-modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  z-index: 10000;
}

#cropper-modal > div {
  display: flex;
  flex-direction: column;
  max-height: 90vh;
}

.cropper-body {
  flex: 1;
  min-height: 220px;
  position: relative;
}

.cropper-actions {
  margin-top: 12px;
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.cropper-container {
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}

#sphere-bg {
  padding: 0.35em 0.5em;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 0.95em;
  width: 150px;
}

.preview-btn {
  background: darkgray;
  border: 1px solid #eee;
  padding: 10px;
  border-radius: 10px;
  cursor: pointer;
}

.preview-btn:hover {
  background: grey;
}

#add-main {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  line-height: 1.1;
  text-align: center;
}

#add-main .btn-main-text {
  font-size: 1rem;
  font-weight: 600;
}

#add-main .btn-sub-text {
  font-size: 0.68rem;
  font-weight: 400;
  opacity: 0.8;
}

#btn-main-text {
}

/* Reviews / Comments */
.reviews-wrap {
  max-width: 900px;
  margin: 0 auto;
  padding: 1rem;
  color: #222;
}

.rating-summary {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.rating-score {
  font-size: 2rem;
  font-weight: 700;
}

.rating-count {
  color: #666;
  font-size: 0.95rem;
}

.stars {
  display: inline-block;
  font-size: 1.25rem;
  unicode-bidi: bidi-override;
  direction: rtl;
}

.star {
  cursor: pointer;
  display: inline-block;
  font-size: 1.5rem;
  margin: 0 0.1rem;
}

.star.active::before {
  content: "★";
}

.star.inactive::before {
  content: "☆";
  color: #cfcfcf;
}

.comment-form {
  border: 1px solid #eee;
  padding: 0.75rem;
  border-radius: 6px;
  margin-bottom: 1rem;
  background: #fafafa;
}

.comment-form textarea {
  width: 100%;
  min-height: 95px;
  padding: 0.55rem 0.6rem;
  border: 1px solid #dcdcdc;
  border-radius: 6px;
  font-size: 0.95rem;
  font-family: inherit;
  resize: vertical;
  outline: none;
  background: #fff;
}

.comment-form textarea:hover {
  border-color: #bdbdbd;
}

.comment-form textarea:focus {
  border-color: #0a66d0;
  box-shadow: 0 0 0 2px rgba(10, 102, 208, 0.15);
}

.comment {
  padding: 0.6rem 0;
  position: relative;
  padding-left: 1.5rem;
}

.comment::before {
  content: "";
  position: absolute;
  left: 0.75rem;
  top: 0;
  bottom: 0;
  width: 2px;
  background: #ccc;
}

.comment .meta {
  font-size: 0.9rem;
  color: #666;
  margin-bottom: 0.25rem;
}

.comment .text {
  white-space: pre-wrap;
  color: #111;
}

.comment .reply-btn {
  font-size: 0.85rem;
  color: #0a66d0;
  cursor: pointer;
  margin-left: 0.5rem;
}

.comment .verified {
  background: #e6f4ea;
  color: #0a7a3a;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.75rem;
  margin-left: 0.5rem;
}

.reply {
  margin-left: 1.5rem;
}

.small-muted {
  font-size: 0.85rem;
  color: #777;
}

.btn {
  display: inline-block;
  background: #0a66d0;
  color: #fff;
  padding: 8px 12px;
  border-radius: 6px;
  cursor: pointer;
  border: 0;
}

.btn.secondary {
  background: #6c757d;
}

.display-name-select {
  padding: 6px 10px;
  border: 1px solid #dcdcdc;
  border-radius: 6px;
  background: #fff;
  font-size: 0.95rem;
  color: #333;
  cursor: pointer;
  outline: none;
}

.display-name-select:hover {
  border-color: #b5b5b5;
}

.display-name-select:focus {
  border-color: #0a66d0;
  box-shadow: 0 0 0 2px rgba(10, 102, 208, 0.15);
}

.comment-upload-row {
  margin-top: 10px;
}

.comment-image-input {
  display: block;
  margin-top: 6px;
}

.comment-gallery,
.comment-upload-preview {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 8px;
}

.comment-gallery-thumb,
.comment-upload-preview-item img {
  width: 80px;
  height: 80px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid #ddd;
  background: #f8f8f8;
  cursor: pointer;
  display: block;
}

.comment-gallery {
  margin-top: 8px;
}

.comment-upload-preview-item {
  position: relative;
  width: 80px;
  height: 80px;
}

.comment-upload-remove {
  position: absolute;
  top: -6px;
  right: -6px;
  width: 22px;
  height: 22px;
  border: none;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  cursor: pointer;
  font-weight: 700;
}

.comment-lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.82);
  z-index: 11000;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.comment-lightbox img {
  max-width: min(100%, 1100px);
  max-height: 90vh;
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.35);
}

.comment-lightbox-close {
  position: absolute;
  top: 18px;
  right: 18px;
  border: none;
  border-radius: 8px;
  background: #fff;
  padding: 8px 10px;
  cursor: pointer;
}

/* responsiveness */
@media (max-width: 1100px) {
  .product-outer {
    grid-template-columns: 1fr;
  }

  .right-col {
    max-width: 100%;
  }

  .product-top .info {
    order: 2;
  }
}

@media (max-width: 768px) {
  .cropper-actions {
    justify-content: space-between;
  }

  .cropper-actions button {
    flex: 1 1 48%;
  }

  #crop-save-btn,
  #crop-cancel-btn {
    flex: 1 1 100%;
  }
}

@media (max-width: 740px) {
  .product-outer {
    padding-top: 1rem!important;
  }
  body {
    font-size: 14px;
  }

  .topbar-inner {
    justify-content: space-between;
  }

  .header-left {
    flex: 0 0 auto;
  }

  .header-center.show {
    display: flex;
    animation: fadeIn 0.25s ease;
  }

  .menu-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    font-size: 1.6rem;
    cursor: pointer;
    color: #333;
  }

  .header-right {
    gap: 10px;
  }

  .product-top {
    display: flex;
    flex-direction: column;
    gap: 16px;
  }

  .gallery {
    width: 100%;
    align-items: center;
  }

  .media-frame {
    height: auto;
    aspect-ratio: 1 / 1;
  }

.thumbs-wrapper {
  width: 100%;
  max-width: 100%;
  overflow: hidden;
  padding: 0 28px;
}

.media-thumbs {
  width: 100%;
  max-width: 100%;
  justify-content: flex-start;
  gap: 8px;
  flex-wrap: nowrap;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-behavior: smooth;
  scrollbar-width: none;
}

.media-thumbs::-webkit-scrollbar {
  display: none;
}

.thumb {
  width: 56px;
  height: 56px;
  flex: 0 0 56px;
}

.scroll-btn.left {
  left: 0;
}

.scroll-btn.right {
  right: 0;
}

  .info {
    gap: 10px;
  }

  .title {
    font-size: 1.25rem;
  }

  .price-current {
    font-size: 1.4rem;
  }

  .buy-panel {
    padding: 12px;
    padding-top: 0;
  }

  .qty-controls button,
  .qty-controls input {
    height: 36px;
  }

  .add-btn {
    width: 100%;
    text-align: center;
    padding: 10px;
  }

  .wish-btn {
    width: 100%;
  }

  .related-grid {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 10px;
  }

  .related-card {
    font-size: 0.8rem;
    padding: 4px;
  }

  .related-thumb {
    height: 80px;
  }

  .tabs {
    flex-wrap: wrap;
    gap: 6px;
  }

  .tab {
    flex: 1 1 auto;
    text-align: center;
    font-size: 0.85rem;
    padding: 6px 8px;
  }

  .section {
    padding: 12px;
  }

  .specs {
    grid-template-columns: 1fr;
  }

  .small {
    font-size: 0.8rem;
  }

  .shop-detail-main {
    padding: 20px 12px 0;
  }
}

@media (max-width: 700px) {
  .topbar-inner {
    flex-wrap: wrap;
    align-items: center;
  }

  .header-left,
  .header-right {
    flex: 0 0 auto;
  }

  .header-center {
    flex: 1 1 100%;
    order: 1;
    width: 100%;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 8px;
    gap: 10px;
  }

  .header-right {
    margin-left: auto;
  }

  .topbar {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 14px;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.06);
    animation: fadeDown 0.4s ease-out;
  }

  .header-center a {
    background: linear-gradient(90deg, #d6c59b 0%, #bfa872 100%);
    color: #fff;
    padding: 8px 14px;
    border-radius: 20px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
    box-shadow: 0 2px 6px rgba(180, 150, 90, 0.2);
  }

  .header-center a:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(180, 150, 90, 0.3);
  }

  .add-btn {
    background: linear-gradient(135deg, #4b477b, #a27ddb);
    box-shadow: 0 6px 18px rgba(120, 100, 50, 0.25);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
  }

  .add-btn:active {
    transform: scale(0.96);
    box-shadow: 0 4px 10px rgba(100, 80, 40, 0.3);
  }

  .related-card {
    background: rgba(255, 255, 255, 0.85);
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    transition: box-shadow 0.25s ease, transform 0.2s ease;
  }

  .related-card:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    transform: translateY(-2px);
  }

  .tab.active {
    background: linear-gradient(135deg, #4b477b, #a27ddb);
    color: #fff;
    border: none;
    box-shadow: 0 4px 10px rgba(180, 150, 90, 0.25);
    transform: translateY(-1px);
  }

  * {
    transition: all 0.2s ease-in-out;
  }
}

@media (max-width: 520px) {

  .media-thumbs {
    gap: 8px;
  }

  .thumb {
    width: 56px;
    height: 56px;
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-5px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeDown {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
  body.modal-open {
  overflow: hidden;
}

#cropper-modal {
  position: fixed !important;
  inset: 0 !important;
  width: 100vw;
  height: 100dvh;
  z-index: 999999 !important;
  display: none;
  align-items: center !important;
  justify-content: center !important;
  padding: 18px;
  background: rgba(15, 18, 32, 0.72) !important;
  backdrop-filter: blur(6px);
  overflow: hidden;
}

#cropper-modal > div {
  width: min(94vw, 720px) !important;
  max-height: calc(100dvh - 36px);
  display: flex;
  flex-direction: column;
  gap: 14px;
  background: #fff !important;
  border-radius: 22px !important;
  padding: 20px !important;
  box-shadow: 0 24px 80px rgba(0,0,0,.28);
  overflow: hidden;
}

#cropper-modal h4 {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 800;
  color: #17152f;
}

#cropper-modal .cropper-body {
  flex: 1;
  min-height: 0;
  max-height: 62dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-radius: 16px;
  background: #f5f6ff;
  border: 1px solid #e6e8f5;
}

#cropper-modal #cropper-image {
  display: block;
  max-width: 100% !important;
  max-height: 62dvh !important;
}

#cropper-modal .cropper-container {
  max-width: 100% !important;
  max-height: 62dvh !important;
}

#cropper-modal .cropper-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

#cropper-modal .cropper-actions button {
  appearance: none;
  border: 0;
  border-radius: 999px;
  padding: 10px 16px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff;
  box-shadow: 0 10px 24px rgba(109,94,252,.22);
  transition: transform .15s ease, box-shadow .15s ease, opacity .15s ease;
}

#cropper-modal .cropper-actions button:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 30px rgba(109,94,252,.28);
}

#cropper-modal .cropper-actions button:disabled {
  opacity: .45;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

#cropper-modal #crop-cancel-btn {
  background: #eef0f7 !important;
  color: #31324a !important;
  box-shadow: none !important;
}

#cropper-modal #crop-save-btn {
  background: linear-gradient(135deg, #16a34a, #22c55e) !important;
}

@media (max-width: 640px) {
  #cropper-modal {
    padding: 10px;
    align-items: flex-start !important;
  }

  #cropper-modal > div {
    width: 100% !important;
    max-height: calc(100dvh - 20px);
    padding: 14px !important;
  }

  #cropper-modal .cropper-body,
  #cropper-modal #cropper-image,
  #cropper-modal .cropper-container {
    max-height: 55dvh !important;
  }

  #cropper-modal .cropper-actions {
    justify-content: stretch;
  }

  #cropper-modal .cropper-actions button {
    flex: 1 1 calc(50% - 8px);
  }

  #cropper-modal #crop-save-btn,
  #cropper-modal #crop-cancel-btn {
    flex-basis: 100%;
  }
}

.upload-section input[type="file"]::file-selector-button{
  appearance: none;
  border: 0;
  border-radius: 999px;
  padding: 10px 16px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  background: linear-gradient(135deg, #4b477b, #a27ddb);
  color: #fff;
  box-shadow: 0 10px 24px rgba(109,94,252,.22);
  transition: transform .15s ease, box-shadow .15s ease, opacity .15s ease;
}
.buy-info {
  position: relative;
  margin-top: 2px;
  font-size: 0.85rem;
}

.buy-info-toggle {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--muted);
  padding: 0;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.buy-info-toggle:hover {
  color: var(--accent);
}

.buy-info-popover {
  position: absolute;
  left: 0;
  top: calc(100% + 8px);
  width: min(340px, 85vw);
  background: #fff;
  color: var(--dark);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 12px 14px;
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.14);
  z-index: 30;
  line-height: 1.45;
}

@media (max-width: 740px) {
  .buy-info-popover {
    position: static;
    width: 100%;
    margin-top: 8px;
  }
}
  .buy-panel {
  max-width: 560px;
}

.qty-row {
  display: grid;
  grid-template-columns: 90px 128px 1fr;
  align-items: center;
  gap: 12px;
}

.qty-controls {
  width: 128px;
  height: 36px;
  border-radius: 10px;
  overflow: hidden;
}

.qty-controls button,
.qty-controls input {
  height: 36px;
}

.buy-actions {
  width: 100%;
  margin-top: 2px;
}

#add-main {
  width: 100%;
  min-height: 46px;
  border-radius: 12px;
}

#add-main .btn-main-text {
  font-size: 1rem;
  line-height: 1.1;
}

#add-main .btn-sub-text {
  font-size: 0.68rem;
  line-height: 1;
  opacity: .85;
}

.buy-info {
  margin-top: 0;
}

@media (max-width: 740px) {

  .qty-row {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .qty-controls {
    width: 128px;
  }

  .buy-actions {
    margin-top: 6px;
  }

  #add-main {
    width: 100%;
    min-height: 42px;
  }
}
#buy-card-size{
  display: flex;
  flex-wrap: wrap; 
  gap: 1rem;
  padding-left: 12px;
}