/*
Theme Name:   Cocoon Child - PickupAV
Theme URI:    https://pickupav.com/
Description:  PickupAV カスタムTOPページデザイン用子テーマ
Author:       PickupAV
Author URI:   https://pickupav.com/
Template:     cocoon-master
Version:      1.0.0
License:      GNU General Public License v2 or later
License URI:  http://www.gnu.org/licenses/gpl-2.0.html
Text Domain:  cocoon-child
*/

/* 子テーマ固有のスタイルは assets/css/front-page.css に記述 */

/* ===== Individual article first-view optimization ===== */

/*
 * On wide screens the 100%-width sample player pushed the first CTA to about
 * 1,173px from the top. Keep the player prominent while bringing the purchase
 * path much closer to the first viewport. Mobile keeps the natural full width.
 */
@media screen and (min-width: 769px) {
  body.single .entry-content {
    padding-right: clamp(28px, 3vw, 48px) !important;
    padding-left: clamp(28px, 3vw, 48px) !important;
  }

  body.single .entry-content > p:first-child video {
    display: block;
    width: min(100%, 720px) !important;
    height: auto !important;
    aspect-ratio: 16 / 9;
    object-fit: contain !important;
    margin-inline: auto;
    background: #000;
  }
}

body.single .entry-content > p:first-child video {
  max-height: none !important;
}

/*
 * The fixed CTA is generated by functions.php only when a FANZA link exists.
 * Desktop visitors use the in-content CTA; mobile visitors keep a clear path
 * to the official product page while scrolling.
 */
body.single .fanza-fixed-btn {
  position: fixed;
  right: 12px;
  bottom: calc(64px + env(safe-area-inset-bottom));
  left: 12px;
  z-index: 9998;
  display: block;
  padding: 13px 18px;
  border: 2px solid rgba(255, 255, 255, 0.9);
  border-radius: 9999px;
  background: linear-gradient(135deg, #06c755, #00a846);
  color: #fff !important;
  font-size: 16px;
  font-weight: 800;
  line-height: 1.4;
  text-align: center;
  text-decoration: none !important;
  box-shadow: 0 6px 22px rgba(6, 199, 85, 0.45);
}

@media screen and (min-width: 769px) {
  body.single .fanza-fixed-btn {
    display: none !important;
  }
}

/* ===== [tag_list_fullthumb] responsive related-post cards ===== */

/*
 * Some source thumbnails are only 300x300. The previous single-column layout
 * stretched them beyond 1,100px on desktop. Keep the existing mobile layout,
 * but render cards near their native resolution on wider screens.
 */
@media screen and (min-width: 1025px) {
  body.single .entry-content .tag-list-fullthumb-wrapper {
    display: flex;
    flex-flow: row wrap;
    justify-content: center;
    gap: 18px;
  }

  body.single .entry-content .tag-fullthumb-item {
    flex: 0 1 calc((100% - 54px) / 4);
    width: auto;
    max-width: 300px;
    min-width: 0;
  }
}

@media screen and (min-width: 769px) and (max-width: 1024px) {
  body.single .entry-content .tag-list-fullthumb-wrapper {
    display: flex;
    flex-flow: row wrap;
    justify-content: center;
    gap: 18px;
  }

  body.single .entry-content .tag-fullthumb-item {
    flex: 0 1 calc((100% - 36px) / 3);
    width: auto;
    max-width: 300px;
    min-width: 0;
  }
}

@media screen and (min-width: 769px) {
  body.single .entry-content .thumb-wrapper {
    aspect-ratio: 1 / 1;
  }

  body.single .entry-content .thumb-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }

  body.single .entry-content .thumb-title {
    padding: 12px 14px;
    font-size: 14px;
  }
}
