.lucysp-product-image {
  position: relative;
  overflow: hidden;
  box-sizing: border-box;
  max-width: 100%;
}

.lucysp-product-image img {
  display: block;
  max-width: 100%;
  height: auto;
}

.lucysp-product-image__link {
  display: block;
  width: 100%;
  height: 100%;
}

@media (max-width: 1024px) {
  .lucysp-product-image {
    max-width: 100% !important;
  }
}

@media (max-width: 768px) {
  .lucysp-product-image {
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    max-height: none !important;
    aspect-ratio: unset !important;
  }

  .lucysp-product-image img {
    width: 100% !important;
    height: auto !important;
    object-fit: contain !important;
  }
}

.lucysp-product-gallery {
  position: relative;
  max-width: 100%;
}

.lucysp-product-gallery__main {
  position: relative;
  overflow: hidden;
  box-sizing: border-box;
}

.lucysp-product-gallery__main img {
  display: block;
  cursor: zoom-in;
}

.lucysp-product-gallery__thumbs {
  display: flex;
  flex-wrap: wrap;
  max-width: 100%;
}

.lucysp-product-gallery__thumb {
  cursor: pointer;
  border: 2px solid transparent;
  overflow: hidden;
  transition: border-color 0.2s ease;
  box-sizing: border-box;
  max-width: 100%;
}

.lucysp-product-gallery__thumb--active,
.lucysp-product-gallery__thumb:hover {
  border-color: currentColor;
}

.lucysp-product-gallery__thumb img {
  display: block;
}

.lucysp-product-gallery__thumb--youtube {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ff0000;
  cursor: pointer;
}

.lucysp-product-gallery__thumb--youtube svg {
  width: 60%;
  height: 60%;
}

.lucysp-product-gallery__thumb--youtube:hover {
  border-color: #ff0000;
}

@media (max-width: 768px) {
  .lucysp-product-gallery__main {
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    max-height: none !important;
    aspect-ratio: unset !important;
  }

  .lucysp-product-gallery__main img {
    width: 100% !important;
    height: auto !important;
    object-fit: contain !important;
  }

  .lucysp-product-gallery__thumbs {
    flex-wrap: wrap !important;
  }

  .lucysp-product-gallery__thumb {
    max-width: calc(25% - 6px) !important;
    flex: 0 0 auto !important;
  }
}

.lucysp-lightbox {
  position: fixed;
  inset: 0;
  z-index: 999999;
  background: rgba(0, 0, 0, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: lucysp-fade-in 0.2s ease;
}

.lucysp-lightbox__close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: none;
  border: none;
  color: #fff;
  font-size: 32px;
  cursor: pointer;
  z-index: 10;
  line-height: 1;
  padding: 8px;
}

.lucysp-lightbox__close:hover {
  opacity: 0.7;
}

.lucysp-lightbox__img {
  max-width: 90vw;
  max-height: 90vh;
  object-fit: contain;
}

.lucysp-lightbox__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.15);
  border: none;
  color: #fff;
  font-size: 28px;
  cursor: pointer;
  padding: 12px 16px;
  line-height: 1;
  border-radius: 4px;
  transition: background-color 0.2s;
}

.lucysp-lightbox__nav:hover {
  background: rgba(255, 255, 255, 0.3);
}

.lucysp-lightbox__nav--prev {
  left: 16px;
}

.lucysp-lightbox__nav--next {
  right: 16px;
}

@keyframes lucysp-fade-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.lucysp-product-price {
  font-size: 1.25em;
}

.lucysp-product-price del {
  opacity: 0.6;
}

.lucysp-product-price ins {
  text-decoration: none;
  font-weight: 700;
}

.lucysp-product-rating {
  display: flex;
  align-items: center;
  gap: 8px;
}

.lucysp-product-rating .star-rating {
  display: inline-flex;
}

.lucysp-product-stock--instock {
  color: #46b450;
}

.lucysp-product-stock--outofstock {
  color: #dc3232;
}

.lucysp-product-stock--backorder {
  color: #f0b849;
}

.lucysp-product-attributes {
  width: 100%;
}

.lucysp-product-attributes__row {
  display: flex;
  gap: 8px;
  padding: 8px 0;
  border-bottom: 1px solid #eee;
}

.lucysp-product-attributes__label {
  font-weight: 600;
  min-width: 120px;
}

.lucysp-product-attributes--table {
  border-collapse: collapse;
  width: 100%;
}

.lucysp-product-attributes--table th,
.lucysp-product-attributes--table td {
  padding: 8px 12px;
  border: 1px solid #eee;
  text-align: left;
}

.lucysp-product-attributes--table th {
  font-weight: 600;
  background: #f9f9f9;
}

.lucysp-product-button .quantity {
  display: inline-flex;
  margin-right: 8px;
}

.lucysp-product-button .single_add_to_cart_button {
  display: inline-block;
}

.lucysp-product-category,
.lucysp-product-tags {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
}

.lucysp-product-tabs .wc-tabs-wrapper,
.lucysp-product-tabs .woocommerce-tabs {
  margin-top: 32px;
}

.lucysp-product-related .products {
  display: grid;
  gap: 24px;
}

.lucysp-product-breadcrumb {
  font-size: 0.875em;
}

.lucysp-product-breadcrumb a {
  text-decoration: none;
}

.lucysp-product-meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 0.875em;
}

.lucysp-product-dimensions,
.lucysp-product-weight {
  display: flex;
  align-items: center;
  gap: 4px;
}

.lucysp-product-quality {
  display: flex;
  align-items: center;
  gap: 4px;
}

.lucysp-product-quality--center {
  justify-content: center;
}

.lucysp-product-quality--right {
  justify-content: flex-end;
}

.lucysp-product-quality__icon {
  display: inline-flex;
  flex: 0 0 auto;
  line-height: 1;
}

.lucysp-product-quality__icon svg {
  display: block;
  width: 100%;
  height: 100%;
}

.lucysp-product-shortcode {
}

.lucysp-product-custom-field {
  display: flex;
  align-items: center;
  gap: 8px;
}

.lucysp-product-video {
  position: relative;
  width: 100%;
  overflow: hidden;
  box-sizing: border-box;
}

.lucysp-product-video iframe {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  border: 0;
  display: block;
}

/* ── Product Variations ─────────────────────────────────── */

.lucysp-product-variations {
  width: 100%;
}

.lucysp-variations-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.lucysp-variations-form__table {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.lucysp-variations-form__row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.lucysp-variations-form__label {
  font-weight: 600;
  min-width: 100px;
  font-size: var(--ast-font-size-body, 0.9em);
  color: var(--ast-global-color-2, inherit);
}

.lucysp-variations-form__field {
  display: inline-block;
}

.lucysp-variations-form__select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  width: auto;
  min-width: 80px;
  padding: 8px 36px 8px 12px;
  border: 1px solid var(--ast-border-color, #eaeaea);
  border-radius: var(--ast-global-border-radius, 2px);
  font-size: var(--ast-font-size-body, 0.9em);
  font-family: inherit;
  color: var(--ast-global-color-3, #3a3a3a);
  background-color: var(--ast-global-color-5, #ffffff);
  background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M2 4l4 4 4-4' fill='none' stroke='%23333' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 12px;
  cursor: pointer;
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease;
  line-height: 1.5;
}

.lucysp-variations-form__select:hover {
  border-color: var(--ast-global-color-0, #0274be);
}

.lucysp-variations-form__select:focus {
  border-color: var(--ast-global-color-0, #0274be);
  box-shadow: 0 0 0 1px var(--ast-global-color-0, #0274be);
  outline: none;
}

.lucysp-variations-form__reset {
  font-size: 0.85em;
  display: inline-block;
  margin-top: 8px;
  color: var(--ast-global-color-0, #0274be);
  text-decoration: none;
  transition: color 0.2s ease;
}

.lucysp-variations-form__reset:hover {
  color: var(--ast-global-color-1, #014f82);
  text-decoration: underline;
}

.lucysp-variations-form__price {
  font-size: 1.1em;
  font-weight: 600;
  margin-top: 4px;
}

.lucysp-variations-form__price del {
  opacity: 0.6;
}

.lucysp-variations-form__price ins {
  text-decoration: none;
  font-weight: 700;
}

.lucysp-variations-form__stock {
  font-size: 0.85em;
  margin-top: 2px;
}

.lucysp-variations-form__select option:disabled {
  color: var(--ast-global-color-6, #cccccc);
}

@media (max-width: 480px) {
  .lucysp-variations-form__row {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }

  .lucysp-variations-form__label {
    min-width: unset;
  }

  .lucysp-variations-form__field {
    width: 100%;
  }

  .lucysp-variations-form__select {
    width: 100% !important;
  }
}

/* ── Social Share ─────────────────────────────────────────── */

.lucysp-social-share {
  max-width: 100%;
}

.lucysp-social-share__icons {
  display: flex;
  flex-wrap: wrap;
}

.lucysp-social-share__link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  background: var(--lucysp-share-bg, var(--ast-global-color-0, #333333));
  color: var(--lucysp-share-color, var(--ast-global-color-5, #ffffff));
  transition:
    color 0.18s ease,
    transform 0.18s ease;
  line-height: 1;
}

.lucysp-social-share__link:hover {
  color: #000000;
  transform: scale(1.12);
}

.lucysp-social-share__link:focus {
  outline: 2px solid var(--lucysp-share-bg, var(--ast-global-color-0, #333333));
  outline-offset: 3px;
}

.lucysp-social-share__link svg {
  fill: currentColor;
  width: inherit;
  height: inherit;
}

.lucysp-social-share__link img {
  object-fit: contain;
}

/* ── Variation Gallery ─────────────────────────────────────────────────────── */

.lucysp-product-variation-gallery {
  position: relative;
}

.lucysp-variation-gallery__placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 80px;
  background: transparent;
  color: var(--ast-border-color, #e0e0e0);
  font-size: 0.9em;
  font-style: italic;
}

.lucysp-variation-gallery__placeholder:empty {
  display: none;
}

.lucysp-variation-gallery__inner {
  width: 100%;
}

/* ── Variation Attributes ──────────────────────────────────────────────────── */

.lucysp-product-variation-attributes {
  position: relative;
}

.lucysp-variation-attrs__placeholder {
  color: var(--ast-border-color, #aaa);
  font-style: italic;
  font-size: 0.9em;
  min-height: 1.5em;
}

.lucysp-variation-attrs__placeholder:empty {
  display: none;
}

/* Definition-list layout */
.lucysp-variation-attrs__list {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 4px 16px;
  margin: 0;
  padding: 0;
}

.lucysp-variation-attrs__list dt {
  font-weight: 600;
}

.lucysp-variation-attrs__list dd {
  margin: 0;
}

/* Table layout */
.lucysp-variation-attrs__table {
  border-collapse: collapse;
  width: 100%;
  border: none;
}

.lucysp-variation-attrs__table th,
.lucysp-variation-attrs__table td {
  padding: 4px 10px;
  text-align: left;
  border: none;
}

.lucysp-variation-attrs__table tr:nth-child(even) th,
.lucysp-variation-attrs__table tr:nth-child(even) td {
  background-color: #f1f1f1;
}

.lucysp-variation-attrs__table th {
  font-weight: 600;
  width: 40%;
}

/* Inline layout */
.lucysp-variation-attrs__inline {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
}

.lucysp-variation-attrs__name {
  font-weight: 600;
}

/* ── Description Tabs (Aprašymas / Saugumas) ──────────────────────────────── */

.lucysp-description-tabs__nav {
  display: flex;
  gap: 24px;
  margin-bottom: 20px;
}

.lucysp-description-tabs__tab {
  margin: 0;
  padding: 0;
  color: #888;
  cursor: pointer;
  transition: color 0.2s;
}

.lucysp-description-tabs__tab:hover {
  color: #eb721f;
}

.lucysp-description-tabs__tab--active {
  color: inherit;
}

.lucysp-description-tabs__panel {
  display: none;
}

.lucysp-description-tabs__panel--active {
  display: block;
}
