/* PetChef Etetési Kalkulátor – Frontend CSS */
@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@400;600;700;800&display=swap');

:root {
    --pc-bg: #f5f6fa;
    --pc-card-bg: #ffffff;
    --pc-border: #e8eaef;
    --pc-text: #5b5d72;
    --pc-text-muted: #6b7280;
    --pc-radius: 14px;
    --pc-shadow: 0 2px 12px rgba(0,0,0,0.07);
    --pc-shadow-hover: 0 8px 28px rgba(224,32,32,0.15);
    --pc-primary: #e02020; /* Dinamikusan frissítve JS-ből */
    --pc-font: 'Nunito', 'geologica-medium', Helvetica, sans-serif !important;
    --pc-transition: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --purple: #6265ae;
    --purple-light: #f3f3f9;
    --pink: #f48caa;
}

/* Reset minden elemre a kalkulátoron belül */
.petchef-calculator-wrap,
.petchef-calculator-wrap *,
.petchef-calculator-wrap *:before,
.petchef-calculator-wrap *:after {
    box-sizing: border-box !important;
}

/* Wrapper */
.petchef-calculator-wrap {
    font-family: var(--pc-font);
    margin: 0 auto;
    color: var(--pc-text);
    background: #ffffff;
    border-radius: 20px;
    padding: 28px;
    width: 100%;
    max-width: 100%;
    box-shadow:0 .1rem .4rem 0 rgba(54,50,48,.2);
}

/* Header */
.petchef-header {
    align-items: center;
    gap: 14px;
    margin-bottom: 24px;
    padding-bottom: 20px;
    border-bottom: 2px solid var(--pc-border);
    display: none;
}

.petchef-header-icon {
    font-size: 2.4rem;
    line-height: 1;
    animation: pc-bounce 2s infinite;
}
@keyframes pc-bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-4px); }
}
.petchef-title {
    font-size: 4em;
    font-weight: 800;
    margin: 0 0 2px;
    color: #6265ae;
    line-height: 1.2;
}
.petchef-subtitle {
    font-size: 1.2em;
    color: #5b5d72;
    margin: 0;
    font-family: geologica-medium, Helvetica, sans-serif !important;
    display: none;
}

/* Form body */
.petchef-form-body {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

/* Steps Progress */
.petchef-steps-progress {
    margin-bottom: 30px;
}
.petchef-steps-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    font-weight: bold;
}
.petchef-current-step-label {
    font-size: 1rem;
    color: var(--pc-text);
}
.petchef-step-number {
    display: inline-block;
    margin-right: 4px;
    font-size: 110%;
    color: var(--purple);
}
.petchef-next-step-label {
    font-size: 0.9rem;
    color: var(--pc-text-muted);
}
.petchef-progress-bar {
    height: 8px;
    background: var(--pc-border);
    border-radius: 4px;
    overflow: hidden;
}
.petchef-progress-fill {
    height: 100%;
    background: var(--purple);
    transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Step Navigation */
.petchef-step-nav {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 40px;
}
.petchef-calc-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
    flex: 1;
}
@media (max-width: 600px) {
    .petchef-step-nav {
        flex-direction: column;
        gap: 10px;
    }
}
.petchef-next-btn, .petchef-prev-btn {
    padding: 14px 24px;
    border-radius: 12px;
    font-weight: 800;
    cursor: pointer;
    transition: var(--pc-transition);
    border: none;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}
.petchef-next-btn {
    background: var(--pink);
    color: #fff;
    box-shadow: 0 .1rem .4rem 0 rgba(54,50,48,.2);
}
.pc-btn-arrow, .pc-btn-arrow-prev {
    font-size: 1.2rem;
    line-height: 1;
    transition: transform 0.2s ease;
}
.petchef-next-btn:hover .pc-btn-arrow {
    transform: translateX(4px);
}
.petchef-prev-btn:hover .pc-btn-arrow-prev {
    transform: translateX(-4px);
}

.petchef-prev-btn {
    background: #fff;

    color: var(--pc-text);
    margin-bottom: 0!important;
}
.petchef-prev-btn:hover {
    background: var(--pc-bg);
}

/* Allergy Toggle */
.petchef-toggle-allergy {
    cursor: pointer;
    user-select: none;
    border: 2px solid var(--pc-border);
    padding: 20px;
    border-radius: 15px;
    margin-top: 0 !important;
}
.petchef-toggle-icon {
    font-size: 0.8rem;
    transition: var(--pc-transition);
}
.petchef-toggle-allergy.open .petchef-toggle-icon {
    transform: rotate(180deg);
}

/* Field cards 
.petchef-field-card {
    background: var(--pc-card-bg);
    border: 1.5px solid var(--pc-border);
    border-radius: var(--pc-radius);
    padding: 18px 20px;
    margin-bottom: 15px;
}
*/
/* Field cards */
.petchef-field-card {
    background: #fff;
    margin-bottom: 15px;
}

.petchef-field-card:focus-within {
    border-color: var(--purple);
}

.petchef-field-label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 1.1em;
    color: #5b5d72;
    font-family: geologica-medium, Helvetica, sans-serif !important;
    font-weight: normal!important;
    margin-bottom: 15px;
    margin-top: 20px;
}

/* Field hint text */
.petchef-field-hint {
    margin: -10px 0 25px;
    font-size: 0.8rem;
    color: #5b5d72ab;
    line-height: 1.4;
    text-align: left;
    font-family: geologica-medium, Helvetica, sans-serif !important;
    display: none;
}

/* Weight display badge */
.petchef-weight-display {
    background: var(--purple);
    color: #fff;
    padding: 3px 12px;
    border-radius: 20px;
    font-size: 0.9rem;

}

/* Slider */
.petchef-slider-wrap { padding: 4px 0; }
.petchef-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 6px;
    border-radius: 6px;
    background: linear-gradient(to right, var(--purple) 0%, var(--purple) var(--slider-pct, 11.25%), #dde0e8 var(--slider-pct, 11.25%), #dde0e8 100%);
    outline: none;
    cursor: pointer;
    transition: background var(--pc-transition);
}
.petchef-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--purple);
    border: 3px solid #fff;
    cursor: pointer;
}
.petchef-slider::-webkit-slider-thumb:hover {
    transform: scale(1.15);
}
.petchef-slider::-moz-range-thumb {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--purple);
    border: 3px solid #fff;
    cursor: pointer;
}
.petchef-slider-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    color: var(--pc-text-muted);
    margin-top: 6px;
}

/* Select */
.petchef-select {
    width: 100%;
    padding: 10px 14px;
    border: 1.5px solid var(--pc-border);
    border-radius: 10px;
    font-family: geologica-medium, Helvetica, sans-serif !important;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--pc-text);
    background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%236b7280' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat right 14px center;
    -webkit-appearance: none;
    appearance: none;
    cursor: pointer;
    outline: none;
    transition: border-color var(--pc-transition);
    height: 50px;
}
.petchef-select:focus {
    border-color: var(--purple);
}

.petchef-calculator-wrap button {
    margin-right: 0!important;
}

/* Option button groups */
.petchef-btn-group {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}
.petchef-opt-btn {
    padding: 11px 8px;
    border: 1.5px solid var(--pc-border);
    border-radius: 10px;
    background: #fff;
    font-family: geologica-medium, Helvetica, sans-serif !important;
    font-size: 0.88rem;
    font-weight: 700;
    color: #5b5d72;
    cursor: pointer;
    transition: all var(--pc-transition);
    text-align: center;
    line-height: 1.3;
}
.petchef-opt-btn:hover {
    border-color: var(--purple);
    color: var(--purple);
    background-color: #6264ae2b;
}
.petchef-opt-btn.active {
    border-color: var(--purple);
    background: rgba(106, 32, 224, 0.06);
    color: var(--purple);
}

span#petchef-result-grams, span#petchef-result-kcal {
    text-align: left;
    font-family: nunito;
}

.petchef-result-value small {
    margin-top: 20px;
}

/* Calculate button */

@media screen and (max-width: 600px) {
  .petchef-calc-btn {
        width: 100%!important;
    }
}

.petchef-calc-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 10px;
    background: #f48caa;
    color: #fff;
    border: none;
    border-radius: 12px;
    font-family: geologica-medium, Helvetica, sans-serif !important;
    font-size: 1.05rem;
    font-weight: 800;
    letter-spacing: 0.02em;
    cursor: pointer;
    margin: 0 auto;
}
.petchef-calc-btn:hover {
    background: #f8a4bc;
    transform: translateY(-1px);
}
.petchef-calc-btn:active {
    transform: translateY(0);
}
.petchef-calc-btn.loading {
    opacity: 0.75;
    cursor: not-allowed;
    pointer-events: none;
}
.petchef-btn-icon { font-size: 1.2rem; }

/* Results section */
.petchef-results {
    animation: pc-fade-in 0.4s ease;
}

/* Lightbox specific */
.petchef-lightbox-op .petchef-results {
    margin-top: 0;
}
@keyframes pc-fade-in {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0); }
}
.petchef-results-title {
    font-size: 2em;
    font-weight: 800;
    padding-bottom: 30px;
    color: #6265ae;
    text-align: center;
}
.petchef-result-cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 24px;
}
@media (max-width: 480px) {
    .petchef-result-cards { grid-template-columns: 1fr; }
}
.petchef-result-card {
    display: flex;
    align-items: center;
    gap: 14px;
    background: var(--pc-card-bg);
    border: 1.5px solid var(--pc-border);
    border-radius: var(--pc-radius);
    padding: 32px;
    box-shadow: var(--pc-shadow);
}
.petchef-result-icon {
    font-size: 1.8rem;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(224,32,32,0.08);
    border-radius: 10px;
    flex-shrink: 0;
}
.petchef-result-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    align-items: flex-start;
}
.petchef-result-label {
    font-size: 0.78rem;
    color: var(--pc-text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.petchef-result-value {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--purple);
    line-height: 1.1;
}

/* ── Products section ── */
.petchef-products-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding-top: 40px;
    padding-bottom: 16px;
    border-top: 2px solid var(--pc-border);
    margin-bottom: 4px;
}
.petchef-products-title {
    font-size: 2rem;
    font-weight: 800;
    margin: 0;
    color: #6265ae;
    text-align: center;
}
.petchef-products-count {
    background: var(--purple);
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 20px;
    letter-spacing: 0.04em;
}

/* 3-column grid — !important to override theme styles */
.petchef-products-grid {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 14px !important;
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
}
@media (max-width: 540px) {
    .petchef-products-grid {
        grid-template-columns: repeat(1, minmax(0, 1fr)) !important;
        gap: 10px !important;
    }
}
@media (max-width: 360px) {
    .petchef-products-grid {
        grid-template-columns: minmax(0, 1fr) !important;
    }
}

/* Product card */

span.petchef-price-suffix {
    color: var(--purple);
    font-family: geologica-medium, Helvetica, sans-serif !important;
    font-weight: normal !important;
    font-size: 0.8em;
}

.petchef-product-card {
    background: #ffffff !important;
    border-radius: var(--pc-radius) !important;
    border: 1px solid rgba(0,0,0,0.07) !important;
    box-shadow:
        0 1px 3px rgba(0,0,0,0.06),
        0 4px 14px rgba(0,0,0,0.05),
        0 12px 28px rgba(0,0,0,0.03) !important;
    overflow: hidden !important;
    transition: transform var(--pc-transition), box-shadow var(--pc-transition);
}
.petchef-product-card:hover {
    transform: translateY(-4px);
    box-shadow:
        0 2px 6px rgba(0,0,0,0.07),
        0 10px 28px rgba(224,32,32,0.10),
        0 20px 40px rgba(0,0,0,0.05);
}
.petchef-product-inner {
    display: flex !important;
    flex-direction: column !important;
    height: 100% !important;
}

/* Image */
.petchef-calculator-wrap .petchef-product-img-wrap {
    display: block !important;
    overflow: hidden !important;
    background: #f7f7f7 !important;
    flex-shrink: 0 !important;
    width: 100% !important;
}
.petchef-product-img-placeholder {
    aspect-ratio: 4 / 3 !important;
    background: #f3f4f6 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex-shrink: 0 !important;
}
.petchef-product-img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    display: block !important;
    transition: transform 0.4s cubic-bezier(0.25,0.46,0.45,0.94);
}
.petchef-product-card:hover .petchef-product-img { transform: scale(1.06); }

/* Body */
.petchef-product-body {
    padding: 12px 14px 14px !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 8px !important;
    flex: 1 !important;
    box-sizing: border-box !important;
    align-items: center !important;
    text-align: center !important;
}

.petchef-product-badges {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 6px !important;
    align-items: center !important;
    justify-content: center !important;
}

/* Name */
.petchef-product-name {
    font-size: 1.6rem !important;
    font-weight: 800 !important;
    margin: 0 !important;
    line-height: 1.35 !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
    color: #6265ae!important;
    min-height: 2.7em !important;
    padding: 10px 0 0 0;
    margin-bottom: -10px !important;
}
.petchef-product-name a {
    text-decoration: none;
    color: #6265ae!important;
}

/* Band badge */
.petchef-band-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: #f9f4f0;
    color: #5b5d72;
    border-radius: 20px;
    font-size: 0.7em;
    padding: 3px 9px;
    width: fit-content;
    letter-spacing: 0.01em;
    font-family: geologica-medium, Helvetica, sans-serif !important;
}
.petchef-band-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--purple);
    flex-shrink: 0;
}

/* Daily grams row */
.petchef-adag-row {
    display: flex;
    align-items: center;
    gap: 6px;
}
.petchef-adag-icon {
    width: 20px;
    height: 20px;
    border-radius: 6px;
    background: rgba(224,32,32,0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.petchef-adag-icon svg {
    width: 10px;
    height: 10px;
    stroke: var(--purple);
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
}
.petchef-adag-text {
    font-size: 0.72rem;
    color: var(--pc-text-muted);
    line-height: 1.2;
}
.petchef-adag-text strong {
    color: var(--pc-text);
    font-weight: 700;
}

/* Card divider */
.petchef-card-divider {
    height: 1px;
    background: rgba(0,0,0,0.06);
    margin: 2px 0;
}

/* Price */
.petchef-product-price {
    display: flex;
    align-items: baseline;
    gap: 3px;
    flex-direction: column;
}

.petchef-results .petchef-product-price .woocommerce-Price-currencySymbol,
.petchef-calculator-wrap .petchef-product-price .woocommerce-Price-currencySymbol {
    font-size: 0.75rem !important;
    font-weight: 700 !important;
    color: var(--pc-primary) !important;
}

.petchef-results .petchef-product-price .woocommerce-Price-amount,
.petchef-calculator-wrap .petchef-product-price .woocommerce-Price-amount {
    font-size: 1.1rem !important;
    font-weight: 800 !important;
    color: var(--pc-primary) !important;
}

/* Add to cart button */
.petchef-results .petchef-atc-btn,
.petchef-calculator-wrap .petchef-atc-btn {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 7px !important;
    padding: 10px 12px !important;
    background: var(--pink) !important;
    border-radius: 99px !important;
    border: none !important;
    text-decoration: none !important;
    font-family: var(--pc-font);
    font-size: 0.78rem !important;
    font-weight: 800 !important;
    letter-spacing: 0.02em !important;
    cursor: pointer !important;
    margin-top: auto !important;
    width: 100% !important;
    text-align: center !important;
    transition: background var(--pc-transition), transform var(--pc-transition), box-shadow var(--pc-transition) !important;
}

.petchef-results .petchef-atc-btn:hover,
.petchef-calculator-wrap .petchef-atc-btn:hover {
    opacity: 0.9 !important;
    transform: translateY(-1px) !important;
    color: #ffffff !important;
}

/* Force icon size — theme SVG resets can override class-only rules */
.petchef-atc-icon,
.petchef-atc-btn svg,
.petchef-atc-btn > svg {
    width: 14px !important;
    height: 14px !important;
    min-width: 14px !important;
    min-height: 14px !important;
    max-width: 14px !important;
    max-height: 14px !important;
    flex-shrink: 0 !important;
    display: inline-block !important;
}

/* View button (no cart) */
.petchef-view-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px 12px;
    background: var(--purple);
    color: #ffffff !important;
    border-radius: 99px;
    text-decoration: none !important;
    font-family: geologica-medium, Helvetica, sans-serif !important;
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.02em;
    margin-top: auto;
    text-align: center;
    transition: background var(--pc-transition), transform var(--pc-transition);
}
.petchef-view-btn:hover {
    background: var(--purple-light);
    transform: translateY(-1px);
    color: #ffffff !important;
}

/* No products notice */
.petchef-no-products {
    background: #fffbeb;
    border: 1.5px solid #fde68a;
    border-radius: 10px;
    padding: 14px 18px;
    font-size: 0.88rem;
    color: #92400e;
    line-height: 1.5;
}

/* Loading spinner on button */
@keyframes pc-spin {
    to { transform: rotate(360deg); }
}
.petchef-calc-btn.loading {
    pointer-events: none !important;
    opacity: 0.8 !important;
    cursor: default !important;
}
.petchef-calc-btn.loading .petchef-btn-icon {
    display: inline-block;
    animation: pc-spin 0.8s linear infinite;
}

/* Responsive */
@media (max-width: 600px) {
    .petchef-calculator-wrap { padding: 18px 14px; }
    .petchef-btn-group { grid-template-columns: 1fr 1fr 1fr; }
    .petchef-opt-btn { font-size: 0.78rem; padding: 9px 4px; }
    .petchef-var-table { font-size: 0.8rem; }
}
