/*
Theme Name: Plase Storefront
Theme URI: https://plase.net
Description: A custom child theme for Storefront
Author: Plase
Author URI: https://plase.net
Template: storefront
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: plasestorefront
*/

/* Add your custom styles below this line */

/* ============================================
   HERO CTA BUTTON
   ============================================ */
.sph-hero .button,
.sph-hero a.button {
    background-color: #e74c3c;
    color: #fff;
    border: none;
    padding: 12px 30px;
    font-size: 1.1em;
    font-weight: 600;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: background-color 0.3s ease;
}

.sph-hero .button:hover,
.sph-hero a.button:hover {
    background-color: #c0392b;
    color: #fff;
}

/* ============================================
   HOMEPAGE SECTIONS
   ============================================ */
.storefront-product-section {
    padding: 40px 0;
}

.storefront-product-section .section-title {
    font-size: 1.6em;
    margin-bottom: 20px;
}

/* ============================================
   LEGACY SHORTCODES
   ============================================ */

/* Box shortcode — info/note/tick types */
.plasenet-box {
    padding: 1em 1.2em;
    margin: 1em 0;
    border-left: 4px solid #2ea2cc;
    background: #f0f8ff;
    border-radius: 2px;
}
.plasenet-box--rounded {
    border-radius: 6px;
}
.plasenet-box--info {
    border-left-color: #2ea2cc;
    background: #f0f8ff;
}
.plasenet-box--note {
    border-left-color: #ffba00;
    background: #fff8e5;
}
.plasenet-box--tick {
    border-left-color: #7ad03a;
    background: #f0fff0;
}
.plasenet-box p:last-child {
    margin-bottom: 0;
}

/* Button shortcode — reuses Storefront .button */
.plasenet-btn {
    display: inline-block;
    margin: 0.5em 0;
}
.plasenet-btn--orange {
    background-color: #e67e22 !important;
    border-color: #e67e22 !important;
    color: #fff !important;
}
.plasenet-btn--orange:hover {
    background-color: #d35400 !important;
    border-color: #d35400 !important;
}

/* Toggle shortcode — HTML5 details/summary */
.plasenet-toggle {
    border: 1px solid #e2e2e2;
    border-radius: 4px;
    margin: 0.8em 0;
}
.plasenet-toggle summary {
    padding: 0.8em 1em;
    background: #f8f8f8;
    cursor: pointer;
    font-weight: 600;
    list-style: none;
}
.plasenet-toggle summary::-webkit-details-marker {
    display: none;
}
.plasenet-toggle summary::before {
    content: "\25B6";
    display: inline-block;
    margin-right: 0.5em;
    font-size: 0.7em;
    transition: transform 0.2s;
}
.plasenet-toggle[open] summary::before {
    transform: rotate(90deg);
}
.plasenet-toggle-content {
    padding: 1em;
    border-top: 1px solid #e2e2e2;
}

/* Tabs shortcode — details-based accordion */
.plasenet-tabs {
    margin: 1em 0;
}
.plasenet-tab {
    border: 1px solid #e2e2e2;
    margin-bottom: -1px;
}
.plasenet-tab:first-child {
    border-radius: 4px 4px 0 0;
}
.plasenet-tab:last-child {
    border-radius: 0 0 4px 4px;
}
.plasenet-tab summary {
    padding: 0.7em 1em;
    background: #f8f8f8;
    cursor: pointer;
    font-weight: 600;
    list-style: none;
}
.plasenet-tab summary::-webkit-details-marker {
    display: none;
}
.plasenet-tab summary::before {
    content: "\25B6";
    display: inline-block;
    margin-right: 0.5em;
    font-size: 0.7em;
    transition: transform 0.2s;
}
.plasenet-tab[open] summary::before {
    transform: rotate(90deg);
}
.plasenet-tab[open] summary {
    border-bottom: 1px solid #e2e2e2;
}
.plasenet-tab-content {
    padding: 1em;
}

/* Horizontal rule */
.plasenet-hr {
    border: none;
    border-top: 1px solid #e2e2e2;
    margin: 1.5em 0;
}

/* Highlight */
.plasenet-highlight {
    background: #fff3cd;
    padding: 0.1em 0.4em;
    border-radius: 2px;
}

/* Checklist — tick style */
.plasenet-checklist ul,
.plasenet-checklist {
    list-style: none;
    padding-left: 0;
}
.plasenet-checklist li {
    padding-left: 1.6em;
    position: relative;
    margin-bottom: 0.4em;
}
.plasenet-checklist li::before {
    content: "\2713";
    position: absolute;
    left: 0;
    color: #7ad03a;
    font-weight: bold;
}

/* Two-column layout */
.plasenet-col--half {
    display: inline-block;
    width: 48%;
    vertical-align: top;
    margin-bottom: 1em;
}
.plasenet-col--half:nth-child(odd) {
    margin-right: 3%;
}

@media screen and (max-width: 768px) {
    .plasenet-col--half {
        display: block;
        width: 100%;
        margin-right: 0;
    }
}

/* ============================================
   STOREFRONT FOOTER — DARK THEME
   ============================================ */
.site-footer {
    background: #2c2d33;
    color: #d5d9db;
}

.footer-widgets {
    background: #2c2d33;
    border-top: none;
}

.site-footer .footer-widgets,
.site-footer .footer-widgets .widget {
    color: #d5d9db !important;
}

.site-footer .footer-widgets .widget h1,
.site-footer .footer-widgets .widget h2,
.site-footer .footer-widgets .widget h3,
.site-footer .footer-widgets .widget h4,
.site-footer .footer-widgets .widget .widget-title {
    color: #fff !important;
}

.site-footer .footer-widgets a,
.site-footer .footer-widgets .widget a {
    color: #fff !important;
    font-weight: 600;
}

.site-footer .footer-widgets a:hover,
.site-footer .footer-widgets .widget a:hover {
    color: #e74c3c !important;
}

.site-footer .footer-widgets .widget p,
.site-footer .footer-widgets .widget li,
.site-footer .footer-widgets .widget span {
    color: #d5d9db !important;
}

.site-footer .footer-widgets .widget .star-rating span::before {
    color: #f39c12 !important;
}

.site-footer .footer-widgets .widget .amount,
.site-footer .footer-widgets .widget del,
.site-footer .footer-widgets .widget ins {
    color: #d5d9db !important;
}

.site-footer .footer-widgets .widget strong {
    color: #fff !important;
}

/* Storefront footer credit bar */
.site-info {
    background: #23242a;
    color: #d5d9db;
    font-size: 0.85em;
    padding: 15px 0;
}

.site-info .site-info-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.site-info .site-info-text {
    flex: 1;
    min-width: 300px;
    line-height: 1.6;
}

.site-info .site-info-badges {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.site-info .site-info-badges img {
    height: 30px;
    width: auto;
    max-width: 150px;
}

/* Limit Netopia script badge size */
.site-info .site-info-badges iframe,
.site-info .site-info-badges > a[href*="netopia"],
.site-info .site-info-badges > div {
    max-height: 50px;
    overflow: hidden;
}

.site-info,
.site-info .site-info-text,
.site-info .site-info-inner {
    color: #d5d9db !important;
}

.site-info a {
    color: #fff !important;
    font-weight: 600;
}

.site-info a:hover {
    color: #e74c3c !important;
}

/* ============================================
   TRUST SIGNALS
   ============================================ */
.plasenet-trust-signals {
    background: #f8f8f8;
    padding: 25px 0;
    border-bottom: 1px solid #eee;
}

.plasenet-trust-signals .trust-grid {
    display: flex;
    justify-content: space-around;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 15px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.plasenet-trust-signals .trust-item {
    text-align: center;
    flex: 1;
    min-width: 150px;
}

.plasenet-trust-signals .trust-icon {
    display: block;
    margin: 0 auto 5px;
    color: #006599;
}

.plasenet-trust-signals .trust-item strong {
    display: block;
    color: rgb(54, 66, 69);
    font-size: 0.95em;
}

.plasenet-trust-signals .trust-item > span {
    font-size: 0.82em;
    color: #777;
}

/* ============================================
   HOMEPAGE — CATEGORY CARDS (old site style)
   ============================================ */
.storefront-product-categories ul.products li.product-category {
    position: relative;
    border-radius: 5px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.075), 0 1px 7px rgba(0,0,0,0.15);
    overflow: hidden;
    transition: opacity 0.3s ease;
    padding-bottom: 0 !important;
}

.storefront-product-categories ul.products li.product-category:hover {
    opacity: 0.9;
}

.storefront-product-categories ul.products li.product-category a {
    position: relative;
    display: block;
}

.storefront-product-categories ul.products li.product-category a img {
    display: block;
    width: 100%;
}

/* Blue category label overlay on image */
.storefront-product-categories ul.products li.product-category h2,
.storefront-product-categories ul.products li.product-category .woocommerce-loop-category__title {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: #006599;
    color: #fff !important;
    font-weight: bold;
    padding: 10px 14px;
    font-size: 1.05em;
    margin: 0 !important;
    z-index: 2;
    text-align: center;
}

/* Hide category count */
.storefront-product-categories ul.products li.product-category .count {
    display: none;
}

/* ============================================
   HOMEPAGE — PRODUCT CARDS (old site style)
   ============================================ */
.storefront-product-section ul.products li.product,
.site-main ul.products li.product {
    position: relative;
    border-radius: 5px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.075), 0 1px 7px rgba(0,0,0,0.15);
    overflow: hidden;
    background: #fff;
    padding-bottom: 1em;
}

/* Image hover zoom */
.storefront-product-section ul.products li.product a img,
.site-main ul.products li.product a img {
    transition: transform 0.3s ease;
}

.storefront-product-section ul.products li.product a:hover img,
.site-main ul.products li.product a:hover img {
    transform: scale(1.05);
}

/* Orange price badge on image */
.storefront-product-section ul.products li.product .price,
.site-main ul.products li.product .price {
    position: absolute;
    top: 10px;
    bottom: auto;
    left: 0;
    background: #f37324;
    color: #fff !important;
    padding: 4px 10px;
    border-radius: 0 5px 5px 0;
    font-weight: bold;
    font-size: 1em;
    z-index: 2;
    line-height: 1.4;
}

/* Price amounts inherit white — override Storefront Customizer orange */
.storefront-product-section .woocommerce ul.products li.product .price,
.site-main .woocommerce ul.products li.product .price,
.storefront-product-section ul.products li.product .price *,
.site-main ul.products li.product .price * {
    color: #fff !important;
}

/* Position price relative to image link */
.storefront-product-section ul.products li.product > a:first-child,
.site-main ul.products li.product > a:first-child {
    position: relative;
    display: block;
    overflow: hidden;
}

/* Sale badge — "Reduceri!" with pop */
.storefront-product-section ul.products li.product .onsale,
.site-main ul.products li.product .onsale {
    background: #e26213 !important;
    color: #fff !important;
    border: none !important;
    border-radius: 4px;
    font-size: 0.85em;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 5px 12px;
    box-shadow: 0 2px 6px rgba(226, 98, 19, 0.4);
    animation: badge-pulse 2s ease-in-out infinite;
}

@keyframes badge-pulse {
    0%, 100% { box-shadow: 0 2px 6px rgba(226, 98, 19, 0.4); }
    50% { box-shadow: 0 2px 12px rgba(226, 98, 19, 0.7); }
}

/* ============================================
   HIDE — BRANDS SECTION (not needed on homepage)
   ============================================ */
.storefront-woocommerce-brands {
    display: none !important;
}

/* ============================================
   HOMEPAGE — SECTION TITLES & SPACING
   ============================================ */
.storefront-product-section {
    padding: 25px 0;
}

.storefront-product-section .section-title {
    color: rgb(77, 94, 97);
    font-size: 1.4em;
    font-weight: bold;
    margin-bottom: 15px;
}

/* ============================================
   RESPONSIVE — MOBILE (max 768px)
   ============================================ */
@media screen and (max-width: 768px) {
    /* Hero section */
    .sph-hero .sph-inner {
        padding: 40px 20px;
    }

    .sph-hero h1 {
        font-size: 1.6em;
    }

    .sph-hero .sph-hero-content p {
        font-size: 0.95em;
    }

    /* Homepage sections */
    .storefront-product-section .section-title {
        font-size: 1.3em;
    }

    /* General spacing */
    .site-main {
        padding: 0 15px;
    }

    /* Trust signals: 2 per row */
    .plasenet-trust-signals .trust-item {
        min-width: 45%;
        flex: 0 0 45%;
    }

    /* Categories: 2 columns on mobile */
    .storefront-product-categories ul.products {
        display: grid !important;
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }

    .storefront-product-categories ul.products::before,
    .storefront-product-categories ul.products::after {
        display: none !important;
        content: none !important;
    }

    .storefront-product-categories ul.products li.product-category {
        width: 100% !important;
        margin: 0 !important;
        float: none !important;
    }

    /* Products: 2 columns on mobile */
    .storefront-product-section ul.products {
        display: grid !important;
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }

    .storefront-product-section ul.products::before,
    .storefront-product-section ul.products::after {
        display: none !important;
        content: none !important;
    }

    .storefront-product-section ul.products li.product {
        width: 100% !important;
        margin: 0 !important;
        float: none !important;
    }

    /* Footer credit bar: stack on mobile */
    .site-info .site-info-inner {
        flex-direction: column;
        text-align: center;
    }

    .site-info .site-info-text {
        min-width: auto;
    }

    .site-info .site-info-badges {
        justify-content: center;
    }

    .footer-widgets .block-group {
        grid-template-columns: 1fr;
    }
}

@media screen and (max-width: 480px) {
    /* Trust signals: 1 per row on small screens */
    .plasenet-trust-signals .trust-item {
        min-width: 100%;
        flex: 0 0 100%;
    }
}