/* Hand-written, NOT Tailwind-compiled (DRO-429). Starts as a copy of `droovin-landing/assets/landing-base.css`
   without its header rules: every rule here targets markup the shared `_library/` platform sections print
   (`.product-description` rich text, `.dv-btn-anim` buy-button animation, `[data-classic-gallery-*]` carousel), so
   the selectors stay verbatim. The cart drawer rules at the end belong to THIS theme's `sections/header.liquid`.
   `--color-*` fallback vars: `body` reads `var(--color-foreground, var(--foreground))` so an unset color never
   goes transparent. */

:root {
  --background: #ffffff;
  --foreground: #171717;
}

body {
  color: var(--color-foreground, var(--foreground));
  background: var(--color-background, var(--background));
  font-family: var(--font-body-family);
}

/* Rich Text Content Styles (Quill editor output) */
.product-description {
  line-height: 1.7;
}

.product-description h1 {
  font-size: 2rem;
  font-weight: 700;
  color: #111827;
}

.product-description h2 {
  font-size: 1.3125rem; /* 21px */
  font-weight: 700;
  color: #1f2937;
}

.product-description h3 {
  font-size: 1.024rem; /* ~16.38px */
  font-weight: 700;
  color: #374151;
}

.product-description p {
  margin-bottom: 1rem;
}

.product-description strong,
.product-description b {
  font-weight: 700;
}

.product-description em,
.product-description i {
  font-style: italic;
}

.product-description u {
  text-decoration: underline;
}

.product-description s,
.product-description strike {
  text-decoration: line-through;
}

.product-description ul,
.product-description ol {
  margin-left: 1.5rem;
  margin-bottom: 1rem;
}

.product-description ul {
  list-style-type: disc;
}

.product-description ol {
  list-style-type: decimal;
}

.product-description li {
  margin-bottom: 0.25rem;
}

.product-description blockquote {
  border-left: 4px solid #e5e7eb;
  padding-left: 1rem;
  margin: 1rem 0;
  color: #6b7280;
  font-style: italic;
}

.product-description a {
  color: #2563eb;
  text-decoration: underline;
}

.product-description a:hover {
  color: #1d4ed8;
}

.product-description img {
  max-width: 100%;
  height: auto;
}

/* Images with explicit alignment from editor - override defaults */
.product-description img[style*="margin-left: 0"] {
  margin-left: 0 !important;
}

.product-description img[style*="margin-right: 0"] {
  margin-right: 0 !important;
}

.product-description pre {
  background-color: #f3f4f6;
  padding: 1rem;
  border-radius: 0.5rem;
  overflow-x: auto;
  margin: 1rem 0;
}

.product-description code {
  background-color: #f3f4f6;
  padding: 0.125rem 0.25rem;
  border-radius: 0.25rem;
  font-family: monospace;
  font-size: 0.875em;
}

/* Quill alignment classes */
.product-description .ql-align-center,
.product-description p.ql-align-center,
.product-description h1.ql-align-center,
.product-description h2.ql-align-center,
.product-description h3.ql-align-center {
  text-align: center;
}

.product-description .ql-align-center img {
  display: block;
  margin-left: auto;
  margin-right: auto;
}

.product-description .ql-align-right,
.product-description p.ql-align-right,
.product-description h1.ql-align-right,
.product-description h2.ql-align-right,
.product-description h3.ql-align-right {
  text-align: right;
}

.product-description .ql-align-right img {
  display: block;
  margin-left: auto;
  margin-right: 0;
}

.product-description .ql-align-justify {
  text-align: justify;
}

/* Quill indent classes */
.product-description .ql-indent-1 {
  padding-left: 3em;
}

.product-description .ql-indent-2 {
  padding-left: 6em;
}

.product-description .ql-indent-3 {
  padding-left: 9em;
}

/* Tables */
.product-description table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0;
}

.product-description th,
.product-description td {
  border: 1px solid #e5e7eb;
  padding: 0.5rem 0.75rem;
  text-align: left;
}

.product-description th {
  background-color: #f9fafb;
  font-weight: 600;
}

.product-description hr {
  border: none;
  border-top: 1px solid #e5e7eb;
  margin: 1.5rem 0;
}

.product-description details {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 0.75rem;
  margin-bottom: 0.75rem;
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
  transition: box-shadow 0.2s, border-color 0.2s;
}

.product-description details:hover {
  border-color: #d1d5db;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.product-description details[open] {
  border-color: #d1d5db;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.product-description details summary {
  padding: 1rem 1.25rem;
  font-weight: 600;
  font-size: 0.95rem;
  color: #1f2937;
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  user-select: none;
  -webkit-user-select: none;
}

.product-description details summary::-webkit-details-marker {
  display: none;
}

.product-description details summary::marker {
  display: none;
  content: '';
}

.product-description details summary::after {
  content: '+';
  display: flex;
  align-items: center;
  justify-content: center;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 9999px;
  background: #f3f4f6;
  font-size: 1.1rem;
  font-weight: 400;
  color: #6b7280;
  flex-shrink: 0;
  margin-left: 1rem;
  transition: background 0.2s, color 0.2s;
}

.product-description details[open] summary::after {
  content: '\2212';
  background: #e5e7eb;
  color: #374151;
}

.product-description details[open] summary {
  border-bottom: 1px solid #f3f4f6;
  padding-bottom: 0.75rem;
}

.product-description details > *:not(summary) {
  padding: 0.75rem 1.25rem 1rem;
}

.product-description details p {
  color: #6b7280;
  font-size: 0.9rem;
  line-height: 1.6;
}

/* Purchase-button attention animation (shaker) — keyframes copied verbatim from
   globals.css:281-321 (the Releasit COD form). `.dv-btn-anim` is toggled on/off by the
   `droovin_product_form` island client-side (out of this PR's scope, 136c); the CSS
   rules themselves are theme-owned so PR 3's boosters can reference them the moment the
   island mounts. */
.dv-btn-anim {
  animation-duration: .86s;
  animation-timing-function: cubic-bezier(.35, .06, .2, .98);
  animation-fill-mode: both;
  transform-origin: center;
}
.dv-btn-anim--shake { animation-name: dvBtnShake; }
.dv-btn-anim--bounce { animation-name: dvBtnBounce; }
.dv-btn-anim--pulse { animation-name: dvBtnPulse; }

@keyframes dvBtnShake {
  0%, 100% { transform: scaleX(1); }
  10%, 20% { transform: scale3d(.97, .97, .97) rotate(-1deg); }
  30%, 50%, 70%, 90% { transform: scale3d(1.03, 1.03, 1.03) rotate(1deg); }
  40%, 60%, 80% { transform: scale3d(1.03, 1.03, 1.03) rotate(-1deg); }
}
@keyframes dvBtnBounce {
  15%, 45%, 70%, 90%, 99%, 100% { transform: translateY(0); }
  35% { transform: translateY(-22%); }
  55% { transform: translateY(-15%); }
  80% { transform: translateY(-6%); }
  95% { transform: translateY(-2%); }
}
@keyframes dvBtnPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}
@media (prefers-reduced-motion: reduce) {
  .dv-btn-anim { animation: none !important; }
}

/* Gallery: CSS-only scroll-snap carousel (DRO-157 136d PR 3 Task 3.2, plan ruling 5) —
   hides the native scrollbar on the main scroller/thumbnail strip. Next's
   `ProductGalleryClient`/`Thumbnails` set `scrollbarWidth: 'none'`/`msOverflowStyle:
   'none'` inline plus Tailwind's arbitrary `[&::-webkit-scrollbar]:hidden` variant —
   Liquid/this theme's static `content` scan has no arbitrary-variant equivalent, so
   this is hand-written instead of a Tailwind utility (`snippets/product-gallery.liquid`
   README note). PR 5c: keyed on `data-classic-gallery-*` ATTRIBUTES, not classes — the
   scroller/strip carry Next's exact class strings (parity signature = tag + classes) and
   Next's own inline `scrollbar-width:none;-ms-overflow-style:none`; only the WebKit
   pseudo-element needs a stylesheet rule. */
[data-classic-gallery-scroller]::-webkit-scrollbar,
[data-classic-gallery-thumbnails]::-webkit-scrollbar {
  display: none;
}
/* Gallery counter on slides 2..N (PR 5c fix round 1, H-02): the element is Next's
   (`absolute bottom-4 right-4 … z-20`, role=status) but EMPTY, the "k / N" text lives in
   `data-counter` and is painted here — so a 13-image product adds zero visible-text tokens
   over Next's single JS-updated counter (`product-gallery-client.tsx:222-228`), while a
   visitor snapped to slide k still reads "k / N". Slide 1 keeps the real text (what Next
   SSRs). */
[data-counter]::after {
  content: attr(data-counter);
}


/* Cart drawer (`cart_mode: cart`): the shell mounts `<droovin-cart>` right after the cart link. Closed it is 0 px
   wide but would still be a flex item of the header row (`justify-between` would push it to the edge), so it
   leaves the layout; open, it floats under the row (the row is `relative`) as a card. The element only styles its
   own lines (`droovin-cart.element.ts`), so the card look lives here. */
.shopify-section[data-section-type="header"] droovin-cart {
  display: contents;
}
.shopify-section[data-section-type="header"] droovin-cart[open] {
  display: block;
  position: absolute;
  top: 100%;
  inset-inline-end: 0;
  z-index: 20;
  width: min(20rem, calc(100vw - 2rem));
  max-height: 70vh;
  overflow-y: auto;
  padding: 0.5rem 1rem 1rem;
  background-color: var(--droovin-color-surface, #fff);
  border-radius: 0.375rem;
  box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1), 0 0 0 1px #e5e7eb;
}
