/**
 * Tyre Search Hero Section
 * Uses CSS variables from theme-variables.css for fonts and colors
 */

/* === Hero Container === */
.hero-section-with-search {
    position: relative;
    min-height: 480px;
    background-size: cover !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
}
/* === Overlay === */
.tyre-search-hero-overlay {
    position: relative;
    z-index: 10;
    display: flex;
    align-items: center;
    padding: 40px 0;
    min-height: 480px;
}
.tyre-search-wrapper .row {
    align-items: center;
}
/* === Left Column === */
.tyre-search-hero-left {
    padding-right: 30px;
}
.tyre-search-hero-title {
    font-family: var(--font-heading);
    font-size: 47px;
    font-weight: 500;
    line-height: 1.15;
    color: #fff;
    margin: 0 0 8px;
    text-shadow: 1px 2px 4px rgba(0, 0, 0, 0.4);
}

.tyre-search-hero-title .hero-highlight {
    color: var(--primary-color);
    text-decoration: underline;
    text-decoration-color: var(--primary-color);
    text-underline-offset: 4px;
}

.tyre-search-hero-subtitle {
    font-family: var(--font-body);
    font-size: 14px;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.95);
    margin: 0 0 16px;
}

/* === Benefits Box === */
.hero-benefits-box {
    background: rgba(0, 0, 0, 0.7);
    border-radius: 8px;
    padding: 16px 20px;
    max-width: 500px;
}

.hero-benefits-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px 24px;
}

.hero-benefit-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-body);
    font-size: 15px;
    font-weight: 500;
    color: #fff;
}

.hero-benefit-item i {
    font-size: 15px;
    width: 18px;
    text-align: center;
}

.hero-benefit-item .fa-star {
    color: var(--primary-color) !important;
}

.hero-benefit-item .fa-map-marker-alt {
    color: #e74c3c !important;
}

.hero-benefit-item .fa-heart {
    color: var(--primary-color) !important;
}

.hero-benefit-item .fa-truck {
    color: var(--primary-color) !important;
}

.hero-benefit-item i.icon-gold {
    color: var(--primary-color) !important;
}

.hero-benefit-item i.icon-red {
    color: #e74c3c !important;
}

/* === Search Card === */
.tyre-search-card {
    background: #fff;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 4px 25px rgba(0, 0, 0, 0.15);
}

/* Tabs */
.tyre-search-tabs {
    display: flex;
    border-bottom: 1px solid #e5e5e5;
    margin-bottom: 16px;
}

.tyre-search-tab {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 12px 10px;
    border: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    background: none;
    font-family: var(--font-heading);
    font-size: 13px;
    font-weight: 600;
    color: #999;
    cursor: pointer;
}

.tyre-search-tab i {
    font-size: 14px;
    color: var(--primary-color);
}

.tyre-search-tab:hover {
    color: var(--color-heading);
}

.tyre-search-tab.active {
    color: var(--color-heading);
    border-bottom-color: var(--primary-color);
}

/* Size Selector Buttons (Click to open modal) */
.tyre-size-selectors {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 10px;
    margin-bottom: 16px;
}

.tyre-size-selector {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 12px 14px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
}

.tyre-size-selector:hover {
    border-color: var(--primary-color);
    background: #fffaf0;
}

.tyre-size-selector.has-value {
    border-color: var(--primary-color);
    background: #fffaf0;
}

.tyre-size-selector .selector-label {
    font-family: var(--font-body);
    font-size: 11px;
    color: #999;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 2px;
}

.tyre-size-selector .selector-value {
    font-family: var(--font-heading);
    font-size: 16px;
    font-weight: 600;
    color: var(--color-heading);
}

.tyre-size-selector.has-value .selector-value {
    color: var(--primary-color);
}

.tyre-size-selector i {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 10px;
    color: #999;
}

/* Current Selection */
.tyre-current-selection-box {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: #f8f8f8;
    border-radius: 6px;
    margin-bottom: 12px;
}

.selection-label {
    font-family: var(--font-body);
    font-size: 13px;
    color: var(--color-text-muted);
}

.selection-value {
    font-family: var(--font-heading);
    font-size: 18px;
    font-weight: 700;
    color: var(--color-heading);
    flex: 1;
}

/* Main Find Tyres Button */
.btn-find-tyres-main {
    display: block;
    width: 100%;
    padding: 14px 24px;
    background: var(--primary-color);
    color: #fff !important;
    font-family: var(--font-heading);
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    border-radius: 6px;
    text-decoration: none;
    text-align: center;
    transition: background 0.2s;
}

.btn-find-tyres-main:hover {
    background: var(--primary-color-dark);
    color: #fff !important;
}

.btn-find-tyres-main i {
    margin-left: 8px;
}

/* Fits Info */
.tyre-fits-info {
    font-family: var(--font-body);
    font-size: 12px;
    color: #888;
    margin-bottom: 12px;
}

/* Learn Link */
.tyre-learn-link {
    display: flex;
    align-items: center;
    gap: 6px;
    padding-top: 12px;
    border-top: 1px solid #eee;
    font-family: var(--font-body);
    font-size: 12px;
}

.tyre-learn-link i {
    color: var(--primary-color);
}

.tyre-learn-link a {
    color: var(--primary-color);
    text-decoration: none;
}

.tyre-learn-link a:hover {
    text-decoration: underline;
}

/* Toggle */
.tyre-search-content {
    display: none;
}

.tyre-search-content.active {
    display: block;
}

/* === Responsive === */

/* Tablet */
@media (max-width: 1199px) {
    .tyre-search-hero-title {
        font-size: 36px;
    }
}

/* Tablet Portrait */
@media (max-width: 991px) {
    .hero-section-with-search {
        min-height: auto;
        padding: 0;
    }

    .tyre-search-hero-overlay {
        min-height: auto;
        padding: 30px 0;
    }

    .tyre-search-hero-left {
        padding-right: 0;
        margin-bottom: 24px;
        text-align: center;
    }

    .tyre-search-hero-title {
        font-size: 28px;
        margin-bottom: 10px;
    }

    .tyre-search-hero-subtitle {
        font-size: 13px;
    }

    .hero-benefits-box {
        max-width: 100%;
        margin: 0 auto;
        padding: 14px 16px;
    }

    .hero-benefits-grid {
        gap: 10px 16px;
    }

    .hero-benefit-item {
        justify-content: center;
        font-size: 12px;
    }

    .tyre-search-card {
        padding: 16px;
    }

    .tyre-size-selectors {
        grid-template-columns: 1fr 1fr 1fr;
        gap: 8px;
    }

    .tyre-size-selector {
        padding: 10px 12px;
    }

    .tyre-size-selector .selector-label {
        font-size: 10px;
    }

    .tyre-size-selector .selector-value {
        font-size: 14px;
    }

    .tyre-current-selection-box {
        flex-wrap: wrap;
        padding: 10px 12px;
        gap: 8px;
    }

    .selection-value {
        font-size: 16px;
    }

    .btn-find-tyres-main {
        padding: 12px 20px;
        font-size: 13px;
    }
}

/* Mobile */
@media (max-width: 767px) {
    .hero-section-with-search {
        min-height: auto !important;
        background-position: center top !important;
        background-size: cover !important;
    }

    .tyre-search-hero-overlay {
        padding: 24px 0 16px;
        background: linear-gradient(to bottom, rgba(0,0,0,0.3) 0%, rgba(0,0,0,0.1) 100%);
    }

    .tyre-search-hero-left {
        margin-bottom: 16px;
    }

    .tyre-search-hero-title {
        font-size: 20px;
        line-height: 1.3;
        margin-bottom: 6px;
        text-shadow: 0 2px 8px rgba(0,0,0,0.5);
        font-weight: 600;
    }

    .tyre-search-hero-subtitle {
        font-size: 12px;
        margin-bottom: 12px;
        opacity: 0.95;
    }

    .hero-benefits-box {
        padding: 10px 12px;
        background: rgba(0,0,0,0.75);
        border-radius: 6px;
        display: inline-block;
        width: auto;
        max-width: 100%;
    }

    .hero-benefits-grid {
        grid-template-columns: 1fr 1fr;
        gap: 6px 16px;
    }

    .hero-benefit-item {
        font-size: 10px;
        gap: 5px;
        white-space: nowrap;
    }

    .hero-benefit-item i {
        font-size: 11px;
        width: 12px;
    }

    /* Search Card - Professional Mobile Design */
    .tyre-search-card {
        padding: 16px;
        margin: 0;
        border-radius: 12px;
        box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    }

    .tyre-search-tabs {
        gap: 0;
        margin-bottom: 14px;
        border-bottom: 2px solid #f0f0f0;
    }

    .tyre-search-tab {
        padding: 10px 12px;
        font-size: 12px;
        gap: 6px;
        border-bottom: 2px solid transparent;
        margin-bottom: -2px;
    }

    .tyre-search-tab.active {
        border-bottom-color: var(--primary-color);
    }

    .tyre-search-tab i {
        font-size: 13px;
    }

    .tyre-size-selectors {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .tyre-size-selector {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        padding: 14px 16px;
        border: 1px solid #e5e5e5;
        border-radius: 8px;
        background: #fafafa;
        transition: all 0.2s;
    }

    .tyre-size-selector:hover,
    .tyre-size-selector:focus {
        border-color: var(--primary-color);
        background: #fff;
    }

    .tyre-size-selector.has-value {
        border-color: var(--primary-color);
        background: #fffdf5;
    }

    .tyre-size-selector .selector-label {
        font-size: 11px;
        text-transform: uppercase;
        letter-spacing: 0.5px;
        color: #888;
        margin-bottom: 0;
    }

    .tyre-size-selector .selector-value {
        font-size: 16px;
        font-weight: 600;
        color: #333;
    }

    .tyre-size-selector.has-value .selector-value {
        color: var(--primary-color);
    }

    .tyre-size-selector i {
        position: static;
        transform: none;
        font-size: 12px;
        color: #999;
    }

    .tyre-current-selection-box {
        padding: 12px 14px;
        margin-bottom: 12px;
        background: #f5f5f5;
        border-radius: 8px;
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }

    .selection-label {
        font-size: 11px;
        color: #666;
    }

    .selection-value {
        font-size: 18px;
        font-weight: 700;
        color: #222;
    }

    .btn-find-tyres-main {
        padding: 14px 20px;
        font-size: 14px;
        font-weight: 600;
        border-radius: 8px;
        text-transform: uppercase;
        letter-spacing: 0.5px;
    }

    .tyre-learn-link {
        padding-top: 12px;
        font-size: 11px;
        justify-content: center;
    }

    .tyre-learn-link a {
        color: var(--primary-color);
    }
}

/* Small Mobile */
@media (max-width: 575px) {
    .tyre-search-hero-overlay {
        padding: 20px 0 12px;
    }

    .tyre-search-hero-title {
        font-size: 18px;
        line-height: 1.35;
    }

    .tyre-search-hero-subtitle {
        font-size: 11px;
        margin-bottom: 10px;
    }

    .hero-benefits-box {
        padding: 8px 10px;
    }

    .hero-benefits-grid {
        grid-template-columns: 1fr 1fr;
        gap: 4px 10px;
    }

    .hero-benefit-item {
        font-size: 9px;
    }

    .hero-benefit-item i {
        font-size: 10px;
        width: 10px;
    }

    .tyre-search-card {
        padding: 14px;
        border-radius: 10px;
    }

    .tyre-search-tabs {
        margin-bottom: 12px;
    }

    .tyre-search-tab {
        padding: 8px 10px;
        font-size: 11px;
    }

    .tyre-size-selectors {
        gap: 8px;
    }

    .tyre-size-selector {
        padding: 12px 14px;
    }

    .tyre-size-selector .selector-label {
        font-size: 10px;
    }

    .tyre-size-selector .selector-value {
        font-size: 15px;
    }

    .tyre-current-selection-box {
        padding: 10px 12px;
    }

    .selection-label {
        font-size: 10px;
    }

    .selection-value {
        font-size: 16px;
    }

    .btn-find-tyres-main {
        padding: 12px 16px;
        font-size: 13px;
    }

    .tyre-learn-link {
        padding-top: 10px;
        font-size: 10px;
    }
}

/* Extra Small Mobile */
@media (max-width: 375px) {
    .tyre-search-hero-title {
        font-size: 16px;
    }

    .hero-benefits-grid {
        gap: 3px 8px;
    }

    .hero-benefit-item {
        font-size: 8px;
    }

    .tyre-search-card {
        padding: 12px;
    }

    .tyre-size-selector {
        padding: 10px 12px;
    }

    .tyre-size-selector .selector-value {
        font-size: 14px;
    }

    .btn-find-tyres-main {
        padding: 12px 14px;
        font-size: 12px;
    }
}

/* ================================================
   TYRE SIZE SELECTOR MODAL
   ================================================ */

.tyre-modal-content {
    border: none;
    border-radius: 0;
    overflow: hidden;
}

/* Modal Header - Theme Color Bar */
.tyre-modal-header {
    background: var(--primary-color);
    padding: 12px 20px;
    display: flex;
    align-items: center;
    min-height: 48px;
}

.tyre-modal-header-spacer {
    flex: 1;
}

.tyre-back-btn {
    background: none;
    border: none;
    color: #fff;
    font-family: var(--font-heading);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0;
}

.tyre-back-btn:hover {
    opacity: 0.8;
}

.tyre-modal-close {
    background: none;
    border: none;
    color: #fff;
    font-size: 20px;
    cursor: pointer;
    padding: 5px 10px;
    line-height: 1;
    opacity: 0.9;
    transition: opacity 0.2s;
}

.tyre-modal-close:hover {
    opacity: 1;
}

/* Modal Body */
.tyre-modal-body {
    padding: 24px 30px;
    background: #f5f5f5;
}

/* Step Tabs */
.tyre-step-tabs {
    display: flex;
    align-items: baseline;
    gap: 24px;
    margin-bottom: 12px;
}

.tyre-step-tab {
    font-family: var(--font-heading);
    font-size: 13px;
    font-weight: 500;
    color: #bbb;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.2s;
}

.tyre-step-tab.active {
    color: #222;
    font-size: 20px;
    font-weight: 700;
}

.tyre-step-tab.completed {
    color: #888;
}

/* Progress Bar */
.tyre-progress-bar {
    margin-bottom: 16px;
}

.progress-track {
    display: flex;
    align-items: center;
    max-width: 280px;
}

.progress-dot {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 2px solid #ddd;
    background: #fff;
    transition: all 0.3s;
    cursor: pointer;
    flex-shrink: 0;
}

.progress-dot.active {
    border-color: var(--primary-color);
}

.progress-dot.active.filled,
.progress-dot.filled {
    background: var(--primary-color);
    border-color: var(--primary-color);
}

.progress-line {
    flex: 1;
    height: 2px;
    background: #ddd;
    margin: 0 -1px;
    transition: background 0.3s;
}

.progress-line.active {
    background: var(--primary-color);
}

/* Current Selection in Modal */
.modal-current-selection {
    font-family: var(--font-body);
    font-size: 14px;
    color: #666;
    margin-bottom: 16px;
}

.modal-current-selection strong {
    font-family: var(--font-heading);
    font-weight: 700;
    color: #222;
}

/* Search Input */
.tyre-search-input-wrapper {
    position: relative;
    margin-bottom: 20px;
    max-width: 350px;
}

.tyre-search-input {
    width: 100%;
    padding: 12px 40px 12px 16px;
    border: 2px solid var(--primary-color);
    border-radius: 6px;
    font-family: var(--font-body);
    font-size: 14px;
    background: #fff;
}

.tyre-search-input:focus {
    outline: none;
    border-color: var(--primary-color-dark);
}

.tyre-search-input-wrapper i {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #999;
}

/* Size Options Grid */
.tyre-size-options {
    background: #f0f0f0;
    border-radius: 8px;
    padding: 16px;
    min-height: 200px;
}

.size-options-panel {
    display: none;
}

.size-options-panel.active {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 10px;
}

.tyre-size-option {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    padding: 14px 8px;
    font-family: var(--font-heading);
    font-size: 16px;
    font-weight: 600;
    color: #333;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
}

.tyre-size-option:hover {
    border-color: var(--primary-color);
    background: #fffaf0;
}

.tyre-size-option.selected {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: #fff;
}

/* Tyre Diagram */
.tyre-diagram-box {
    background: #fff;
    border-radius: 8px;
    padding: 24px 20px;
    text-align: center;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tyre-diagram {
    position: relative;
    width: 100%;
}

.diagram-top-labels {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-bottom: 10px;
    font-family: var(--font-body);
    font-size: 12px;
    font-style: italic;
}

.diagram-top-labels .label-width,
.diagram-top-labels .label-height {
    color: var(--primary-color);
}

.diagram-top-labels .label-rim {
    color: #333;
}

.tyre-svg {
    width: 100%;
    max-width: 220px;
    height: auto;
    margin: 0 auto;
    display: block;
}

.diagram-values {
    margin-top: 12px;
    font-family: var(--font-heading);
    font-size: 28px;
    font-weight: 700;
    font-style: italic;
}

.diagram-values .value-width,
.diagram-values .value-height {
    color: var(--primary-color);
}

.diagram-values .value-separator {
    color: #333;
    margin: 0 2px;
}

.diagram-values .value-rim {
    color: #333;
    margin-left: 6px;
}

/* Modal Footer Actions */
.modal-footer-actions {
    margin-top: 24px;
    text-align: center;
}

.btn-find-tyres-modal {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 40px;
    background: var(--primary-color);
    color: #fff !important;
    font-family: var(--font-heading);
    font-size: 15px;
    font-weight: 600;
    text-transform: uppercase;
    border-radius: 6px;
    text-decoration: none;
    transition: background 0.2s;
}

.btn-find-tyres-modal:hover {
    background: var(--primary-color-dark);
    color: #fff !important;
}

/* Modal Responsive */
@media (max-width: 991px) {
    .modal-dialog.modal-lg {
        max-width: 95%;
        margin: 10px auto;
    }

    .tyre-modal-body {
        padding: 20px;
    }

    .tyre-modal-body .row {
        flex-direction: column;
    }

    .tyre-modal-body .col-md-7,
    .tyre-modal-body .col-md-5 {
        width: 100%;
        max-width: 100%;
    }

    .tyre-diagram-box {
        display: none;
    }
}

@media (max-width: 767px) {
    .modal-dialog.modal-lg {
        max-width: 100%;
        margin: 0;
        min-height: 100vh;
    }

    .tyre-modal-content {
        min-height: 100vh;
        border-radius: 0;
    }

    .tyre-modal-header {
        padding: 10px 16px;
    }

    .tyre-back-btn {
        font-size: 13px;
    }

    .tyre-modal-close {
        font-size: 18px;
    }

    .tyre-modal-body {
        padding: 16px;
    }

    .tyre-step-tabs {
        gap: 12px;
        margin-bottom: 10px;
    }

    .tyre-step-tab {
        font-size: 11px;
    }

    .tyre-step-tab.active {
        font-size: 16px;
    }

    .tyre-progress-bar {
        margin-bottom: 12px;
    }

    .progress-track {
        max-width: 200px;
    }

    .progress-dot {
        width: 12px;
        height: 12px;
    }

    .modal-current-selection {
        font-size: 13px;
        margin-bottom: 12px;
    }

    .tyre-search-input-wrapper {
        margin-bottom: 16px;
    }

    .tyre-search-input {
        padding: 10px 36px 10px 14px;
        font-size: 14px;
    }

    .tyre-size-options {
        padding: 12px;
        min-height: 180px;
    }

    .size-options-panel.active {
        grid-template-columns: repeat(auto-fill, minmax(60px, 1fr));
        gap: 8px;
    }

    .tyre-size-option {
        padding: 12px 6px;
        font-size: 14px;
        border-radius: 4px;
    }

    .modal-footer-actions {
        margin-top: 16px;
    }

    .btn-find-tyres-modal {
        width: 100%;
        padding: 14px 20px;
        font-size: 14px;
    }
}

@media (max-width: 375px) {
    .tyre-step-tabs {
        gap: 8px;
    }

    .tyre-step-tab {
        font-size: 10px;
    }

    .tyre-step-tab.active {
        font-size: 14px;
    }

    .size-options-panel.active {
        grid-template-columns: repeat(auto-fill, minmax(55px, 1fr));
    }

    .tyre-size-option {
        padding: 10px 4px;
        font-size: 13px;
    }
}