/* ============================================================
   CROMMELINS — Generator Calculator Page Styles
   File: assets/css/generator-calculator.css
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

/* ----------------------------------------------------------
   RESET & BASE
   ---------------------------------------------------------- */
.crom-gc-wrapper *,
.crom-gc-wrapper *::before,
.crom-gc-wrapper *::after { box-sizing: border-box; }

.crom-gc-wrapper {
    font-family: 'Inter', sans-serif;
    color: #111111;
    background: #f8f8f4;
}

/* ----------------------------------------------------------
   HERO
   ---------------------------------------------------------- */
.crom-gc-hero {
    background: linear-gradient(135deg, #111111 0%, #111111 65%, #111111 100%);
    padding: 152px 0 44px;
    position: relative;
    overflow: hidden;
}
.crom-gc-hero::before {
    content: '';
    position: absolute;
    top: -80px; right: -80px;
    width: 360px; height: 360px;
    background: radial-gradient(circle, rgba(245,166,35,.14) 0%, transparent 70%);
    pointer-events: none;
}
.crom-gc-hero-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    position: relative; z-index: 2;
}
.crom-gc-breadcrumb {
    font-size: 13px;
    color: rgba(255,255,255,.5);
    margin-bottom: 16px;
    display: flex; align-items: center; gap: 6px;
}
.crom-gc-breadcrumb a { color: #F5A623; text-decoration: none; font-weight: 500; }
.crom-gc-breadcrumb span { color: rgba(255,255,255,.3); }
.crom-gc-hero-title {
    font-size: clamp(26px, 4vw, 42px);
    font-weight: 800;
    color: #fff;
    margin: 0 0 12px;
    letter-spacing: -.5px; line-height: 1.2;
}
.crom-gc-hero-title em { font-style: normal; color: #F5A623; }
.crom-gc-hero-desc {
    font-size: 15px;
    color: rgba(255,255,255,.65);
    max-width: 620px;
    line-height: 1.7;
    margin: 0;
}

/* ----------------------------------------------------------
   MAIN LAYOUT
   ---------------------------------------------------------- */
.crom-gc-layout {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 24px 80px;
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 28px;
    align-items: start;
}

/* ----------------------------------------------------------
   SECTION LABEL
   ---------------------------------------------------------- */
.crom-gc-section-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #F5A623;
    margin: 0 0 10px;
}
.crom-gc-section-title {
    font-size: clamp(16px, 2.2vw, 22px);
    font-weight: 500;
    color: #111111;
    margin: 0 0 20px;
    letter-spacing: -.3px;
}

/* ----------------------------------------------------------
   APPLIANCE CATEGORY TABS
   ---------------------------------------------------------- */
.crom-gc-cat-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 22px;
}
.crom-gc-cat-tab {
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 12.5px;
    font-weight: 600;
    cursor: pointer;
    border: 2px solid #e8e8e0;
    background: #fff;
    color: #555;
    transition: all .18s;
    user-select: none;
}
.crom-gc-cat-tab:hover { border-color: #F5A623; color: #F5A623; }
.crom-gc-cat-tab.active {
    background: #F5A623;
    border-color: #F5A623;
    color: #fff;
}

/* ----------------------------------------------------------
   APPLIANCE CARDS GRID
   ---------------------------------------------------------- */
.crom-gc-appliances-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 24px;
}
.crom-gc-appliance-card {
    background: #fff;
    border: 2px solid #e8e8e0;
    border-radius: 12px;
    padding: 14px 14px 12px;
    cursor: pointer;
    transition: border-color .2s, box-shadow .2s, transform .2s;
    display: flex;
    flex-direction: column;
    gap: 6px;
    position: relative;
    user-select: none;
}
.crom-gc-appliance-card:hover {
    border-color: #F5A623;
    box-shadow: 0 4px 16px rgba(245,166,35,.15);
    transform: translateY(-2px);
}
.crom-gc-appliance-card.selected {
    border-color: #F5A623;
    background: #fffbf2;
    box-shadow: 0 4px 16px rgba(245,166,35,.18);
}
.crom-gc-appliance-card.hidden { display: none; }

.crom-gc-card-check {
    position: absolute;
    top: 10px; right: 10px;
    width: 20px; height: 20px;
    border-radius: 50%;
    border: 2px solid #ddd;
    background: #fff;
    display: flex; align-items: center; justify-content: center;
    transition: all .15s;
    flex-shrink: 0;
}
.crom-gc-appliance-card.selected .crom-gc-card-check {
    background: #F5A623;
    border-color: #F5A623;
}
.crom-gc-card-check svg {
    width: 11px; height: 11px;
    fill: #fff;
    opacity: 0;
    transition: opacity .15s;
}
.crom-gc-appliance-card.selected .crom-gc-card-check svg { opacity: 1; }

.crom-gc-card-icon {
    font-size: 26px;
    line-height: 1;
    margin-bottom: 2px;
}
.crom-gc-card-name {
    font-size: 12.5px;
    font-weight: 700;
    color: #111111;
    line-height: 1.3;
}
.crom-gc-card-watts {
    font-size: 11.5px;
    color: #888;
    font-weight: 500;
}
.crom-gc-card-qty {
    display: none;
    align-items: center;
    gap: 6px;
    margin-top: 4px;
}
.crom-gc-appliance-card.selected .crom-gc-card-qty { display: flex; }
.crom-gc-qty-btn {
    width: 22px; height: 22px;
    border-radius: 50%;
    border: 1.5px solid #F5A623;
    background: #fff;
    color: #F5A623;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: background .15s, color .15s;
    line-height: 1;
    padding: 0;
}
.crom-gc-qty-btn:hover { background: #F5A623; color: #fff; }
.crom-gc-qty-val {
    font-size: 13px;
    font-weight: 700;
    color: #111111;
    min-width: 18px;
    text-align: center;
}

/* ----------------------------------------------------------
   CUSTOM APPLIANCE ROW
   ---------------------------------------------------------- */
.crom-gc-custom-row {
    background: #fff;
    border: 2px dashed #e0e0e0;
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 24px;
}
.crom-gc-custom-row-title {
    font-size: 13px;
    font-weight: 700;
    color: #111111;
    margin: 0 0 12px;
}
.crom-gc-custom-inputs {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr auto;
    gap: 10px;
    align-items: end;
}
.crom-gc-custom-inputs label {
    font-size: 11px;
    font-weight: 600;
    color: #888;
    text-transform: uppercase;
    letter-spacing: .5px;
    display: block;
    margin-bottom: 4px;
}
.crom-gc-custom-inputs input {
    width: 100%;
    padding: 9px 12px;
    border: 1.5px solid #e0e0e0;
    border-radius: 8px;
    font-size: 13px;
    font-family: 'Inter', sans-serif;
    color: #111111;
    outline: none;
    transition: border-color .15s;
}
.crom-gc-custom-inputs input:focus { border-color: #F5A623 !important; }
.crom-gc-custom-inputs input.has-error { border-color: #e74c3c; background: #fff8f8; }
.crom-gc-add-btn {
    height: 38px;
    padding: 0 16px;
    background: #F5A623;
    border: none;
    border-radius: 8px;
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    font-family: 'Inter', sans-serif;
    transition: background .15s;
    white-space: nowrap;
    display: flex; align-items: center; gap: 6px;
}
.crom-gc-add-btn:hover { background: #e0961a; }
.crom-gc-add-btn svg { width: 14px; height: 14px; fill: #fff; }

/* ----------------------------------------------------------
   SELECTED APPLIANCES TABLE
   ---------------------------------------------------------- */
.crom-gc-selected-panel {
    background: #fff;
    border: 1px solid #eaeaea;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 22px;
    display: none;
}
.crom-gc-selected-panel.has-items { display: block; }
.crom-gc-selected-header {
    padding: 12px 16px;
    background: #111111;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.crom-gc-selected-header h4 {
    font-size: 13px;
    font-weight: 700;
    color: #fff;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: .6px;
}
.crom-gc-clear-all {
    font-size: 12px;
    color: #F5A623;
    cursor: pointer;
    font-weight: 600;
    background: none;
    border: none;
    font-family: 'Inter', sans-serif;
    padding: 0;
    cursor: pointer;
}
.crom-gc-selected-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}
.crom-gc-selected-table th {
    padding: 10px 14px;
    text-align: left;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .5px;
    color: #888;
    border-bottom: 1px solid #f0f0ec;
    background: #fafaf8;
}
.crom-gc-selected-table td {
    padding: 10px 14px;
    border-bottom: 1px solid #f5f5f0;
    color: #111111;
    vertical-align: middle;
}
.crom-gc-selected-table tr:last-child td { border-bottom: none; }
.crom-gc-remove-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 2px 4px;
    color: #ccc;
    font-size: 16px;
    line-height: 1;
    transition: color .15s;
}
.crom-gc-remove-btn:hover { color: #e74c3c; }

/* ----------------------------------------------------------
   STICKY SUMMARY PANEL (right column)
   ---------------------------------------------------------- */
.crom-gc-summary-panel {
    position: sticky;
    top: 100px;
}
.crom-gc-summary-card {
    background: #fff;
    border: 1px solid #eaeaea;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,.07);
}
.crom-gc-summary-header {
    background: linear-gradient(135deg, #111111 0%, #111111 100%);
    padding: 20px 20px 16px;
}
.crom-gc-summary-header h3 {
    font-size: 15px;
    font-weight: 500;
    color: #fff;
    margin: 0 0 4px;
}
.crom-gc-summary-header p {
    font-size: 12px;
    color: rgba(255,255,255,.55);
    margin: 0;
}
.crom-gc-summary-body { padding: 16px; }

.crom-gc-watt-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid #f0f0ec;
}
.crom-gc-watt-row:last-of-type { border-bottom: none; }
.crom-gc-watt-label {
    font-size: 12.5px;
    font-weight: 600;
    color: #666;
}
.crom-gc-watt-value {
    font-size: 18px;
    font-weight: 800;
    color: #111111;
}
.crom-gc-watt-value span {
    font-size: 12px;
    font-weight: 500;
    color: #aaa;
}
.crom-gc-recommended-row {
    background: #fffbf2;
    border: 2px solid #F5A623;
    border-radius: 10px;
    padding: 14px 16px;
    margin: 14px 0 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.crom-gc-recommended-label {
    font-size: 12px;
    font-weight: 700;
    color: #111111;
    text-transform: uppercase;
    letter-spacing: .4px;
}
.crom-gc-recommended-val {
    font-size: 22px;
    font-weight: 800;
    color: #F5A623;
}
.crom-gc-recommended-val span {
    font-size: 12px;
    font-weight: 600;
    color: #F5A623;
}

.crom-gc-find-btn {
    width: 100%;
    padding: 14px;
    background: #F5A623;
    border: none;
    border-radius: 10px;
    color: #fff;
    font-size: 15px;
    font-weight: 800;
    cursor: pointer;
    font-family: 'Inter', sans-serif;
    transition: background .15s, transform .15s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    letter-spacing: .2px;
}
.crom-gc-find-btn:hover { background: #e0961a; transform: translateY(-1px); }
.crom-gc-find-btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.crom-gc-find-btn svg { width: 18px; height: 18px; fill: #fff; }
.crom-gc-find-btn .crom-gc-spinner {
    width: 16px; height: 16px;
    border: 2px solid rgba(255,255,255,.4);
    border-top-color: #fff;
    border-radius: 50%;
    animation: gc-spin .7s linear infinite;
    display: none;
}
.crom-gc-find-btn.loading .crom-gc-spinner { display: block; }
.crom-gc-find-btn.loading .crom-gc-btn-icon { display: none; }

@keyframes gc-spin { to { transform: rotate(360deg); } }

.crom-gc-summary-note {
    font-size: 11.5px;
    color: #aaa;
    text-align: center;
    margin-top: 12px;
    line-height: 1.5;
}

/* ----------------------------------------------------------
   RESULTS SECTION
   ---------------------------------------------------------- */
.crom-gc-results {
    max-width: 1200px;
    margin: 0 auto 80px;
    padding: 0 24px;
    display: none;
}
.crom-gc-results.visible { display: block; }
.crom-gc-results-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 28px;
    padding-bottom: 16px;
    border-bottom: 2px solid #f0f0ec;
}
.crom-gc-results-title {
    font-size: clamp(18px, 2.5vw, 26px);
    font-weight: 800;
    color: #111111;
    margin: 0;
}
.crom-gc-results-badge {
    padding: 4px 12px;
    background: #F5A623;
    color: #fff;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
}
.crom-gc-results-wattage {
    font-size: 13px;
    color: #888;
    margin-left: auto;
}
.crom-gc-products-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}
.crom-gc-no-results {
    text-align: center;
    padding: 60px 24px;
    background: #fff;
    border-radius: 14px;
    border: 1px dashed #ddd;
}
.crom-gc-no-results svg {
    width: 56px; height: 56px;
    fill: #ddd;
    margin-bottom: 14px;
    display: block; margin-left: auto; margin-right: auto;
}
.crom-gc-no-results p {
    font-size: 15px; color: #888;
    margin: 0;
}

/* Product card (reuses WC template — minimal override) */
.crom-gc-products-grid .product {
    background: #fff;
    border: 1px solid #eaeaea;
    border-radius: 12px;
    overflow: hidden;
    transition: box-shadow .2s, transform .2s;
    list-style: none;
}
.crom-gc-products-grid .product:hover {
    box-shadow: 0 8px 28px rgba(0,0,0,.12);
    transform: translateY(-3px);
}
.crom-gc-wattage-badge {
    text-align: center;
    padding: 6px 12px;
    background: #f5f5f0;
    font-size: 12px;
    font-weight: 600;
    color: #555;
}

/* Loading skeleton */
.crom-gc-loading {
    display: none;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-bottom: 28px;
}
.crom-gc-loading.visible { display: grid; }
.crom-gc-skel {
    height: 280px;
    border-radius: 12px;
    background: linear-gradient(90deg, #f0f0ec 25%, #e8e8e0 50%, #f0f0ec 75%);
    background-size: 200% 100%;
    animation: gc-shimmer 1.4s infinite;
}
@keyframes gc-shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

/* ----------------------------------------------------------
   RESPONSIVE
   ---------------------------------------------------------- */
@media (max-width: 1024px) {
    .crom-gc-layout { grid-template-columns: 1fr; }
    .crom-gc-summary-panel { position: static; }
    .crom-gc-products-grid { grid-template-columns: repeat(2, 1fr); }
    .crom-gc-loading { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
    .crom-gc-appliances-grid { grid-template-columns: repeat(2, 1fr); }
    .crom-gc-custom-inputs { grid-template-columns: 1fr 1fr; }
    .crom-gc-custom-inputs > div:first-child { grid-column: span 2; }
    .crom-gc-custom-inputs > div:last-child { grid-column: span 2; }
    .crom-gc-layout { padding: 28px 16px 56px; }
    .crom-gc-results { padding: 0 16px; }
}
@media (max-width: 480px) {
    .crom-gc-appliances-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
    .crom-gc-products-grid { grid-template-columns: 1fr; }
    .crom-gc-loading { grid-template-columns: 1fr; }
}

/* ----------------------------------------------------------
   PRODUCT CARD (rendered by AJAX PHP)
   ---------------------------------------------------------- */
.crom-gc-product-card {
    background: #fff;
    border: 1px solid #eaeaea;
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: box-shadow .2s, transform .2s;
}
.crom-gc-product-card:hover {
    box-shadow: 0 8px 28px rgba(0,0,0,.12);
    transform: translateY(-3px);
}
.crom-gc-product-thumb {
    display: block;
    width: 100%;
    aspect-ratio: 4/3;
    overflow: hidden;
    background: #f5f5f0;
    position: relative;
}
.crom-gc-product-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform .3s;
}
.crom-gc-product-card:hover .crom-gc-product-thumb img { transform: scale(1.05); }
.crom-gc-product-no-img {
    width: 100%; height: 100%;
    display: flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, #111111, #111111);
}
.crom-gc-product-no-img svg {
    width: 56px; height: 56px;
    fill: rgba(245,166,35,.4);
}
.crom-gc-product-watt {
    padding: 6px 14px;
    background: #f5f5f0;
    font-size: 12px;
    font-weight: 600;
    color: #555;
    display: flex;
    align-items: center;
    gap: 5px;
}
.crom-gc-product-body {
    padding: 14px 16px 18px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex: 1;
}
.crom-gc-product-name {
    font-size: 14px;
    font-weight: 700;
    color: #111111;
    margin: 0;
    line-height: 1.35;
}
.crom-gc-product-name a {
    color: inherit;
    text-decoration: none;
}
.crom-gc-product-name a:hover { color: #F5A623; }
.crom-gc-product-price {
    font-size: 16px;
    font-weight: 800;
    color: #F5A623;
}
.crom-gc-product-price .woocommerce-Price-currencySymbol { font-size: 13px; }
.crom-gc-product-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 9px 16px;
    background: #111111;
    color: #fff;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    margin-top: auto;
    transition: background .15s;
}
.crom-gc-product-btn:hover {
    background: #F5A623;
    color: #fff;
    text-decoration: none;
}
