﻿/* Shared PageBuilder widgets for Admin canvas + storefront parity */
/* PageBuilder widget polish */
.vs-section, .vs-hero, .vs-cta { margin: 1.5rem 0; }
.vs-hero {
  background: var(--color-bg-muted);
  border-radius: var(--radius-xl);
  padding: 2.5rem;
  box-shadow: var(--shadow-md);
}
.vs-button {
  display: inline-flex;
  background: var(--color-primary);
  color: #fff !important;
  border: none;
  border-radius: var(--radius-md);
  padding: .7rem 1.25rem;
  font-weight: 700;
  text-decoration: none;
}
.vs-button--primary { background: var(--color-primary); color: #fff !important; }
.vs-button--ghost {
  background: transparent;
  color: var(--color-text) !important;
  border: 1px solid var(--color-border);
}
.vs-button--outline {
  background: transparent;
  color: var(--color-primary) !important;
  border: 2px solid var(--color-primary);
}
.vs-button--link {
  background: transparent;
  color: var(--color-primary) !important;
  padding-inline: 0;
  text-decoration: underline;
}
.vs-button--success { background: var(--color-success); color: #fff !important; }
.vs-button--warning { background: var(--color-warning); color: #fff !important; }
.vs-button--danger { background: var(--color-danger); color: #fff !important; }
.vs-row { margin-block: 1rem; }
.vs-column { min-height: 1rem; }
.vs-slider { /* replaced by vs-slider.css */ }
.vs-slider--carousel { }
.vs-slider--fade { }
.vs-slider--cards { }
.vs-image-wrap { margin: 0 0 1rem; }
.vs-image {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius-md);
  display: block;
}
.vs-image-link { display: inline-block; max-width: 100%; }
.vs-image-caption {
  margin-top: .45rem;
  color: var(--color-muted);
  font-size: .88rem;
}
.vs-check {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  font-weight: 600;
}
.vs-check input { width: 1.05rem; height: 1.05rem; accent-color: var(--color-primary); }
.vs-switch {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  font-weight: 600;
}
.vs-switch input { accent-color: var(--color-primary); }
.vs-product-grid {
  display: grid !important;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1.25rem;
}
.vs-product-card {
  background: var(--color-surface) !important;
  border: 1px solid var(--color-border);
  border-radius: var(--product-card-radius, var(--radius-xl)) !important;
  box-shadow: var(--product-card-shadow, var(--shadow-md)) !important;
  padding: 1.25rem !important;
}

/* Forms */
.vs-form {
  display: flex;
  flex-direction: column;
  gap: var(--vs-form-row-gap, 0.5cm);
  margin: var(--vs-form-margin, 0.5cm);
  color: var(--color-text, #0F172A);
}
.vs-form-row {
  margin: 0;
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: var(--vs-form-col-gap, 0.5cm);
  background: transparent;
  border: none;
  padding: 0;
  box-sizing: border-box;
  position: relative;
}
.vs-form-field {
  padding: .85rem 1rem;
  margin: 0;
  position: relative;
  box-sizing: border-box;
}
.vs-form-col {
  box-sizing: border-box;
  min-width: 0;
  padding: 0;
  background: transparent;
  border: none;
  position: relative;
  display: flex;
  flex-direction: column;
}
.vs-form-shape-rect { border-radius: 0; clip-path: none; }
.vs-form-shape-rounded { border-radius: var(--radius-md, 12px); clip-path: none; }
.vs-form-shape-soft { border-radius: var(--radius-lg, 16px); clip-path: none; }
.vs-form-shape-pill { border-radius: 999px; clip-path: none; }
.vs-form-shape-circle { border-radius: 50%; clip-path: none; }
.vs-form-shape-oval { border-radius: 50% / 40%; clip-path: none; }
.vs-form-shape-diamond { border-radius: 0; clip-path: polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%); }
.vs-form-shape-hexagon { border-radius: 0; clip-path: polygon(25% 0%, 75% 0%, 100% 50%, 75% 100%, 25% 100%, 0% 50%); }
.vs-form-shape-triangle { border-radius: 0; clip-path: polygon(50% 0%, 100% 100%, 0% 100%); }
.vs-align-right { text-align: right; }
.vs-align-center { text-align: center; }
.vs-align-left { text-align: left; }
.vs-form-label { display: flex; flex-direction: column; gap: .35rem; font-weight: 600; font-size: .9rem; }
.vs-form input[type="text"],
.vs-form input[type="email"],
.vs-form input[type="tel"],
.vs-form input[type="number"],
.vs-form input[type="url"],
.vs-form input[type="file"],
.vs-form textarea,
.vs-form select {
  width: 100%;
  padding: .55rem .75rem;
  border: 1px solid var(--color-border, #D1D5DB);
  border-radius: var(--radius-md, 10px);
  background: var(--color-surface, #fff);
  color: var(--color-text, #0F172A);
}
.vs-form-hint { color: var(--color-muted, #6B7280); font-size: .75rem; font-weight: 500; }
.vs-form { position: relative; isolation: isolate; overflow: hidden; }
.vs-form__bg {
  position: absolute; inset: 0; background-size: cover; background-position: center;
  pointer-events: none; z-index: 0;
}
.vs-form__body, .vs-form__header, .vs-form__footer, .vs-form__actions { position: relative; z-index: 1; }
.vs-form-chrome {
  display: grid; gap: .75rem; align-items: center; margin-bottom: .5rem;
}
.vs-form-chrome__media img { max-width: 100%; height: auto; display: block; border-radius: 8px; }
.vs-form-chrome__text { line-height: 1.6; }
.vs-layout-d-media-start { grid-template-columns: minmax(80px, 28%) 1fr; }
.vs-layout-d-media-end { grid-template-columns: 1fr minmax(80px, 28%); }
.vs-layout-d-media-end .vs-form-chrome__media { order: 2; }
.vs-layout-d-media-top-start,
.vs-layout-d-media-top-end,
.vs-layout-d-media-full,
.vs-layout-d-media-center { grid-template-columns: 1fr; }
.vs-layout-d-media-center { justify-items: center; text-align: center; }
.vs-form-check, .vs-form-radio, .vs-form-switch { border: none; margin: 0; padding: 0; }
.vs-form-opts--horizontal { display: flex; flex-wrap: wrap; gap: .65rem 1rem; }
.vs-form-opts--horizontal > legend { width: 100%; }
.vs-form-opts--vertical { display: flex; flex-direction: column; gap: .45rem; }
.vs-form-check__item, .vs-form-radio__item, .vs-form-switch__item, .vs-form-opt {
  display: flex; align-items: center; gap: .5rem; margin: .35rem 0; font-weight: 500;
}
.vs-form-opt__media img,
.vs-form-opt__media video { width: 48px; height: 48px; object-fit: cover; border-radius: 8px; display: block; }
.vs-form-opt__icon { font-size: 1.25rem; line-height: 1; }
.vs-form-check input,
.vs-form-radio input,
.vs-form-switch input { accent-color: var(--color-primary, #22C55E); }
.vs-form-side-left { direction: ltr; }
.vs-form-side-right { direction: rtl; }
.vs-form-map { width: 100%; z-index: 1; background: var(--color-bg-muted, #E5E7EB); }
.vs-form-accordion__item {
  border: 1px solid var(--color-border, #E5E7EB);
  border-radius: var(--radius-md, 10px);
  margin-bottom: .4rem;
  padding: .35rem .75rem;
  background: var(--color-surface, #fff);
}
.vs-form__actions { margin-top: .5rem; }
.vs-form-divider { border: none; border-top: 1px solid var(--color-border, #E5E7EB); margin: .5rem 0; }
.vs-form-table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.vs-form-table th, .vs-form-table td {
  border: 1px solid var(--color-border, #E5E7EB); padding: .45rem .6rem; text-align: center;
}
.vs-form-table th { background: var(--color-bg-muted, #F1F5F9); font-weight: 700; }
.vs-form-payment { border: 1px solid var(--color-border, #E5E7EB); border-radius: 12px; padding: .85rem 1rem; }
.vs-form-payment__amount { font-size: 1.15rem; font-weight: 700; margin: .35rem 0 .75rem; }
.vs-form-payment__btn { display: inline-flex; margin-top: .5rem; text-decoration: none; }
.vs-form-video { background: #0f172a; }
@media (max-width: 768px) {
  .vs-layout-m-media-start,
  .vs-layout-m-media-end,
  .vs-layout-m-media-top-start,
  .vs-layout-m-media-top-end,
  .vs-layout-m-media-full,
  .vs-layout-m-media-center { grid-template-columns: 1fr !important; }
  .vs-layout-m-media-center { justify-items: center; text-align: center; }
  .vs-form-opts--horizontal { flex-direction: column; }
}

/* Page builder widgets (P7) */
.vs-hide-mobile { }
@media (max-width: 767px) {
  .vs-hide-mobile { display: none !important; }
}
.vs-tabs__list { display: flex; flex-wrap: wrap; gap: .35rem; margin-bottom: .75rem; }
.vs-tabs__tab {
  border: 1px solid var(--color-border, #E5E7EB); background: var(--color-bg-muted, #F8FAFC);
  border-radius: 8px; padding: .4rem .75rem; cursor: pointer; font: inherit;
}
.vs-tabs__tab[aria-selected="true"] { background: var(--color-primary, #0F766E); color: #fff; border-color: transparent; }
.vs-accordion__item, .vs-faq details { border: 1px solid var(--color-border, #E5E7EB); border-radius: 10px; padding: .65rem .85rem; margin-bottom: .5rem; }
.vs-slider { /* see vs-slider.css */ }
.vs-slider__slide { }
.vs-product-details { display: grid; gap: .75rem; }
.vs-product-details__price { font-size: 1.25rem; font-weight: 800; }
.vs-cart-widget { display: inline-flex; align-items: center; gap: .35rem; font-weight: 700; }
.vs-testimonial { border-inline-start: 3px solid var(--color-primary, #0F766E); padding: .75rem 1rem; margin: 1rem 0; }
.vs-counter { text-align: center; }
.vs-counter__value { display: block; font-size: 2rem; font-weight: 800; }
.vs-alert { padding: .75rem 1rem; border-radius: 10px; margin: .75rem 0; }
.vs-alert--info { background: #EFF6FF; }
.vs-alert--success { background: #ECFDF5; }
.vs-alert--warning { background: #FFFBEB; }
.vs-alert--danger { background: #FEF2F2; }
.vs-search { display: flex; gap: .5rem; flex-wrap: wrap; }
.vs-search input { flex: 1; min-width: 160px; padding: .55rem .75rem; border: 1px solid var(--color-border, #E5E7EB); border-radius: 8px; }
.vs-embed iframe, .vs-video iframe, .vs-video { width: 100%; min-height: 280px; border: 0; border-radius: 12px; }
.vs-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: .75rem; }
.vs-gallery.vs-gallery--managed {
  display: block;
  grid-template-columns: unset;
  gap: unset;
}
.vs-breadcrumb ol { display: flex; flex-wrap: wrap; gap: .35rem; list-style: none; padding: 0; margin: 0 0 1rem; }
.vs-breadcrumb li + li::before { content: "/"; margin-inline-end: .35rem; opacity: .5; }

.vs-empty {
  padding: 1.25rem;
  border: 1px dashed var(--color-border, #CBD5E1);
  border-radius: var(--radius-md, 10px);
  color: var(--color-muted, #64748B);
  text-align: center;
  background: var(--color-bg-muted, #F8FAFC);
}
.vs-heading { margin: 0 0 .75rem; line-height: 1.3; }
.vs-text { margin: 0 0 1rem; line-height: 1.7; color: var(--color-text, #0F172A); }
.eb-canvas__html .row { display: flex; flex-wrap: wrap; margin-inline: -0.5rem; }
.eb-canvas__html [class*="col-"] { padding-inline: 0.5rem; box-sizing: border-box; }
.eb-canvas__html .col-12 { flex: 0 0 100%; max-width: 100%; }
.eb-canvas__html .col-6 { flex: 0 0 50%; max-width: 50%; }
.eb-canvas__html .col-4 { flex: 0 0 33.333%; max-width: 33.333%; }
.eb-canvas__html .col-3 { flex: 0 0 25%; max-width: 25%; }
.eb-canvas__html .g-3 { --bs-gutter-x: 1rem; --bs-gutter-y: 1rem; }
