/* Keep the existing desktop product page untouched. These sections are only
   enabled for the mobile layout, immediately after the full-bleed note art. */
.wpd-mobile-after-notes,
.wpd-mobile-after-related{display:none}

@media(max-width:767px){
  .wistoria-live .wpd-mobile-after-notes,
  .wistoria-live .wpd-mobile-after-related{
    display:block;
    width:100vw;
    max-width:none;
    margin-left:calc(50% - 50vw);
    padding:14px 13px 20px;
    color:#252321;
    background:#fcf7ee;
  }
  .wistoria-live .wpd-mobile-panel{
    margin:0 0 13px;
    padding:18px 15px;
    border:1px solid #f1e8da;
    border-radius:13px;
    background:#fffdfa;
    box-shadow:0 3px 12px rgba(74,52,24,.035);
  }
  .wistoria-live .wpd-mobile-panel h2{margin:0 0 13px;font-size:17px;line-height:1.3;font-weight:750;color:#252321}
  .wistoria-live .wpd-mobile-kicker{margin:0 0 4px;text-align:center;color:#b77d3c;font-size:9px;font-weight:800;letter-spacing:.17em}
  .wistoria-live .wpd-mobile-journey>h2{text-align:center}
  .wistoria-live .wpd-journey-row{display:flex;align-items:flex-start;justify-content:center;gap:4px;margin:17px 0 2px}
  .wistoria-live .wpd-journey-step{display:flex;flex:1;min-width:0;flex-direction:column;align-items:center;text-align:center}
  .wistoria-live .wpd-journey-image{display:block;width:70px;height:70px;overflow:hidden;border:1px solid #eee1ce;border-radius:50%;background:#fff7eb}
  .wistoria-live .wpd-journey-image img{display:block;width:100%;height:100%;object-fit:cover}
  .wistoria-live .wpd-journey-step>b{margin-top:7px;font-size:10px;letter-spacing:.06em}
  .wistoria-live .wpd-journey-step>small{max-width:105px;margin-top:4px;color:#766c60;font-size:10px;line-height:1.35}
  .wistoria-live .wpd-journey-arrow{padding-top:24px;color:#bf9669;font-size:16px}
  .wistoria-live .wpd-mobile-muted{margin:0;color:#766c60;font-size:12px;line-height:1.5}

  .wistoria-live .wpd-love-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}
  .wistoria-live .wpd-love-card{display:flex;min-height:88px;align-items:center;gap:10px;padding:11px 9px;border:1px solid #f2ece4;border-radius:11px;background:#fff}
  .wistoria-live .wpd-love-card>span:last-child{min-width:0}
  .wistoria-live .wpd-love-card b{display:block;font-size:11px;line-height:1.3}
  .wistoria-live .wpd-love-card small{display:block;margin-top:4px;color:#756d64;font-size:10px;line-height:1.35}
  .wistoria-live .wpd-love-icon,
  .wistoria-live .wpd-use-icon,
  .wistoria-live .wpd-trust-icon,
  .wistoria-live .wpd-mobile-help-icon{display:grid;flex:0 0 38px;width:38px;height:38px;place-items:center;border-radius:50%}
  .wistoria-live .wpd-mobile-panel svg{display:block;width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
  .wistoria-live .wpd-love-tone-0{background:#fff0df;color:#e77e2c}
  .wistoria-live .wpd-love-tone-1{background:#f1eaff;color:#8060ca}
  .wistoria-live .wpd-love-tone-2{background:#e7f5ed;color:#3e8b65}
  .wistoria-live .wpd-love-tone-3{background:#fff1df;color:#d48630}

  .wistoria-live .wpd-use-list{display:grid;gap:3px}
  .wistoria-live .wpd-use-row{display:flex;align-items:center;gap:12px;padding:9px 1px}
  .wistoria-live .wpd-use-row>span:last-child{min-width:0}
  .wistoria-live .wpd-use-row b{display:block;font-size:12px;line-height:1.3}
  .wistoria-live .wpd-use-row small{display:block;margin-top:4px;color:#756d64;font-size:11px;line-height:1.4}
  .wistoria-live .wpd-use-tone-0{background:#fff0df;color:#d87822}
  .wistoria-live .wpd-use-tone-1{background:#e6f5fc;color:#368bb0}
  .wistoria-live .wpd-use-tone-2{background:#f2eaff;color:#8055a6}
  .wistoria-live .wpd-use-tone-3{background:#eaf4e4;color:#588242}

  .wistoria-live .wpd-mobile-details h2{margin-bottom:4px}
  .wistoria-live .wpd-mobile-accordion{border-top:1px solid #eee7dd;padding:13px 0}
  .wistoria-live .wpd-mobile-accordion:last-child{padding-bottom:2px}
  .wistoria-live .wpd-mobile-accordion summary{display:flex;align-items:center;justify-content:space-between;gap:12px;list-style:none;cursor:pointer;font-size:13px;font-weight:700}
  .wistoria-live .wpd-mobile-accordion summary::-webkit-details-marker{display:none}
  .wistoria-live .wpd-accordion-mark{color:#765f49;font-size:17px;line-height:1}
  .wistoria-live .wpd-mobile-accordion[open] .wpd-accordion-mark{transform:rotate(45deg)}
  .wistoria-live .wpd-mobile-accordion p{margin:10px 0 0;color:#70675e;font-size:11px;line-height:1.55}
  .wistoria-live .wpd-mobile-accordion h3{margin:12px 0 0;font-size:11px}
  .wistoria-live .wpd-mobile-accordion>a{display:inline-block;margin:9px 12px 0 0;color:#a6531e;font-size:11px;text-decoration:underline}

  /* Reviews remain WooCommerce's real reviews and submission form. */
  .wistoria-live .wpd-review-frame{padding:14px 13px 18px;border:1px solid #eee7dd;border-radius:12px;background:#fffdfa}
  .wistoria-live .wpd-review-head{display:flex;align-items:center;gap:7px;flex-wrap:wrap;margin-bottom:12px;padding-bottom:10px;border-bottom:1px solid #eee7dd}
  .wistoria-live .wpd-review-title{display:flex;align-items:center;gap:7px;flex-wrap:wrap;min-width:0}
  .wistoria-live .wpd-review-title h2{margin:0;font-size:12px;line-height:1.3;font-weight:800}
  .wistoria-live .wpd-review-stars{color:#f2a400;font-size:16px;letter-spacing:-1px;white-space:nowrap}
  .wistoria-live .wpd-review-count{color:#625b54;font-size:10px}
  .wistoria-live .wpd-write-review{display:inline-flex;align-items:center;justify-content:center;margin-left:auto;padding:7px 10px;border-radius:7px;background:#ff741c;color:#fff;font-size:10px;font-weight:700;white-space:nowrap}
  .wistoria-live .wpd-review-frame #comments>h2,
  .wistoria-live .wpd-review-frame .wd-rating-summary-wrap,
  .wistoria-live .wpd-review-frame .wd-reviews-filters,
  .wistoria-live .wpd-review-frame .wd-reviews-heading{display:none!important}
  .wistoria-live .wpd-review-frame #comments{margin:0!important;padding:0!important}
  .wistoria-live .wpd-review-frame .woocommerce-noreviews{margin:8px 0 14px;padding:11px 12px;border:1px solid #efe6da;border-radius:8px;background:#fffaf3;color:#6b6258;font-size:12px}
  .wistoria-live .wpd-review-frame .commentlist{margin:0 0 15px!important;padding:0!important;list-style:none!important}
  .wistoria-live .wpd-review-frame .commentlist li{margin:0 0 9px!important;padding:12px!important;border:1px solid #eee7dd;border-radius:9px;background:#fff}
  .wistoria-live .wpd-review-frame #review_form_wrapper{margin:12px 0 0!important;padding:14px 0 0;border-top:1px solid #eee7dd}
  .wistoria-live .wpd-review-frame #reply-title{display:block;margin:0 0 8px;font-size:14px;font-weight:700}
  .wistoria-live .wpd-review-frame #review_form .comment-notes{color:#6b6258;font-size:11px}
  .wistoria-live .wpd-review-frame #review_form .comment-form{display:grid;grid-template-columns:1fr;gap:10px}
  .wistoria-live .wpd-review-frame #review_form .comment-form>*{grid-column:1}
  .wistoria-live .wpd-review-frame #review_form label{display:block;margin-bottom:5px;font-size:11px;font-weight:600}
  .wistoria-live .wpd-review-frame #review_form input[type=text],
  .wistoria-live .wpd-review-frame #review_form input[type=email],
  .wistoria-live .wpd-review-frame #review_form textarea{width:100%;min-height:42px;padding:10px 12px;border:1px solid #e8e1d8;border-radius:8px;background:#fff;font:inherit}
  .wistoria-live .wpd-review-frame #review_form textarea{min-height:110px;resize:vertical}
  .wistoria-live .wpd-review-frame #review_form .submit{border:0;border-radius:7px;background:#ff741c;color:#fff;padding:10px 18px;font-weight:700;cursor:pointer}

  /* Keep the real related products as a swipeable mobile strip. */
  .wistoria-live .lower-design .related.live-related{width:100vw;max-width:none;margin:0 calc(50% - 50vw)!important;padding:12px 13px 18px;background:#fcf7ee}
  .wistoria-live .lower-design .related.live-related .relatedhead{display:flex;align-items:center;justify-content:space-between;gap:10px;margin:0 0 11px}
  .wistoria-live .lower-design .related.live-related .relatedhead h2{margin:0;font-size:14px}
  .wistoria-live .lower-design .related.live-related .cards{display:flex;gap:10px;overflow-x:auto;padding:2px 1px 9px;scroll-snap-type:x mandatory;-webkit-overflow-scrolling:touch}
  .wistoria-live .lower-design .related.live-related .live-related-card{position:relative;flex:0 0 44%;min-width:0;padding:8px;border:1px solid #eee7dd;border-radius:10px;background:#fff;scroll-snap-align:start}
  .wistoria-live .lower-design .related.live-related .live-related-card .swatch{display:block;height:135px;border-radius:7px;background:#fff}
  .wistoria-live .lower-design .related.live-related .live-related-card .swatch img{width:100%;height:100%;object-fit:contain}
  .wistoria-live .lower-design .related.live-related .live-related-card>small{display:block;margin-top:7px;color:#7b7166;font-size:9px}
  .wistoria-live .lower-design .related.live-related .live-related-card h3{margin:4px 0;font-size:11px;line-height:1.35}
  .wistoria-live .lower-design .related.live-related .live-related-card .cardprice .amount{font-size:12px}
  .wistoria-live .lower-design .related.live-related .live-related-card .sale-tag{top:7px;right:7px;padding:4px 6px;font-size:9px}

  .wistoria-live .wpd-mobile-after-related{padding-top:0}
  .wistoria-live .wpd-mobile-help{text-align:center;padding:19px 15px}
  .wistoria-live .wpd-mobile-help-icon{margin:0 auto 9px;background:#e8f6e8;color:#278447}
  .wistoria-live .wpd-mobile-help h2{margin-bottom:6px}
  .wistoria-live .wpd-mobile-help p{margin:0 0 12px;color:#71685f;font-size:11px;line-height:1.45}
  .wistoria-live .wpd-talk-whatsapp{display:inline-flex;align-items:center;justify-content:center;gap:7px;border:0;border-radius:7px;background:#171c1d;color:#fff;padding:11px 15px;font-weight:700;font-size:12px;cursor:pointer}
  .wistoria-live .wpd-mobile-trust>div{display:flex;align-items:center;gap:11px;border-top:1px solid #eee9e1;padding:10px 0}
  .wistoria-live .wpd-mobile-trust>div:first-of-type{border-top:0;padding-top:0}
  .wistoria-live .wpd-trust-icon{flex-basis:36px;width:36px;height:36px;border-radius:11px}
  .wistoria-live .wpd-trust-icon svg{width:19px;height:19px}
  .wistoria-live .wpd-trust-green{background:#eaf5e8;color:#4f8c49}
  .wistoria-live .wpd-trust-blue{background:#e7f4fa;color:#3c8cae}
  .wistoria-live .wpd-trust-purple{background:#f2eafa;color:#8b65aa}
  .wistoria-live .wpd-trust-orange{background:#fff0df;color:#d58435}
  .wistoria-live .wpd-trust-row>span:last-child{min-width:0}
  .wistoria-live .wpd-trust-row b{display:block;font-size:11px;line-height:1.3}
  .wistoria-live .wpd-trust-row small{display:block;margin-top:3px;color:#776f66;font-size:10px;line-height:1.35}
}

@media(max-width:767px){
  .wistoria-live .gallery{grid-template-columns:1fr!important;gap:8px!important}
  .wistoria-live .gallery .hero-column{grid-row:1}
  .wistoria-live .gallery .thumbs.wpd-gallery-thumbs{grid-row:2;display:flex!important;flex-direction:row!important;gap:8px;overflow-x:auto;max-width:100%;padding:2px 0 6px;scroll-snap-type:x mandatory}
  .wistoria-live .wpd-gallery-thumbs .wpd-gallery-thumb{flex:0 0 58px!important;width:58px!important;height:62px!important;min-height:0!important;padding:3px!important;border:1px solid #e8e2d9!important;border-radius:7px!important;background:#fff!important;scroll-snap-align:start;cursor:pointer}
  .wistoria-live .wpd-gallery-thumbs .wpd-gallery-thumb.selected{border:2px solid #ff741c!important}
  .wistoria-live .wpd-gallery-thumbs .wpd-gallery-thumb img{width:100%!important;height:100%!important;object-fit:contain!important}
  .wistoria-live .gallery .hero.catalog-view{background-image:none!important;background-color:#fff!important}
  .wistoria-live .gallery .hero.catalog-view .real-product-photo{width:100%!important;height:100%!important;object-fit:contain!important;left:0!important;top:0!important;transform:none!important}
  .wistoria-live .gallery .hero.catalog-view .badge,.wistoria-live .gallery .hero.catalog-view .fresh{display:none!important}
}

/* Mobile sale countdown, coupon apply/copy affordance, and persistent purchase bar. */
.wpd-sale-countdown,.wpd-mobile-sticky{display:none}
@media(max-width:767px){
  body.wpd-mobile-product{padding-bottom:calc(76px + env(safe-area-inset-bottom))!important}
  /* Use this plugin's price-aware purchase bar instead of the theme's overlapping button-only bar. */
  body.wpd-mobile-product #hsda-sticky-cart{display:none!important}
  .wpd-sale-countdown{display:block;padding:8px 10px 7px;background:#111;color:#fff;text-align:center}
  .wpd-sale-countdown>b{color:#ffcd54;font-size:10px;letter-spacing:.08em}
  .wpd-timer-digits{display:flex;justify-content:center;align-items:center;gap:6px;margin:5px 0 0}
  .wpd-timer-digits>span{min-width:34px;padding:3px 4px;border-radius:5px;background:#fff7e8;color:#222}
  .wpd-timer-digits strong{display:block;font-size:15px;line-height:1.1;font-variant-numeric:tabular-nums}
  .wpd-timer-digits small{display:block;font-size:7px}
  .wpd-timer-digits i{font-style:normal;color:#e4d7c2}
  .wistoria-live .wpd-coupon-box{gap:9px;padding:10px 11px;border-radius:10px}
  .wistoria-live .wpd-coupon-box .offer-copy{min-width:0}
  .wistoria-live .wpd-coupon-box .offer-copy b{display:block;font-size:12px;line-height:1.3}
  .wistoria-live .wpd-coupon-box .offer-copy small{margin-top:3px;font-size:10px;line-height:1.35}
  .wistoria-live .wpd-coupon-box .wpd-coupon-status{color:#71604b;font-size:9px}
  .wistoria-live .wpd-coupon-apply{flex:0 0 auto;border:0;border-radius:7px;background:#ff741c;color:#fff;padding:9px 13px;font-size:11px;font-weight:700;cursor:pointer}
  .wpd-mobile-sticky{position:fixed;z-index:99999;right:0;bottom:0;left:0;display:flex;align-items:center;gap:8px;width:100%;padding:9px 10px calc(9px + env(safe-area-inset-bottom));border-top:1px solid #e8e3dc;background:#fff;box-shadow:0 -4px 18px rgba(0,0,0,.1)}
  .wpd-sticky-product{flex:0 1 44%;width:44%;min-width:0}
  .wpd-sticky-product>small:first-child{display:block;overflow:hidden;color:#777;font-size:9px;white-space:nowrap;text-overflow:ellipsis}
  .wpd-sticky-prices{display:flex;align-items:baseline;gap:5px;white-space:nowrap}
  .wpd-sticky-prices b{font-size:16px;line-height:1.2}
  body.wpd-mobile-product .wpd-mobile-sticky .wpd-sticky-prices b,
  body.wpd-mobile-product .wpd-mobile-sticky .wpd-sticky-prices .amount{color:#111!important}
  .wpd-sticky-prices .amount{font-size:inherit}
  .wpd-sticky-prices del{color:#888;font-size:9px}
  .wpd-sticky-save{display:block;color:#268143;font-size:9px;font-weight:700;line-height:1.2}
  .wpd-sticky-actions{display:flex;flex:0 1 54%;width:54%;gap:6px}
  .wpd-sticky-actions button{flex:1;min-width:0;min-height:42px;border:0;border-radius:7px;padding:8px 4px;color:#fff;font-size:10px;font-weight:700;white-space:nowrap;cursor:pointer}
  body.wpd-mobile-product .wpd-mobile-sticky .wpd-sticky-add{background:#ff741c!important;color:#fff!important}
  body.wpd-mobile-product .wpd-mobile-sticky .wpd-sticky-buy{background:#151a1c!important;color:#fff!important}
}
@media(max-width:350px){
  .wpd-sticky-product{flex-basis:43%;width:43%}
  .wpd-sticky-actions{flex-basis:55%;width:55%;gap:4px}
  .wpd-sticky-actions button{padding-inline:2px;font-size:9px}
  .wpd-sticky-prices b{font-size:15px}
}
