/*
Theme Name: TuMotoCar Child
Theme URI: https://tumotocar.com
Description: Child theme profesional para ecommerce LED + Repuestos
Author: TuMotoCar
Author URI: https://tumotocar.com
Template: oceanwp
Version: 1.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
*/

/* ============================================================================
   VARIABLES Y COLORES GLOBALES
   ========================================================================== */

:root {
    --color-primary: #1a3a52;      /* Azul oscuro */
    --color-secondary: #FDB913;    /* Amarillo */
    --color-text: #333333;         /* Texto oscuro */
    --color-light: #f5f5f5;        /* Fondo claro */
    --color-border: #e0e0e0;       /* Bordes */
    --color-success: #4caf50;      /* Verde */
    --color-danger: #f44336;       /* Rojo */
}

/* ============================================================================
   TIPOGRAFÍA BASE
   ========================================================================== */

* {
    box-sizing: border-box;
}

body {
    font-family: 'Open Sans', sans-serif;
    color: var(--color-text);
    line-height: 1.6;
    font-size: 14px;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    line-height: 1.2;
    margin-top: 0;
    color: var(--color-primary);
}

h1 { font-size: 48px; }
h2 { font-size: 36px; }
h3 { font-size: 28px; }
h4 { font-size: 22px; }
h5 { font-size: 18px; }
h6 { font-size: 16px; }

p {
    margin: 15px 0;
}

a {
    color: var(--color-secondary);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: #e8a500;
}

/* ============================================================================
   BOTONES GENERALES
   ========================================================================== */

.button,
button,
input[type="button"],
input[type="submit"],
a.btn {
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    padding: 12px 24px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.button:hover,
button:hover,
a.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

/* Botón Principal (Amarillo) */
.button.primary,
.btn-primary,
.woocommerce .button.alt {
    background: var(--color-secondary);
    color: #000;
    font-weight: bold;
}

.button.primary:hover,
.btn-primary:hover,
.woocommerce .button.alt:hover {
    background: #e8a500;
}

/* Botón Secundario (Azul) */
.button.secondary,
.btn-secondary {
    background: var(--color-primary);
    color: white;
}

.button.secondary:hover,
.btn-secondary:hover {
    background: #0f1f2e;
}

/* ============================================================================
   HEADER Y NAVEGACIÓN
   ========================================================================== */

.site-header {
    background: white;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    padding: 15px 0;
}

.logo-container img {
    max-height: 60px;
    width: auto;
}

.main-nav a {
    color: var(--color-primary);
    font-weight: 600;
    padding: 10px 15px;
    display: inline-block;
}

.main-nav a:hover {
    color: var(--color-secondary);
    border-bottom: 2px solid var(--color-secondary);
}

/* ============================================================================
   CARRITO Y CHECKOUT
   ========================================================================== */

.cart-count {
    background: var(--color-secondary);
    color: black;
    padding: 5px 10px;
    border-radius: 50%;
    font-weight: bold;
    font-size: 12px;
    margin-left: 5px;
}

/* Carrito Flotante */
#floating-cart {
    box-shadow: -5px 0 20px rgba(0,0,0,0.15);
}

#floating-cart-items {
    max-height: 400px;
    overflow-y: auto;
}

.floating-cart-item {
    display: flex;
    gap: 10px;
    padding: 15px;
    border-bottom: 1px solid var(--color-border);
}

.floating-cart-item img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 4px;
}

/* ============================================================================
   PÁGINA DE INICIO (HOMEPAGE)
   ========================================================================== */

/* Hero Banner */
.hero-banner {
    background: linear-gradient(rgba(0,0,0,0.4), rgba(0,0,0,0.4)), center / cover no-repeat;
    min-height: 500px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
}

.hero-content h1 {
    color: white;
    font-size: 48px;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.hero-content .subtitle {
    color: var(--color-secondary);
    font-size: 20px;
    margin-bottom: 30px;
}

.hero-content .btn {
    font-size: 18px;
    padding: 15px 40px;
}

/* Sección de Beneficios */
.benefits-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    padding: 50px 20px;
    background: white;
}

.benefit-item {
    text-align: center;
    padding: 20px;
}

.benefit-item .icon {
    font-size: 48px;
    margin-bottom: 15px;
}

.benefit-item h3 {
    color: var(--color-primary);
    margin-bottom: 10px;
}

.benefit-item p {
    font-size: 13px;
    color: #666;
}

/* Grid de Categorías */
.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    padding: 50px 20px;
}

.category-card {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.category-card:hover {
    transform: scale(1.05);
}

.category-card img {
    width: 100%;
    height: 250px;
    object-fit: cover;
}

.category-card-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0,0,0,0.7));
    color: white;
    padding: 20px;
    text-align: center;
}

.category-card-overlay h3 {
    color: white;
    margin: 0;
}

/* ============================================================================
   PÁGINA DE PRODUCTOS
   ========================================================================== */

/* Grid de Productos */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    padding: 30px 0;
}

.product-card {
    background: white;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    overflow: hidden;
    transition: box-shadow 0.3s ease;
}

.product-card:hover {
    box-shadow: 0 5px 20px rgba(0,0,0,0.15);
}

.product-image {
    width: 100%;
    height: 250px;
    background: var(--color-light);
    overflow: hidden;
    position: relative;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.product-card:hover .product-image img {
    transform: scale(1.1);
}

/* Badge de Oferta */
.product-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: var(--color-danger);
    color: white;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: bold;
}

.product-info {
    padding: 15px;
}

.product-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--color-primary);
    margin: 0 0 10px 0;
    min-height: 40px;
}

.product-price {
    font-size: 18px;
    font-weight: bold;
    color: var(--color-secondary);
    margin: 10px 0;
}

.product-rating {
    color: #ffc107;
    font-size: 12px;
    margin-bottom: 10px;
}

.product-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

/* ============================================================================
   PÁGINA INDIVIDUAL DE PRODUCTO
   ========================================================================== */

.single-product {
    padding: 30px 0;
}

.single-product .product-images {
    margin-bottom: 30px;
}

.single-product .product-image-main {
    width: 100%;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    margin-bottom: 15px;
}

.product-thumbnails {
    display: flex;
    gap: 10px;
    overflow-x: auto;
}

.product-thumbnails img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border: 2px solid var(--color-border);
    border-radius: 4px;
    cursor: pointer;
    transition: border-color 0.3s;
}

.product-thumbnails img:hover,
.product-thumbnails img.active {
    border-color: var(--color-secondary);
}

.product-details h1 {
    font-size: 32px;
    margin-bottom: 15px;
}

.product-meta {
    display: flex;
    gap: 20px;
    margin: 20px 0;
    font-size: 14px;
}

.product-price-single {
    font-size: 32px;
    font-weight: bold;
    color: var(--color-secondary);
    margin: 20px 0;
}

.product-specs {
    background: var(--color-light);
    padding: 20px;
    border-radius: 4px;
    margin: 20px 0;
}

.product-specs ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.product-specs li {
    padding: 8px 0;
    border-bottom: 1px solid var(--color-border);
}

.product-specs li:last-child {
    border-bottom: none;
}

.quantity-selector {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 20px 0;
}

.quantity-selector button {
    width: 40px;
    height: 40px;
    border: 1px solid var(--color-border);
    background: white;
    cursor: pointer;
    font-size: 18px;
}

.quantity-selector input {
    width: 50px;
    text-align: center;
    padding: 8px;
    border: 1px solid var(--color-border);
}

/* ============================================================================
   SIDEBAR Y FILTROS
   ========================================================================== */

.sidebar {
    background: white;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid var(--color-border);
}

.filter-widget {
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--color-border);
}

.filter-widget h3 {
    font-size: 16px;
    margin-bottom: 15px;
    color: var(--color-primary);
}

.filter-widget input[type="checkbox"],
.filter-widget input[type="radio"] {
    margin-right: 8px;
}

.filter-widget label {
    display: block;
    padding: 8px 0;
    cursor: pointer;
    transition: color 0.3s;
}

.filter-widget label:hover {
    color: var(--color-secondary);
}

/* ============================================================================
   CARRITO
   ========================================================================== */

.woocommerce-cart-form table {
    width: 100%;
    margin-bottom: 30px;
}

.woocommerce-cart-form th,
.woocommerce-cart-form td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid var(--color-border);
}

.woocommerce-cart-form th {
    background: var(--color-light);
    font-weight: bold;
    color: var(--color-primary);
}

.cart-item-remove {
    color: var(--color-danger);
    cursor: pointer;
    text-decoration: underline;
}

.cart-item-remove:hover {
    color: #c62828;
}

.cart-totals {
    background: var(--color-light);
    padding: 25px;
    border-radius: 8px;
    max-width: 400px;
    margin-left: auto;
}

.cart-totals table {
    width: 100%;
    margin: 0;
}

.cart-totals td {
    padding: 10px 0;
    border: none;
}

.cart-totals .order-total {
    font-size: 24px;
    font-weight: bold;
    color: var(--color-secondary);
    border-top: 2px solid var(--color-secondary);
    padding-top: 15px !important;
}

/* ============================================================================
   CHECKOUT
   ========================================================================== */

.woocommerce-checkout {
    padding: 30px 0;
}

.woocommerce-checkout-form {
    background: white;
    padding: 25px;
    border-radius: 8px;
}

.form-row {
    margin-bottom: 20px;
}

.form-row label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--color-primary);
}

.form-row input,
.form-row select,
.form-row textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--color-border);
    border-radius: 4px;
    font-family: 'Open Sans', sans-serif;
}

.form-row input:focus,
.form-row select:focus,
.form-row textarea:focus {
    outline: none;
    border-color: var(--color-secondary);
    box-shadow: 0 0 5px rgba(253, 185, 19, 0.3);
}

.woocommerce-checkout-review-order {
    background: var(--color-light);
    padding: 25px;
    border-radius: 8px;
}

/* ============================================================================
   FOOTER
   ========================================================================== */

.site-footer {
    background: var(--color-primary);
    color: white;
    padding: 50px 20px 20px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-bottom: 30px;
}

.footer-widget h3 {
    color: var(--color-secondary);
    margin-bottom: 20px;
}

.footer-widget ul {
    list-style: none;
    padding: 0;
}

.footer-widget li {
    margin-bottom: 10px;
}

.footer-widget a {
    color: #ddd;
}

.footer-widget a:hover {
    color: var(--color-secondary);
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255,255,255,0.2);
    color: #bbb;
    font-size: 12px;
}

/* ============================================================================
   BREADCRUMB
   ========================================================================== */

.breadcrumb {
    padding: 20px 0;
    font-size: 12px;
    color: #666;
}

.breadcrumb a {
    color: var(--color-secondary);
    margin: 0 5px;
}

/* ============================================================================
   MENSAJES Y ALERTAS
   ========================================================================== */

.woocommerce-message,
.woocommerce-notice,
.woocommerce-error {
    padding: 15px 20px;
    border-radius: 4px;
    margin-bottom: 20px;
}

.woocommerce-message {
    background: #e8f5e9;
    color: #2e7d32;
    border-left: 4px solid var(--color-success);
}

.woocommerce-error {
    background: #ffebee;
    color: #c62828;
    border-left: 4px solid var(--color-danger);
}

/* ============================================================================
   RESPONSIVE
   ========================================================================== */

@media (max-width: 768px) {
    h1 { font-size: 32px; }
    h2 { font-size: 24px; }
    h3 { font-size: 20px; }
    
    .hero-content h1 {
        font-size: 28px;
    }
    
    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 10px;
    }
    
    .categories-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .footer-content {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    body {
        font-size: 12px;
    }
    
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .benefits-section {
        grid-template-columns: 1fr;
    }
    
    .product-actions {
        grid-template-columns: 1fr;
    }
}
