/* ═══════════════════════════════════════════════
   Papelmanía Product Templates — Shared CSS v1.0
   ═══════════════════════════════════════════════ */

.pm-product-page *, .pm-product-page *::before, .pm-product-page *::after {
  margin: 0; padding: 0; box-sizing: border-box;
}
.pm-product-page {
  /* Default colors — overridden by inline CSS from admin settings */
  --cream: #FBF7F0; --warm-white: #FFFDF9;
  --terracotta: #C8704A; --terracotta-light: #E8956E; --terracotta-dark: #A85A38;
  --sage: #8B9E82; --sage-light: #C5D4BC; --sage-bg: #f2f5f0;
  --ink: #2C2420; --ink-soft: #5A4E47; --ink-muted: #8C7F77;
  --blush: #F0DDD2; --gold: #C9A96E; --gold-light: #E8D5A8;
  --border: rgba(44,36,32,0.08); --border-med: rgba(44,36,32,0.12);
  --shadow-sm: 0 1px 3px rgba(44,36,32,0.06);
  --shadow-md: 0 4px 20px rgba(44,36,32,0.08);
  --shadow-lg: 0 12px 40px rgba(44,36,32,0.1);
  --radius: 12px; --radius-lg: 20px; --radius-xl: 28px;
  --serif: 'DM Serif Display', Georgia, serif;
  --sans: 'DM Sans', -apple-system, sans-serif;
  --ease: cubic-bezier(0.25, 0.46, 0.45, 0.94);
  font-family: var(--sans) !important;
  color: var(--ink); line-height: 1.6;
  -webkit-font-smoothing: antialiased;

  /* Break out of any theme content wrapper to go full width */
  width: 100vw !important;
  max-width: 100vw !important;
  position: relative !important;
  left: 50% !important;
  right: 50% !important;
  margin-left: -50vw !important;
  margin-right: -50vw !important;
  overflow-x: hidden;
}

/* Force Astra theme parent containers to go full-width */
.site-content:has(.pm-product-page),
.ast-container:has(.pm-product-page),
#content:has(.pm-product-page),
#primary:has(.pm-product-page),
.content-area:has(.pm-product-page),
article:has(.pm-product-page) {
  max-width: 100% !important;
  width: 100% !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
}

/* Astra specific: remove sidebar layout padding and container limits */
.single-product .ast-container {
  max-width: 100% !important;
  padding: 0 !important;
}
.single-product .site-content {
  padding: 0 !important;
}
.single-product #primary {
  padding: 0 !important;
  margin: 0 !important;
}
.single-product .ast-article-post,
.single-product .ast-article-single,
.single-product article.product {
  padding: 0 !important;
  margin: 0 !important;
  max-width: 100% !important;
}
.single-product .ast-woocommerce-container {
  padding: 0 !important;
  max-width: 100% !important;
}
/* Remove Astra separate container box style on product pages */
.single-product.ast-separate-container .ast-article-single {
  background: transparent !important;
  padding: 0 !important;
}
.pm-product-page a { text-decoration: none; color: inherit; }
.pm-product-page img { max-width: 100%; display: block; }
.pm-product-page button { font-family: inherit; cursor: pointer; border: none; background: none; }
.pm-product-page ul { list-style: none; }
.pm-container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }

/* ─── Product Hero ─── */
.pm-product-hero { padding: 12px 0 60px; }
.pm-product-hero .pm-container { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: start; }
.pm-gallery { position: sticky; top: 100px; }
.pm-gallery-main { width: 100%; aspect-ratio: 1; border-radius: var(--radius-lg); overflow: hidden; background: var(--warm-white); box-shadow: var(--shadow-md); margin-bottom: 12px; }
.pm-gallery-main img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s var(--ease); }
.pm-gallery-main:hover img { transform: scale(1.03); }
.pm-gallery-thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(60px, 1fr)); gap: 8px; }
.pm-gallery-thumb { aspect-ratio: 1; border-radius: 10px; overflow: hidden; cursor: pointer; border: 2px solid transparent; transition: all 0.25s var(--ease); opacity: 0.6; }
.pm-gallery-thumb.active, .pm-gallery-thumb:hover { border-color: var(--terracotta); opacity: 1; }
.pm-gallery-thumb img { width: 100%; height: 100%; object-fit: cover; }

/* Kit gallery is taller */
.pm-product-page.pm-template-kit .pm-gallery-main { aspect-ratio: 4 / 4.8; }

/* ─── Product Info ─── */
.pm-product-info { padding-top: 8px; }
.pm-product-badge { display: inline-flex; align-items: center; gap: 6px; background: var(--sage-bg); color: var(--sage); font-size: 12px; font-weight: 600; padding: 6px 14px; border-radius: 50px; letter-spacing: 0.04em; text-transform: uppercase; margin-bottom: 16px; }
.pm-product-title { font-family: var(--serif) !important; font-size: 32px; line-height: 1.2; color: var(--ink); margin-bottom: 12px; }
.pm-product-rating { display: flex; align-items: center; gap: 8px; margin-bottom: 20px; }
.pm-stars { color: var(--gold); font-size: 16px; letter-spacing: 2px; }
.pm-rating-text { font-size: 13px; color: var(--ink-muted); }
.pm-rating-text strong { color: var(--ink-soft); }
.pm-product-price { font-family: var(--serif) !important; font-size: 36px; color: var(--terracotta); margin-bottom: 6px; }
.pm-product-price del { color: var(--ink-muted); font-size: 22px; }
.pm-product-price ins { text-decoration: none; }
.pm-product-price-note { font-size: 13px; color: var(--ink-muted); margin-bottom: 24px; }

/* Trust badges */
.pm-trust-badges-row { display: flex; gap: 16px; margin-bottom: 28px; flex-wrap: wrap; }
.pm-trust-badge-item { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--ink-soft); font-weight: 500; }
.pm-trust-badge-icon { width: 32px; height: 32px; border-radius: 8px; display: flex; align-items: center; justify-content: center; font-size: 15px; flex-shrink: 0; }
.pm-trust-badge-icon.shipping { background: #EEF5EB; }
.pm-trust-badge-icon.clase { background: #FFF3E0; }
.pm-trust-badge-icon.gift { background: #FDE8E8; }
.pm-trust-badge-icon.peru { background: #FFF3E0; }
.pm-trust-badge-icon.quality { background: #EEF5EB; }

/* Variants */
.pm-variant-section { margin-bottom: 24px; }
.pm-variant-label { font-size: 14px; font-weight: 600; color: var(--ink); margin-bottom: 10px; }
.pm-variant-options { display: flex; gap: 8px; flex-wrap: wrap; }
.pm-variant-option { padding: 10px 20px; border-radius: 50px; border: 1.5px solid var(--border-med); font-size: 13.5px; font-weight: 500; color: var(--ink-soft); background: var(--warm-white); transition: all 0.25s var(--ease); }
.pm-variant-option:hover { border-color: var(--terracotta-light); color: var(--ink); }
.pm-variant-option.active { border-color: var(--terracotta); background: var(--terracotta); color: white; }

/* Purchase */
.pm-purchase-row { display: flex; gap: 12px; align-items: center; margin-bottom: 16px; }
.pm-qty-control { display: flex; align-items: center; border: 1.5px solid var(--border-med); border-radius: var(--radius); overflow: hidden; background: var(--warm-white); }
.pm-qty-btn { width: 44px; height: 48px; display: flex; align-items: center; justify-content: center; font-size: 18px; color: var(--ink-soft); transition: all 0.2s; }
.pm-qty-btn:hover { background: var(--cream); color: var(--terracotta); }
.pm-qty-value { width: 40px; text-align: center; font-size: 15px; font-weight: 600; color: var(--ink); border: none; background: none; font-family: var(--sans); }
.pm-btn-add-cart { flex: 1; height: 52px; background: var(--terracotta); color: white; border-radius: var(--radius); font-size: 15px; font-weight: 600; letter-spacing: 0.02em; display: flex; align-items: center; justify-content: center; gap: 10px; transition: all 0.3s var(--ease); box-shadow: 0 4px 16px rgba(200,112,74,0.3); position: relative; overflow: hidden; }
.pm-btn-add-cart:hover { background: var(--terracotta-dark); transform: translateY(-1px); box-shadow: 0 6px 24px rgba(200,112,74,0.4); }
.pm-btn-add-cart.loading { opacity: 0.7; pointer-events: none; }
.pm-btn-add-cart.success { background: var(--sage); }


/* Shipping info */
.pm-shipping-info-box { background: var(--warm-white); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 18px; margin-bottom: 24px; }
.pm-shipping-info-item { display: flex; align-items: flex-start; gap: 10px; font-size: 13px; color: var(--ink-soft); line-height: 1.5; }
.pm-shipping-info-item + .pm-shipping-info-item { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--border); }
.pm-shipping-info-item .icon { flex-shrink: 0; font-size: 16px; margin-top: 1px; }
.pm-shipping-info-item strong { color: var(--ink); }

/* Description accordion */
.pm-desc-section { border-top: 1px solid var(--border); padding-top: 24px; }
.pm-desc-section + .pm-desc-section { padding-top: 0; border-top: none; }
.pm-desc-toggle { width: 100%; display: flex; justify-content: space-between; align-items: center; font-size: 15px; font-weight: 600; color: var(--ink); padding: 12px 0; cursor: pointer; }
.pm-desc-toggle .arrow { transition: transform 0.3s; font-size: 12px; color: var(--ink-muted); }
.pm-desc-toggle.open .arrow { transform: rotate(180deg); }
.pm-desc-content { max-height: 0; overflow: hidden; transition: max-height 0.4s var(--ease); }
.pm-desc-content.open { max-height: 800px; }
.pm-desc-content-inner { padding: 4px 0 20px; font-size: 14px; color: var(--ink-soft); line-height: 1.7; }
.pm-desc-content-inner p + p { margin-top: 12px; }
.pm-desc-content-inner ul { margin-top: 10px; list-style: none; }
.pm-desc-content-inner li { padding-left: 18px; position: relative; margin-bottom: 6px; }
.pm-desc-content-inner li::before { content: '✦'; position: absolute; left: 0; color: var(--terracotta); font-size: 10px; top: 3px; }

/* ─── Section headers ─── */
.pm-section-header { text-align: center !important; margin-bottom: 40px; }
.pm-section-header h2, .pm-section-header p, .pm-section-header .pm-overline { text-align: center !important; margin-left: auto !important; margin-right: auto !important; }
.pm-overline { font-size: 12px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--terracotta); margin-bottom: 8px; }
.pm-section-header h2 { font-family: var(--serif) !important; font-size: 30px; color: var(--ink); line-height: 1.25; }
.pm-section-header p { font-size: 15px; color: var(--ink-muted); max-width: 500px; margin: 10px auto 0; line-height: 1.6; }

/* ─── YouTube embed section ─── */
.pm-video-section { padding: 64px 0; background: var(--warm-white); }
.pm-video-grid { display: grid; gap: 20px; max-width: 780px; margin: 0 auto; }
.pm-video-wrapper { border-radius: var(--radius-xl); overflow: hidden; box-shadow: var(--shadow-lg); aspect-ratio: 16/9; background: var(--ink); position: relative; cursor: pointer; }
.pm-video-wrapper img { width: 100%; height: 100%; object-fit: cover; opacity: 0.85; }
.pm-video-play-btn { position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%); width: 64px; height: 64px; background: var(--terracotta); border-radius: 50%; display: flex; align-items: center; justify-content: center; box-shadow: 0 8px 32px rgba(200,112,74,0.4); transition: all 0.3s var(--ease); }
.pm-video-play-btn::after { content: ''; width: 0; height: 0; border-style: solid; border-width: 10px 0 10px 18px; border-color: transparent transparent transparent white; margin-left: 3px; }
.pm-video-wrapper:hover .pm-video-play-btn { transform: translate(-50%,-50%) scale(1.1); }
.pm-video-wrapper iframe { width: 100%; height: 100%; border: none; }

/* ─── Reviews ─── */
.pm-reviews-section { padding: 64px 0; }
.pm-reviews-overview { display: grid; grid-template-columns: 240px 1fr; gap: 40px; align-items: center; margin-bottom: 40px; }
.pm-reviews-big-score { text-align: center; padding: 28px; background: var(--warm-white); border-radius: var(--radius-lg); border: 1px solid var(--border); }
.pm-reviews-big-number { font-family: var(--serif) !important; font-size: 56px; color: var(--ink); line-height: 1; }
.pm-reviews-big-stars { color: var(--gold); font-size: 20px; letter-spacing: 3px; margin: 8px 0 4px; }
.pm-reviews-big-count { font-size: 13px; color: var(--ink-muted); }
.pm-rating-bars { display: flex; flex-direction: column; gap: 8px; }
.pm-rating-bar-row { display: flex; align-items: center; gap: 10px; }
.pm-rating-bar-label { font-size: 13px; color: var(--ink-soft); white-space: nowrap; width: 70px; }
.pm-rating-bar-track { flex: 1; height: 8px; background: var(--cream); border-radius: 4px; overflow: hidden; }
.pm-rating-bar-fill { height: 100%; background: var(--gold); border-radius: 4px; transition: width 1s var(--ease); }
.pm-rating-bar-pct { font-size: 12px; color: var(--ink-muted); width: 36px; text-align: right; }
.pm-reviews-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 20px; }
.pm-review-card { background: var(--warm-white); border-radius: var(--radius-lg); padding: 24px; border: 1px solid var(--border); transition: all 0.3s var(--ease); }
.pm-review-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.pm-review-stars { color: var(--gold); font-size: 14px; letter-spacing: 2px; margin-bottom: 10px; }
.pm-review-badge { display: inline-block; background: var(--sage-bg); color: var(--sage); font-size: 11px; font-weight: 600; padding: 3px 8px; border-radius: 4px; margin-bottom: 8px; }
.pm-review-text { font-size: 14px; color: var(--ink-soft); line-height: 1.6; margin-bottom: 14px; font-style: italic; }
.pm-review-author { display: flex; align-items: center; gap: 10px; }
.pm-review-avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--blush); display: flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 600; color: var(--terracotta); }
.pm-review-author-info .name { font-size: 13px; font-weight: 600; color: var(--ink); }
.pm-review-author-info .verified { font-size: 11px; color: var(--sage); }

/* ─── FAQ ─── */
.pm-faq-section { padding: 64px 0; background: var(--warm-white); }
.pm-faq-section .pm-section-header { text-align: center !important; display: block !important; }
.pm-faq-section .pm-section-header h2 { text-align: center !important; }
.pm-faq-grid { max-width: 720px; margin: 0 auto; }
.pm-faq-item { border-bottom: 1px solid var(--border); }
.pm-faq-question { width: 100%; text-align: left; padding: 20px 0; font-size: 15px; font-weight: 600; color: var(--ink); display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.pm-faq-icon { width: 28px; height: 28px; border-radius: 50%; background: var(--cream); display: flex; align-items: center; justify-content: center; font-size: 14px; color: var(--ink-muted); flex-shrink: 0; transition: all 0.3s; }
.pm-faq-item.open .pm-faq-icon { background: var(--terracotta); color: white; transform: rotate(45deg); }
.pm-faq-answer { max-height: 0; overflow: hidden; transition: max-height 0.4s var(--ease); }
.pm-faq-item.open .pm-faq-answer { max-height: 300px; }
.pm-faq-answer-inner { padding-bottom: 20px; font-size: 14px; color: var(--ink-soft); line-height: 1.7; }

/* ─── About ─── */
.pm-about-section { padding: 64px 0; }
.pm-about-inner { display: grid; grid-template-columns: 1fr 1.2fr; gap: 48px; align-items: center; max-width: 900px; margin: 0 auto; }
.pm-about-image { border-radius: var(--radius-xl); overflow: hidden; box-shadow: var(--shadow-lg); aspect-ratio: 3/4; position: relative; }
.pm-about-image img { width: 100%; height: 100%; object-fit: cover; }
.pm-about-stamp { position: absolute; bottom: 20px; right: 20px; background: var(--warm-white); border-radius: var(--radius); padding: 10px 14px; font-size: 11px; font-weight: 600; color: var(--terracotta); box-shadow: var(--shadow-md); }
.pm-about-text h3 { font-family: var(--serif) !important; font-size: 26px; color: var(--ink); margin-bottom: 16px; }
.pm-about-text p { font-size: 14.5px; color: var(--ink-soft); line-height: 1.7; margin-bottom: 12px; }
.pm-about-tags { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 16px; }
.pm-about-tag { font-size: 12px; padding: 6px 14px; border-radius: 50px; border: 1px solid var(--border-med); color: var(--ink-soft); font-weight: 500; }

/* ─── Social — uses [instagram-feed] shortcode ─── */
.pm-social-section { padding: 64px 0; background: var(--warm-white); overflow: hidden; }
.pm-social-feed-wrapper { max-width: 100%; }

/* ─── Trust strip ─── */
.pm-trust-strip { padding: 40px 0; background: var(--ink); color: var(--cream); }
.pm-trust-strip-inner { display: flex; justify-content: center; gap: 48px; flex-wrap: wrap; }
.pm-trust-strip-item { font-size: 14px; font-weight: 500; }

/* ─── Related ─── */
.pm-related-section { padding: 64px 0; }
.pm-related-scroll { display: grid; grid-template-columns: repeat(4,1fr); gap: 20px; }
.pm-related-card { background: var(--warm-white); border-radius: var(--radius-lg); overflow: hidden; border: 1px solid var(--border); transition: all 0.3s var(--ease); }
.pm-related-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.pm-related-card-img { aspect-ratio: 1; overflow: hidden; }
.pm-related-card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s var(--ease); }
.pm-related-card:hover .pm-related-card-img img { transform: scale(1.05); }
.pm-related-card-info { padding: 16px; }
.pm-related-card-info h4 { font-family: var(--serif) !important; font-size: 14.5px; color: var(--ink); margin-bottom: 6px; line-height: 1.3; }
.pm-related-card-info .price { font-size: 16px; font-weight: 600; color: var(--terracotta); }

/* ─── Newsletter ─── */
.pm-newsletter-section { padding: 64px 0; background: linear-gradient(135deg, var(--blush) 0%, var(--cream) 100%); }
.pm-newsletter-inner { text-align: center; max-width: 520px; margin: 0 auto; }
.pm-newsletter-inner h2 { font-family: var(--serif) !important; font-size: 28px; color: var(--ink); margin-bottom: 8px; }
.pm-newsletter-inner p { font-size: 14px; color: var(--ink-soft); margin-bottom: 24px; }
.pm-newsletter-form { display: flex; gap: 8px; max-width: 420px; margin: 0 auto; }
.pm-newsletter-input { flex: 1; height: 48px; border: 1.5px solid var(--border-med); border-radius: var(--radius); padding: 0 16px; font-size: 14px; font-family: var(--sans); background: var(--warm-white); color: var(--ink); outline: none; transition: border-color 0.2s; }
.pm-newsletter-input:focus { border-color: var(--terracotta); }
.pm-newsletter-input::placeholder { color: var(--ink-muted); }
.pm-newsletter-btn { height: 48px; padding: 0 24px; background: var(--terracotta); color: white; border-radius: var(--radius); font-size: 14px; font-weight: 600; transition: all 0.3s var(--ease); white-space: nowrap; }
.pm-newsletter-btn:hover { background: var(--terracotta-dark); }

/* ─── Floating elements ─── */

.pm-sticky-mobile-bar { display: none; position: fixed; bottom: 0; left: 0; right: 0; background: var(--warm-white); border-top: 1px solid var(--border); padding: 12px 20px; z-index: 200; box-shadow: 0 -4px 24px rgba(0,0,0,0.08); }
.pm-sticky-mobile-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.pm-sticky-price { font-family: var(--serif) !important; font-size: 22px; color: var(--terracotta); }
.pm-sticky-cta { flex: 1; max-width: 220px; height: 46px; background: var(--terracotta); color: white; border-radius: var(--radius); font-size: 14px; font-weight: 600; display: flex; align-items: center; justify-content: center; gap: 6px; }

/* ─── Animations ─── */
.pm-fade-up { opacity: 0; transform: translateY(24px); transition: opacity 0.6s var(--ease), transform 0.6s var(--ease); }
.pm-fade-up.visible { opacity: 1; transform: translateY(0); }

/* ─── Product specs grid (Standard template) ─── */
/* ─── Short description (Standard template) ─── */
.pm-short-desc { font-size: 14px; color: var(--ink-soft); line-height: 1.7; margin-bottom: 20px; padding-bottom: 20px; border-bottom: 1px solid var(--border); }
.pm-short-desc p { margin-bottom: 8px; }
.pm-short-desc p:last-child { margin-bottom: 0; }
.pm-short-desc strong { color: var(--ink); }

/* ─── Product specs grid (Standard template) ─── */
.pm-specs-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; margin-bottom: 24px; }
.pm-spec-item { background: var(--warm-white); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; text-align: center; }
.pm-spec-item .pm-spec-icon { font-size: 24px; margin-bottom: 6px; }
.pm-spec-item .pm-spec-label { font-size: 11px; color: var(--ink-muted); text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 2px; }
.pm-spec-item .pm-spec-value { font-size: 14px; font-weight: 600; color: var(--ink); }

/* ─── "You might also like" compact row (Standard) ─── */
.pm-also-like { padding: 48px 0; }
.pm-also-like-scroll { display: flex; gap: 16px; overflow-x: auto; scrollbar-width: none; padding-bottom: 8px; }
.pm-also-like-scroll::-webkit-scrollbar { display: none; }
.pm-also-like-card { flex: 0 0 180px; text-align: center; }
.pm-also-like-card img { width: 180px; height: 180px; object-fit: cover; border-radius: var(--radius-lg); border: 1px solid var(--border); margin-bottom: 8px; transition: transform 0.3s var(--ease); }
.pm-also-like-card:hover img { transform: scale(1.04); }
.pm-also-like-card h4 { font-size: 13px; color: var(--ink); line-height: 1.3; margin-bottom: 4px; }
.pm-also-like-card .price { font-size: 14px; font-weight: 600; color: var(--terracotta); }

/* ─── RESPONSIVE ─── */
@media (max-width: 900px) {
  .pm-product-hero .pm-container { grid-template-columns: 1fr; gap: 32px; }
  .pm-gallery { position: relative; top: auto; }
  .pm-reviews-overview { grid-template-columns: 1fr; gap: 24px; }
  .pm-reviews-grid { grid-template-columns: 1fr; }
  .pm-about-inner { grid-template-columns: 1fr; gap: 32px; }
  .pm-related-scroll { grid-template-columns: repeat(2,1fr); }
  .pm-trust-strip-inner { gap: 24px; }
}
@media (max-width: 600px) {
  .pm-product-title { font-size: 26px; }
  .pm-product-price { font-size: 30px; }
  .pm-trust-strip-inner { flex-direction: column; align-items: center; gap: 16px; }
  .pm-related-scroll { grid-template-columns: 1fr; }
  .pm-newsletter-form { flex-direction: column; }
  .pm-sticky-mobile-bar { display: block; }
  .pm-product-page { padding-bottom: 80px; }
  .pm-section-header h2 { font-size: 24px; }
}
