/*
    Theme Name: SWELL Child
    Theme URI: https://swell-theme.com/
    Description: SWELLの子テーマ
    Version: 1.0.0
    Template: swell
    Author: Your Name
    Author URI: https://example.com/
    Text Domain: swell-child
    License: GNU General Public License
    License URI: http://www.gnu.org/licenses/gpl.html
*/

/* ここにカスタムCSSを追加 */

/* ===================================================
 * WooCommerce Custom Styles for SWELL
 * =================================================== */

/* 1. Header logo size limit override (WooCommerce CSS interference fix) */
.woocommerce .c-headLogo__img, 
.woocommerce-page .c-headLogo__img {
    height: 100% !important;
}

/* Hide sidebar on all WooCommerce pages */
.woocommerce #sidebar,
.woocommerce-page #sidebar {
    display: none !important;
}

/* Fix missing Gutenberg Block CSS for columns on WooCommerce pages */
.woocommerce-page .wp-block-columns {
    display: flex;
}
@media (max-width: 599px) {
    .woocommerce-page .wp-block-columns:not(.is-not-stacked-on-mobile) {
        flex-wrap: wrap;
    }
    .woocommerce-page .wp-block-columns:not(.is-not-stacked-on-mobile) > .wp-block-column {
        flex-basis: 100% !important;
    }
}

/* 2. Product image and summary ratio (3:7) */

@media screen and (min-width: 768px) {
    .woocommerce #content div.product div.images, 
    .woocommerce div.product div.images, 
    .woocommerce-page #content div.product div.images, 
    .woocommerce-page div.product div.images {
        width: 32% !important;
        float: left !important;
    }

    .woocommerce #content div.product div.summary, 
    .woocommerce div.product div.summary, 
    .woocommerce-page #content div.product div.summary, 
    .woocommerce-page div.product div.summary {
        width: 65% !important;
        float: right !important;
    }
}

/* 3. Fix floating related products and collapse */
.woocommerce div.product::after {
    content: "";
    display: table;
    clear: both;
}
.woocommerce div.product .related.products,
.woocommerce div.product .upsells.products,
.woocommerce div.product .woocommerce-tabs {
    clear: both;
    padding-top: 40px;
}


/* Fix product title size */
.woocommerce div.product .product_title {
    font-size: 1.8rem;
    margin-bottom: 20px;
    clear: none;
}

/* 4. Product Image Alignment (Left) */
.woocommerce div.product div.images,
.woocommerce-product-gallery {
    text-align: left;
    margin-left: 0 !important;
}
.woocommerce div.product div.images img {
    margin-left: 0 !important;
    display: inline-block;
}


/* 5. Custom Price Display */
.woocommerce div.product p.price, 
.woocommerce div.product span.price {
    font-size: 1.5em;
    color: #333;
    font-weight: bold;
}
.price-tax-inc {
    font-size: 0.6em;
    color: #666;
    margin-left: 8px;
    font-weight: normal;
}

/* 6. WooCommerce Primary Button Color Override */
.woocommerce #respond input#submit.alt, 
.woocommerce a.button.alt, 
.woocommerce button.button.alt, 
.woocommerce input.button.alt,
.woocommerce #respond input#submit, 
.woocommerce a.button, 
.woocommerce button.button, 
.woocommerce input.button {
    background-color: #003388 !important;
    color: #ffffff !important;
    border-radius: 4px;
}
.woocommerce #respond input#submit.alt:hover, 
.woocommerce a.button.alt:hover, 
.woocommerce button.button.alt:hover, 
.woocommerce input.button.alt:hover,
.woocommerce #respond input#submit:hover, 
.woocommerce a.button:hover, 
.woocommerce button.button:hover, 
.woocommerce input.button:hover {
    background-color: #002266 !important;
    color: #ffffff !important;
}

/* ===================================================
 * Custom Modal Popup (fv-modal) Styles
 * =================================================== */
/* Desktop Modal Styles */
.modal-overlay {
    display: none;
    position: fixed;
    z-index: 2147483647 !important;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    opacity: 0;
    transition: opacity 0.3s ease;
}
.modal-overlay.is-active {
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 1;
}
.modal-content {
    background-color: #fff;
    padding: 30px;
    border-radius: 8px;
    max-width: 1000px; /* Limit maximum width on large PC monitors to avoid being too giant */
    width: 95%;
    position: relative;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    max-height: 90vh;
    overflow-y: auto;
}
.modal-close {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 28px;
    color: #666;
    cursor: pointer;
    line-height: 1;
}
.modal-close:hover {
    color: #000;
}
.modal-body {
    margin-top: 10px;
    text-align: center;
}
.modal-body img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
}
.plandetail {
    display: block;
    font-size: 16px;
    text-align: center;
    width: 320px;
    padding: 16px 20px;
    border: 2px solid #013796;
    text-decoration: none;
    color: #013796;
    font-weight: bold;
    border-radius: 4px;
    background-color: #fff; /* White background to cover the image's bottom area */
    margin: -135px auto 20px; /* Pull it up to overlap the pop-up image nicely */
    position: relative;
    z-index: 10;
    box-shadow: 0 4px 10px rgba(0,0,0,0.08);
}
.plandetail:hover {
    background-color: #013796;
    color: #fff;
    transition: 0.3s;
}

/* Mobile Modal Styles */
.modal-overlay-sp {
    display: none;
    position: fixed;
    z-index: 2147483647 !important;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    opacity: 0;
    transition: opacity 0.3s ease;
}
.modal-overlay-sp.is-active {
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 1;
}
.modal-content-sp {
    background-color: #fff;
    padding: 40px 15px 25px;
    border-radius: 8px;
    width: 95%;
    position: relative;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    max-height: 90vh;
    overflow-y: auto;
}
.modal-close-sp {
    position: absolute;
    top: 5px;
    right: 15px;
    font-size: 32px;
    color: #666;
    cursor: pointer;
    line-height: 1;
    z-index: 10;
}
.modal-sp-img {
    width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
}
.plandetail-sp {
    display: block;
    font-size: 14px;
    text-align: center;
    width: 90%;
    max-width: 320px;
    padding: 12px 15px;
    border: 2px solid #013796;
    text-decoration: none;
    color: #013796;
    font-weight: bold;
    border-radius: 4px;
    background-color: #fff; /* White background to cover the image's bottom area */
    margin: -50px auto 10px; /* Pull it up to overlap on mobile pop-up image */
    position: relative;
    z-index: 10;
    box-shadow: 0 4px 10px rgba(0,0,0,0.08);
}
.plandetail-sp:hover {
    background-color: #013796;
    color: #fff;
    transition: 0.3s;
}