/* 
 * Sedox Tuning Catalog Frontend Styles 
 * This file uses CSS variables generated from the Avada theme colors.
 */

/* --- General --- */
.stc-discount {
    font-size: 0.8em;
    color: var(--stc-avada-color-7, #1a222a); /* Was green #28a745 */
    font-weight: bold;
}
.stc-bios-download {
    color: var(--stc-avada-color-5, #d10a0a); /* Was WP blue #0073aa */
    text-decoration: none;
}
.stc-bios-download-note {
    color: var(--stc-avada-color-6, #8C8C8C); /* Was #666 */
}
.stc-bios-file-link {
    color: var(--stc-avada-color-5, #d10a0a); /* Was WP blue #0073aa */
}
.stc-file-not-found {
    color: var(--stc-avada-color-5, #d10a0a); /* Was red #dc3232 */
}

/* --- Shortcodes --- */

/* Tuning Shop Shortcode */
.stc-shop-header {
    text-align: center;
    margin-bottom: 40px;
    padding: 40px 20px;
    background: linear-gradient(135deg, var(--stc-avada-color-7, #1a222a) 0%, var(--stc-avada-primary, #000000) 100%);
    color: white;
    border-radius: 12px;
}
.stc-shop-header .shop-title {
    font-size: 32px;
    margin: 0 0 10px 0;
    font-weight: 700;
    text-shadow: none;
    color: #fff;
}
.stc-shop-header .shop-subtitle {
    font-size: 18px;
    margin: 0;
    opacity: 1;
    text-shadow: none;
    color: #fff;
}
.stc-vehicle-selector-section {
    background: var(--stc-avada-color-1, #f8f8f8); /* Was #f8f9fa */
    border: 1px solid var(--stc-avada-color-2, #e0e0e0); /* Was #dee2e6 */
    border-radius: 12px;
    padding: 30px;
    margin: 30px 0;
}
.stc-vehicle-selector-section h3 {
    color: var(--stc-avada-color-7, #1a222a); /* Was WP blue #0073aa */
    font-size: 24px;
    margin: 0 0 20px 0;
    text-align: center;
}
.stc-tuning-products h2 {
    text-align: center;
    color: var(--stc-avada-color-4, #333333); /* Was #333 */
    font-size: 28px;
    margin: 40px 0 20px 0;
}
.stc-products-grid {
    display: grid;
    gap: 30px;
    margin-top: 30px;
}

/* Addon Shop Shortcode */
.stc-addon-shop-header {
    text-align: center;
    margin-bottom: 40px;
    padding: 40px 20px;
    /* Use a consistent gradient with the tuning shop header */
    background: linear-gradient(135deg, var(--stc-avada-color-7, #1a222a) 0%, var(--stc-avada-primary, #000000) 100%);
    color: white;
    border-radius: 12px;
}
.stc-addon-shop-header .shop-title {
    font-size: 32px;
    margin: 0 0 10px 0;
    font-weight: 700;
    text-shadow: none;
    color: #fff;
}
.stc-addon-shop-header .shop-subtitle {
    font-size: 18px;
    margin: 0 0 20px 0;
    opacity: 1;
    text-shadow: none;
    color: #fff;
}
.stc-addon-shop-header .discount-highlight {
    background: rgba(255, 255, 255, 0.15);
    padding: 15px 20px;
    border-radius: 25px;
    font-size: 16px;
    font-weight: bold;
    display: inline-block;
}
.stc-addon-products h2 {
    text-align: center;
    color: var(--stc-avada-color-4, #333333); /* Was #333 */
    font-size: 28px;
    margin: 40px 0 20px 0;
}
.stc-addon-grid {
    display: grid;
    gap: 25px;
    margin-top: 30px;
}

/* Responsive styles for shortcodes */
@media (max-width: 992px) {
    .stc-addon-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}
@media (max-width: 768px) {
    .stc-products-grid,
    .stc-addon-grid {
        grid-template-columns: 1fr !important;
    }
    .stc-shop-header .shop-title,
    .stc-addon-shop-header .shop-title {
        font-size: 24px;
    }
}

/* --- Single Product Page --- */

/* Wrapper for all product options on the tuning page - remove background and padding */
.stc-options-wrapper {
    padding: 0;
    margin-bottom: 20px;
}

/* --- Unifying Form Styles (Title on top of field) --- */

/* 1. For the standard WooCommerce Variations dropdown */
.stc-options-wrapper .variations .label,
.stc-options-wrapper .variations .value {
    display: block;
    width: 100%;
    padding: 0;
}
.stc-options-wrapper .variations .label {
    margin-bottom: 8px;
    font-weight: bold;
}

/* 2. For our custom fields (ECU, BIOS) - remove old table styles */
.stc-options-wrapper table.variations {
    background: transparent;
    border: none;
    padding: 0;
    margin-bottom: 15px; /* Space between generation and the next fields */
}

.stc-service-requirements-as-table {
    margin-top: 0;
    border-top: none;
    padding-top: 0;
}
.stc-service-requirements-as-table .stc-table-row {
    display: flex;
    flex-direction: column;
    margin-bottom: 15px;
}
.stc-service-requirements-as-table .stc-table-cell-label,
.stc-service-requirements-as-table .stc-table-cell-input {
    padding: 0;
    display: block;
    width: 100%;
}
.stc-service-requirements-as-table .stc-table-cell-label {
    margin-bottom: 8px;
    font-weight: bold;
}

/* Make form elements like textarea and file input full-width */
.stc-options-wrapper textarea,
.stc-options-wrapper input[type="file"] {
    width: 100%;
}

/* --- Button Color Consistency --- */

/* Hide the dynamic variation price that appears on selection */
.single_variation_wrap .woocommerce-variation-price {
    display: none !important;
}

/* Promotional notice on addon pages */
.stc-addon-discount-notice {
    background-color: var(--stc-avada-color-1, #f8f8f8); /* Was green #f0fff2 */
    border: 1px solid var(--stc-avada-color-5, #d10a0a); /* Was green #28a745 */
    color: var(--stc-avada-color-8, #2b2b2b); /* Was green #155724 */
    padding: 15px;
    margin: 20px 0;
    border-radius: 6px;
    text-align: center;
    font-size: 1em;
    font-weight: bold;
}

/* Style for the new price container that we inject via JS */
.stc-final-price-wrapper {
    clear: both;
    margin-bottom: 20px;
    padding-top: 10px;
}
.stc-final-price-wrapper .price {
    font-size: 2em;
    font-weight: bold;
    color: var(--stc-avada-color-5, #d10a0a); /* Was green / avada var */
    display: block;
    line-height: 1;
}

/* --- Product Card Styles (for shortcodes) --- */
.stc-product-card {
    background-color: #fff;
    border: 1px solid var(--stc-avada-color-2, #e0e0e0); /* Was #e0e0e0 */
    border-radius: 8px;
    overflow: hidden;
    text-align: center;
    transition: box-shadow 0.3s ease, transform 0.3s ease;
    display: flex;
    flex-direction: column;
}
.stc-product-card:hover {
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
    transform: translateY(-5px);
}
.stc-card-link-wrapper {
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}
.stc-card-image {
    background-color: var(--stc-avada-color-1, #f8f8f8); /* Was #f5f5f5 */
    padding: 20px;
}
.stc-card-image img {
    max-width: 100%;
    height: auto;
    object-fit: cover;
}
.stc-card-content {
    padding: 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}
.stc-card-title {
    font-size: 1.2em;
    font-weight: bold;
    margin: 0 0 10px 0;
    color: var(--stc-avada-color-4, #333333); /* Was inherit */
}
.stc-card-price {
    margin-top: auto;
    color: var(--stc-avada-color-6, #8C8C8C); /* Was inherit */
}
.stc-card-price .price-prefix {
    font-size: 0.8em;
    opacity: 0.8;
}
.stc-card-price .woocommerce-Price-amount {
    font-weight: bold;
    color: var(--stc-avada-color-8, #2b2b2b);
}
.stc-card-footer {
    border-top: 1px solid var(--stc-avada-color-2, #e0e0e0); /* Was #e0e0e0 */
}
.stc-card-button {
    display: block;
    padding: 15px;
    text-decoration: none;
    font-weight: bold;
    transition: background-color 0.3s ease;
    background-color: var(--stc-avada-color-1, #f8f8f8); /* Was #f5f5f5 */
    color: var(--stc-avada-color-4, #333333); /* Was #333 */
}
.stc-card-button:hover {
    background-color: var(--stc-avada-color-2, #e0e0e0); /* Was #e9e9e9 */
}
/* Specific card styles */
.stc-tuning-card .stc-card-button {
    background-color: var(--stc-avada-color-7, #1a222a); /* Was #0073aa */
    color: #fff;
}
.stc-tuning-card .stc-card-button:hover {
    background-color: var(--stc-avada-primary, #000000); /* Was #005a87 */
}
.stc-addon-card .stc-card-price .woocommerce-Price-amount {
    color: var(--stc-avada-color-7, #1a222a); /* Was #28a745 */
} 

/* --- Styles moved from inline to stylesheet --- */

/* From stc_product_details */
.stc-product-details {
    background: var(--stc-avada-color-1, #f9f9f9);
    border: 1px solid var(--stc-avada-color-2, #e1e1e1);
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
}
.stc-service-features, .stc-requirements ul, .stc-addon-benefits ul {
    list-style: none;
    padding: 0;
    margin: 0;
}
.stc-service-features li, .stc-requirements ul li, .stc-addon-benefits ul li {
    padding: 5px 0;
}
.feature-icon {
    color: var(--stc-avada-color-5, #d10a0a); /* Was green #28a745 */
    font-weight: bold;
    margin-right: 8px;
}
.stc-requirements, .stc-addon-benefits {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid var(--stc-avada-color-2, #ddd);
}
.stc-requirements h4, .stc-addon-benefits h4 {
    color: var(--stc-avada-color-4, #333);
    margin-bottom: 10px;
}

/* From stc_compatibility_info */
.stc-compatibility-info {
    background: #fff;
    border: 1px solid var(--stc-avada-color-5, #d10a0a);
    border-radius: 8px;
    padding: 15px;
    margin: 15px 0;
}
.compatibility-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}
.compat-badge {
    background: var(--stc-avada-color-7, #1a222a); /* Was #0073aa */
    color: white;
    padding: 4px 12px;
    border-radius: 15px;
    font-size: 12px;
    font-weight: bold;
}

/* From tuning_process_tab_content */
.process-steps {
    display: flex;
    flex-direction: column;
    gap: 20px;
}
.step {
    display: flex;
    align-items: flex-start;
    gap: 15px;
}
.step-number {
    background: var(--stc-avada-color-7, #1a222a); /* Was #0073aa */
    color: white;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    flex-shrink: 0;
}
.step-content h4 {
    margin: 0 0 5px 0;
    color: var(--stc-avada-color-4, #333);
}
.step-content p {
    margin: 0;
    color: var(--stc-avada-color-6, #8C8C8C); /* was #666 */
}

/* From add_service_badge */
.stc-service-badge {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: var(--stc-avada-color-5, #d10a0a); /* Was blue/green */
    color: white;
    position: absolute;
    top: 15px;
    left: 15px;
    z-index: 10;
} 