/* Hose Builder Styles */

/* Main Wrapper */
#hose-builder-wrapper {
    width: 100%;
    padding: 50px 0;
}

/* Container - 1300px max width */
.hb-container {
    max-width: 1300px;
    width: 100%;
    margin: 0 auto;
    padding: 0 20px;
    box-sizing: border-box;
}

/* Main Title */
.hb-main-title {
    font-size: 32px;
    font-weight: 700;
    color: #111827;
    text-align: left;
    margin: 0 0 40px 0;
    padding: 0 0 10px 0;
    border-bottom: 2px solid #e5e7eb;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* 3 Cards Grid */
.hb-cards-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-bottom: 30px;
}

/* Individual Card */
.hb-card {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: box-shadow 0.2s ease;
}

.hb-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Card Header - Title Left, Image Right */
.hb-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px 0 24px;
    gap: 15px;
}

/* Card Title - Left Aligned */
.hb-card-title {
    font-size: 22px;
    font-weight: 700;
    color: #111827;
    margin: 0;
    padding: 0;
    font-family: inherit;
    flex: 1;
}

/* Header Image - Right Aligned */
.hb-card-header-image {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

.hb-end-image {
    max-width: 60px;
    max-height: 60px;
    width: auto;
    height: auto;
    object-fit: contain;
}

.hb-body-image {
    max-width: 80px;
    max-height: 60px;
    width: auto;
    height: auto;
    object-fit: contain;
}

/* Card Body */
.hb-card-body {
    padding: 16px 24px 24px 24px;
}

/* Warning Text */
.hb-warning-text {
    font-size: 14px;
    color: #9ca3af;
    margin: 0 0 16px 0;
    padding: 0;
    font-weight: 400;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Dropdown Wrapper Animation */
.hb-dropdown-wrapper {
    transition: all 0.3s ease-in-out;
}

/* Labels */
.hb-label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 8px;
    margin-top: 20px;
    text-align: left;
}

.hb-label:first-of-type {
    margin-top: 0;
}

/* Select Dropdowns and Inputs */
.hb-select,
.hb-input {
    width: 100%;
    padding: 10px 14px;
    font-size: 14px;
    font-family: inherit;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    background: #ffffff;
    color: #1f2937;
    transition: all 0.2s ease;
    box-sizing: border-box;
}

.hb-select:focus,
.hb-input:focus,
.hb-textarea:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.1);
}

/* Notes Section */
.hb-notes-section {
    background: #ffffff;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 30px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.hb-textarea {
    width: 100%;
    padding: 12px 14px;
    font-size: 14px;
    font-family: inherit;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    resize: vertical;
    min-height: 80px;
    box-sizing: border-box;
}

.hb-notes-section .hb-label {
    margin-top: 0;
    margin-bottom: 12px;
}

/* Add to Cart Button */
.hb-add-to-cart-btn {
    width: 100%;
    background: #000000 !important;
    color: #FFFFFF !important;
    border: none;
    padding: 14px 24px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s ease;
    font-family: inherit;
    max-width: 180px;
}

.hb-add-to-cart-btn:hover {
    background: #FFFFFF !important;
    color: #000000 !important;
}

/* Animation for dropdown appearance */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hb-dropdown-wrapper {
    animation: fadeIn 0.3s ease-out;
}

/* Info Message for Open Option and Errors */
.hb-info-message {
    background: #eef2ff;
    border-left: 4px solid #3b82f6;
    padding: 12px 16px;
    margin-top: 16px;
    border-radius: 8px;
}

.hb-info-message p {
    margin: 0;
    font-size: 14px;
    color: #1e40af;
}

.hb-info-message.warning {
    background: #fef3c7;
    border-left-color: #f59e0b;
}

.hb-info-message.warning p {
    color: #92400e;
}

/* Dynamic Level Dropdowns */
.hb-dynamic-level {
    margin-top: 16px;
    padding-top: 8px;
    border-top: 1px dashed #e5e7eb;
}

.hb-dynamic-level:first-of-type {
    margin-top: 8px;
    border-top: none;
}

.hb-sub-level {
    margin-left: 0;
}

/* Animation for dynamic dropdowns */
.hb-dynamic-level {
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Hose Options Section */
.hose-options-section {
    background: #ffffff;
    border-radius: 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    margin-top: 35px;
    padding: 28px 32px;
    animation: fadeInUp 0.4s ease-out;
    max-width: 66%;
    box-sizing: border-box;
}

.section-header {
    margin-bottom: 24px;
    padding-bottom: 12px;
    border-bottom: 2px solid #e5e7eb;
}

.section-title {
    font-size: 24px;
    font-weight: 700;
    color: #1a2c3e;
    margin: 0;
}

/* Options Grid */
.options-grid {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 24px;
}

/* Part Number Section */
.option-card {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    flex-wrap: wrap;
}

.option-label {
    font-size: 15px;
    font-weight: 600;
    color: #374151;
    margin: 0;
    white-space: nowrap;
}

.option-card .hb-input {
    width: 250px;
    max-width: 100%;
    flex-shrink: 0;
}

.more-info-link {
    font-size: 12px;
    color: #3b82f6;
    text-decoration: none;
    white-space: nowrap;
}

.more-info-link:hover {
    text-decoration: underline;
}

/* BOM Section */
.checkbox-card {
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 14px;
    color: #4b5563;
    white-space: nowrap;
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    margin: 0;
}

/* Instructions Section */
.instructions-section {
    margin-bottom: 28px;
}

.instructions-section .option-label {
    display: block;
    margin-bottom: 12px;
}

.instructions-section .hb-textarea {
    width: 100%;
    min-height: 100px;
    box-sizing: border-box;
}

.info-link {
    margin-top: 8px;
    text-align: right;
}

.info-link a {
    font-size: 12px;
    color: #3b82f6;
    text-decoration: none;
}

.info-link a:hover {
    text-decoration: underline;
}

/* Length Section with Range Slider */
.length-section {
    margin-bottom: 28px;
    padding: 20px;
    background: #f9fafb;
    border-radius: 16px;
}

.length-section .option-label {
    display: block;
    margin-bottom: 16px;
}

.length-inputs {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.length-value {
    display: flex;
    align-items: center;
    gap: 20px;
    flex: 2;
    flex-wrap: wrap;
}

/* Range Slider Styles */
.hb-range {
    flex: 1;
    min-width: 150px;
    height: 6px;
    background: #e5e7eb;
    border-radius: 5px;
    outline: none;
}

.hb-range::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    background: #3b82f6;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.hb-range::-webkit-slider-thumb:hover {
    background: #2563eb;
    transform: scale(1.2);
}

.hb-range::-moz-range-thumb {
    width: 18px;
    height: 18px;
    background: #3b82f6;
    border-radius: 50%;
    cursor: pointer;
    border: none;
}

.hb-range::-moz-range-track {
    height: 6px;
    background: #e5e7eb;
    border-radius: 5px;
}

.length-input-group {
    display: flex;
    align-items: center;
    gap: 12px;
}

.length-value .hb-input {
    width: 100px;
    text-align: center;
}

.length-options {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
    flex: 1;
}

/* Length Unit Text Style */
.length-unit-text {
    font-size: 14px;
    font-weight: 500;
    color: #374151;
    background: #f3f4f6;
    padding: 10px 14px;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
    display: inline-block;
    min-width: 70px;
    text-align: center;
}

/* Quantity Section */
.quantity-section {
    margin-bottom: 32px;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.quantity-section .option-label {
    margin: 0;
}

.quantity-input {
    width: 75px;
    max-width: 75px;
    text-align: center;
}

/* Action Buttons */
.action-buttons {
    display: flex;
    gap: 20px;
    justify-content: flex-start;
    flex-wrap: wrap;
    margin-top: 8px;
}

.hb-secondary-btn {
    background: #FFFFFF !important;
    color: #000000 !important;
    border: 1px solid #e5e7eb;
    padding: 14px 28px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
    width: auto;
    min-width: 180px;
    max-width: 200px;
    flex: 1;
}

.hb-secondary-btn:hover {
    background: #000000 !important;
    color: #FFFFFF !important;
    transform: translateY(-1px);
}

/* Animation */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================ */
/* MEDIA QUERIES - All responsive styles below */
/* ============================================ */

/* Tablet (992px and below) */
@media (max-width: 992px) {
    .hb-cards-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 25px;
    }
}

/* Mobile (768px and below) */
@media (max-width: 768px) {
    .hb-container {
        padding: 0 15px;
    }
    
    .hb-main-title {
        font-size: 28px;
        margin-bottom: 30px;
    }
    
    .hb-cards-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .hb-card-header {
        padding: 16px 20px 0 20px;
        flex-wrap: wrap;
    }
    
    .hb-card-title {
        font-size: 20px;
    }
    
    .hb-card-header-image {
        order: -1;
        width: 100%;
        justify-content: center;
        margin-bottom: 10px;
    }
    
    .hb-card-body {
        padding: 12px 20px 20px 20px;
    }
    
    .hb-end-image {
        max-width: 50px;
        max-height: 50px;
    }
    
    .hb-body-image {
        max-width: 70px;
        max-height: 50px;
    }
    
    /* Hose Options Section */
    .options-grid {
        flex-direction: column;
        align-items: stretch;
        gap: 16px;
    }
    
    .option-card {
        width: 100%;
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .option-label {
        white-space: normal;
    }
    
    .option-card .hb-input {
        width: 100%;
        flex-shrink: 1;
    }
    
    .more-info-link {
        white-space: normal;
        margin-left: 0;
    }
    
    .checkbox-card {
        justify-content: flex-start;
        width: 100%;
    }
    
    .checkbox-label {
        white-space: normal;
    }
    
    .info-link {
        text-align: left;
        margin-top: 12px;
    }
    
    /* Length Section */
    .length-inputs {
        flex-direction: column;
        align-items: stretch;
        gap: 16px;
    }
    
    .length-value {
        width: 100%;
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }
    
    .hb-range {
        width: 100%;
    }
    
    .length-input-group {
        width: 100%;
        justify-content: space-between;
    }
    
    .length-value .hb-input {
        flex: 1;
        width: auto;
    }
    
    .length-options {
        width: 100%;
        justify-content: flex-start;
        flex-wrap: wrap;
        gap: 16px;
    }
    
    /* Quantity Section */
    .quantity-section {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    
    .quantity-input {
        width: 100%;
        max-width: 100%;
    }
    
    /* Action Buttons */
    .action-buttons {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }
    
    .hb-add-to-cart-btn,
    .hb-secondary-btn {
        width: 100%;
        max-width: 100%;
        min-width: auto;
    }
    
    /* Input font size for mobile (prevents zoom) */
    .hb-input,
    .hb-select,
    .hb-textarea {
        font-size: 16px;
    }
}

/* Small Mobile (480px and below) */
@media (max-width: 480px) {
    .hose-options-section {
        max-width: 100%;
        padding: 20px 16px;
        margin-top: 25px;
    }
    
    .section-title {
        font-size: 20px;
    }
    
    .option-label {
        font-size: 14px;
    }
    
    .length-section {
        padding: 16px;
    }
    
    .length-input-group {
        flex-direction: column;
        gap: 10px;
    }
    
    .length-value .hb-input {
        width: 100%;
    }
    
    .length-unit-text {
        width: 100%;
        text-align: center;
    }
    
    .length-options {
        gap: 12px;
    }
    
    .length-options .checkbox-label {
        white-space: normal;
    }
}

/* Error Message Styling - Fix Icon and Text Alignment */
.woocommerce-error {
    background: #fef2f2 !important;
    border-left: 4px solid #dc2626 !important;
    color: #991b1b !important;
    padding: 12px 20px !important;
    margin-bottom: 20px !important;
    list-style: none !important;
    border-radius: 8px !important;
}

.woocommerce-error strong {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 600;
}

.woocommerce-error br {
    display: none;
}

/* Fix for error message list items */
.woocommerce-error li {
    margin: 0 !important;
    padding: 0 !important;
    list-style: none !important;
    font-size: 14px;
    line-height: 1.5;
    display: block;
}

/* Remove any default WooCommerce error styling that causes issues */
.woocommerce-error::before,
.woocommerce-error .woocommerce-error::before {
    display: none !important;
    content: none !important;
}

.woocommerce-order {
    margin-top: 50px;
}