/* =========================
   Gym Pit Foam Calculator Styles
   Modern, brand-matching UI
   ========================= */
:root{
    --efoam-orange:#FF7A17;
    --efoam-orange-dark:#E66A07;
    --efoam-yellow:#FFC800;
    --ink:#000000;
    --muted:#000000;
    --line:rgba(0,0,0,.10);
    --card:#ffffff;
    --soft:#fff7e9;
    --soft2:#fff2d6;
    --shadow:0 10px 30px rgba(0,0,0,.12);
    --shadow2:0 3px 12px rgba(0,0,0,.10);
    --radius:16px;
    --radius-sm:12px;
}

.gpf-wrap{
    max-width:1180px;
    margin:0 auto;
    padding:0 12px 22px;
}

.gpf-hero{
    background: linear-gradient(135deg, var(--soft) 0%, #ffffff 55%, #ffffff 100%);
    border:1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow2);
    padding:6px 16px;
    margin:0 0 4px;
    position:relative;
    overflow:hidden;
}
.gpf-hero:before{
    content:"";
    position:absolute;
    right:-120px; top:-120px;
    width:260px; height:260px;
    background: radial-gradient(circle at 30% 30%, rgba(255,122,23,.28), rgba(255,200,0,.15) 45%, rgba(255,200,0,0) 70%);
    transform: rotate(18deg);
    pointer-events:none;
}
.gpf-hero h1{
    margin:0 0 1px;
    font-size:22px;
    font-family: RobotoSlabBold, Geneva, sans-serif;
    font-weight:300;
    color:var(--ink);
    text-align:center;
}
.gpf-hero p{
    margin:0;
    color:#000;
    text-align:center;
    font-size:14px;
    line-height:1.45;
    font-family: Roboto, Tahoma, Geneva, sans-serif;
}

.gpf-layout{
    display:flex;
    gap:18px;
    align-items:flex-start;
    margin-top:0;
}
.gpf-left{
    width:360px;
    flex:0 0 360px;
}
.gpf-right{
    flex:1 1 auto;
    min-width:0;
    overflow:hidden;
}

/* Card */
.gpf-card{
    background: var(--card);
    border:1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow:hidden;
}

.gpf-cardhead{
    padding:10px 14px 8px;
    background: linear-gradient(135deg, rgba(255,122,23,.12), rgba(255,200,0,.14));
    border-bottom:1px solid rgba(0,0,0,.08);
}
.gpf-cardhead .gpf-title{
    margin:0;
    font-size:18px;
    font-family: RobotoSlabBold, Geneva, sans-serif;
    font-weight:300;
    color:var(--ink);
    letter-spacing:1px;
    display:flex;
    align-items:center;
    justify-content:center;
    gap:10px;
    flex-wrap:wrap;
}
.gpf-cardbody{
    padding:14px;
}

.gpf-tip{
    background: linear-gradient(180deg, #ffffff 0%, var(--soft2) 100%);
    border:1px solid rgba(255,122,23,.25);
    border-left:6px solid var(--efoam-orange);
    border-radius: var(--radius-sm);
    padding:10px 10px;
    margin:0 0 12px;
    font-size:12px;
    line-height:1.45;
    color:#000;
}
.gpf-tip b{color:var(--efoam-orange);}

/* Inputs */
.gpf-form .gpf-row{margin-bottom:10px;}
.gpf-form label{
    display:block;
    font-weight:700;
    margin-bottom:6px;
    font-size:14px;
    color:#000;
    font-family: Arial, sans-serif;
}
.gpf-control{
    width:100%;
    padding:11px 12px;
    border:1px solid rgba(0,0,0,.18);
    border-radius: 12px;
    font-size:14px;
    box-sizing:border-box;
    outline:none;
    background:#fff;
    transition: box-shadow .15s ease, border-color .15s ease, transform .05s ease;
    font-family: Arial, sans-serif;
}
.gpf-control:focus{
    border-color: rgba(255,122,23,.55);
    box-shadow: 0 0 0 4px rgba(255,122,23,.18);
}
.gpf-control::placeholder{color:#a0a7ae;}

select.gpf-control{
    appearance:none;
    background-image:
        linear-gradient(45deg, transparent 50%, #6d7680 50%),
        linear-gradient(135deg, #6d7680 50%, transparent 50%),
        linear-gradient(to right, transparent, transparent);
    background-position:
        calc(100% - 18px) calc(1.1em),
        calc(100% - 13px) calc(1.1em),
        calc(100% - 2.2em) 0.3em;
    background-size:
        5px 5px,
        5px 5px,
        1px 1.8em;
    background-repeat:no-repeat;
}

/* Primary button */
.gpf-btn{
    width:100%;
    border:0;
    border-radius: 14px;
    padding:12px 14px;
    font-size:15px;
    font-weight:800;
    cursor:pointer;
    color:#fff;
    background: linear-gradient(180deg, var(--efoam-orange) 0%, var(--efoam-orange-dark) 100%);
    box-shadow: 0 8px 18px rgba(255,122,23,.25);
    transition: transform .08s ease, filter .15s ease, box-shadow .15s ease;
    font-family: RobotoSlabBold, Geneva, sans-serif;
    position:relative;
    overflow:hidden;
}
.gpf-btn::before,
.gpf-btn::after{
    display:none !important;
    content:none !important;
}
.gpf-btn:hover{filter:brightness(1.02);}
.gpf-btn:active{transform: translateY(1px); box-shadow: 0 6px 14px rgba(255,122,23,.22);}

/* Results */
.gpf-results{
    margin-top:12px;
    border-radius: var(--radius);
    border:1px solid rgba(255,122,23,.30);
    background: linear-gradient(180deg, #ffffff 0%, var(--soft) 100%);
    padding:12px 12px;
    display:none;
}
.gpf-results .gpf-rtitle{
    margin:0 0 10px;
    font-size:13px;
    color:#000;
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:10px;
    font-family: Roboto, Tahoma, Geneva, sans-serif;
}
.gpf-kv{
    display:flex;
    justify-content:space-between;
    gap:10px;
    padding:6px 0;
    border-bottom:1px dashed rgba(0,0,0,.12);
    font-size:13px;
    color:#000;
}
.gpf-kv:last-child{border-bottom:none;}
.gpf-kv b{color:var(--efoam-orange);}

/* Cart box */
.gpf-cart{
    margin-top:12px;
    border-radius: var(--radius);
    border:1px solid rgba(0,0,0,.10);
    background: #fff;
    padding:12px;
}

/* Promo message */
.gpf-promo{
    margin-top:14px;
    padding:12px 14px;
    background: linear-gradient(135deg, #fff7e9 0%, #fffbf0 100%);
    border:2px solid var(--efoam-orange);
    border-radius: var(--radius-sm);
    font-size:13px;
    line-height:1.6;
    color:#000;
    text-align:center;
}
.gpf-promo strong{
    color:var(--efoam-orange);
}
.gpf-promo small{
    display:block;
    margin-top:6px;
    font-size:11px;
    color:#000;
    font-style:italic;
}
.gpf-cartgrid{
    display:flex;
    gap:10px;
    align-items:flex-end;
    margin-bottom:10px;
}
.gpf-cartgrid .gpf-row{margin:0; flex:1;}
.gpf-cartgrid .gpf-row.small{flex:0 0 120px;}

.gpf-qty{
    text-align:center;
    font-weight:800;
    background: #f4f6f8;
}

/* Add to cart button: ALWAYS visible, even disabled */
.gpf-cartbtn{
    width:100%;
    border-radius: 14px;
    padding:12px 14px;
    font-size:15px;
    font-weight:900;
    font-family: RobotoSlabBold, Geneva, sans-serif;
    border:1px solid rgba(0,0,0,.10);
    cursor:pointer;
    transition: transform .08s ease, filter .15s ease, background .15s ease, color .15s ease, box-shadow .15s ease;
}
.gpf-cartbtn[disabled]{
    background: #eef2f6 !important;
    color: #7a8794 !important;
    cursor:not-allowed !important;
    box-shadow:none !important;
    opacity:1 !important;
}
.gpf-cartbtn:not([disabled]){
    background: linear-gradient(180deg, var(--efoam-orange) 0%, var(--efoam-orange-dark) 100%);
    color:#fff;
    border:0;
    box-shadow: 0 10px 20px rgba(255,122,23,.22);
}
.gpf-cartbtn:not([disabled]):hover{filter:brightness(1.02);}
.gpf-cartbtn:not([disabled]):active{transform: translateY(1px); box-shadow: 0 7px 16px rgba(255,122,23,.20);}

.gpf-cartmsg{
    margin-top:10px;
    font-size:13px;
    text-align:center;
    color:#000;
}

.gpf-help{
    margin-top:12px;
    padding-top:10px;
    font-size:13px;
    text-align:center;
    color:#000;
    font-family: Roboto, Tahoma, Geneva, sans-serif;
}
.gpf-help a{color:#000; text-decoration:underline;}

/* Lightbox */
.gpf-lightbox{
    display:none;
    position:fixed;
    top:0; left:0; right:0; bottom:0;
    background:rgba(0,0,0,0.88);
    z-index:99999;
    align-items:center;
    justify-content:center;
    padding:16px;
    box-sizing:border-box;
}
.gpf-lightbox.active{
    display:flex;
}
.gpf-lightbox-inner{
    position:relative;
    width:100%;
    max-width:95vw;
    max-height:90vh;
    text-align:center;
    box-sizing:border-box;
}
.gpf-lightbox-inner img{
    width:100%;
    max-width:100%;
    max-height:75vh;
    height:auto;
    border-radius:10px;
    display:block;
    margin:0 auto;
    box-shadow:0 8px 40px rgba(0,0,0,0.6);
    object-fit:contain;
}
.gpf-lightbox-label{
    display:block;
    color:#fff;
    font-family: RobotoSlabBold, Geneva, sans-serif;
    font-size:15px;
    margin-top:10px;
    text-align:center;
}
.gpf-lightbox-close{
    position:absolute;
    top:-14px;
    right:-14px;
    width:32px;
    height:32px;
    background:var(--efoam-orange);
    color:#fff;
    border-radius:50%;
    font-size:20px;
    line-height:32px;
    text-align:center;
    cursor:pointer;
    font-weight:700;
}
.gpf-imgrid-item{cursor:pointer;}

/* Image grid */
.gpf-imgrid{
    display:grid;
    grid-template-columns: 1fr 1fr;
    gap:6px;
    margin-bottom:10px;
    width:100%;
    box-sizing:border-box;
}
.gpf-imgrid-item{
    position:relative;
    border-radius:8px;
    overflow:hidden;
    line-height:0;
    min-width:0;
}
.gpf-imgrid-item img{
    width:100%;
    height:130px;
    object-fit:cover;
    display:block;
    border-radius:8px;
    transition: transform 0.3s ease;
}
.gpf-imgrid-item:hover img{
    transform: scale(1.03);
}
.gpf-imgrid-label{
    position:absolute;
    bottom:0;
    left:0;
    right:0;
    background:rgba(0,0,0,0.55);
    color:#fff !important;
    font-size:10px;
    font-weight:700;
    text-align:center;
    padding:4px 5px;
    font-family: Roboto, Tahoma, Geneva, sans-serif;
    line-height:1.3;
}

/* Full width content below two columns */
.gpf-fullwidth{
    margin-top:18px;
    font-family: Roboto, Tahoma, Geneva, sans-serif;
    font-size:14px;
    color:#000;
}
.gpf-fullwidth h2{margin:0 0 8px; color:#000; font-family:RobotoSlabBold,Geneva,sans-serif; font-weight:300; font-size:18px; letter-spacing:1px;}
.gpf-fullwidth h2:not(:first-child){margin-top:18px;}
.gpf-fullwidth p{color:#000; line-height:1.55; margin:0 0 10px; font-size:14px;}
.gpf-fullwidth a{color:#000; text-decoration:underline;}
.gpf-fullwidth strong{font-family:Verdana; font-size:16px; font-weight:700;}

/* Right content */
.gpf-content{
    background:#fff;
    border:1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow2);
    padding:0 18px 18px;
    margin-top:0;
    font-family: Roboto, Tahoma, Geneva, sans-serif;
    font-size:14px;
}
.gpf-content h2{margin:0 0 8px; color:#000; font-family:RobotoSlabBold,Geneva,sans-serif; font-weight:300; font-size:18px; letter-spacing:1px;}
.gpf-content h2:not(:first-child){margin-top:18px;}
.gpf-content h3{margin:14px 0 8px; color:#000; font-family:RobotoSlabBold,Geneva,sans-serif; font-weight:300; font-size:18px;}
.gpf-content p, .gpf-content li{color:#000; line-height:1.55; font-size:14px;}
.gpf-content ul{margin:8px 0 0 18px;}

/* Mobile */
@media screen and (max-width:900px){
    .gpf-layout{display:block;}
    .gpf-left{width:auto; flex:none; margin-bottom:14px;}
    .gpf-imgrid-item img{height:100px;}
}
@media screen and (max-width:420px){
    .gpf-cartgrid{flex-direction:column; align-items:stretch;}
    .gpf-cartgrid .gpf-row.small{flex:none;}
}

/* ===== Flatten panels to match rest of site ===== */
.gpf-hero,
.gpf-card,
.gpf-content,
.gpf-results,
.gpf-cart{
    background: transparent !important;
    box-shadow: none !important;
    border: 0 !important;
    border-radius: 0 !important;
}
.gpf-hero:before{ display:none !important; }
.gpf-cardhead{
    background: none !important;
    border-bottom: 0 !important;
    padding: 0 0 8px 0 !important;
}

/* === FIX: make Foam Calculator header text black === */
.gpf-cardhead h2,
.gpf-cardhead p{
    color:#000 !important;
}

/* === FIX: make calculator results text black === */
.gpf-results,
.gpf-results *,
.gpf-kv b{
    color:#000 !important;
}
