/* Smiley Tienda Catálogo v1.4 — Martina Gourmet */

:root {
    --smc-red:      #ff0000;
    --smc-green:    #33cc33;
    --smc-dark:     #1a202c;
    --smc-gray:     #4a5568;
    --smc-olive:    #f5f7f0;
    --smc-border:   #e2e8f0;
    --smc-border-olive: #dde5d0;
}

/* ============================================================
   CONTENEDOR PRINCIPAL
   ============================================================ */
.smiley-catalogo {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 0.75rem;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* ============================================================
   LAYOUT
   ============================================================ */
.smc-layout {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 2rem;
    align-items: start;
}

/* ============================================================
   SIDEBAR
   ============================================================ */
.smc-sidebar {
    background: var(--smc-olive);
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.05);
    border: 1.5px solid var(--smc-border-olive);
    position: sticky;
    top: 20px;
}

.smc-buscador { margin-bottom: 1.5rem; }

.smc-input-buscar {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1.5px solid var(--smc-border-olive);
    border-radius: 8px;
    font-size: 0.9375rem;
    background: white;
    transition: border-color 0.3s ease;
    box-sizing: border-box;
}

.smc-input-buscar:focus {
    outline: none;
    border-color: var(--smc-green);
    box-shadow: 0 0 0 3px rgba(51,204,51,0.1);
}

.smc-sidebar-titulo {
    font-size: 0.8125rem;
    font-weight: 700;
    color: var(--smc-gray);
    margin: 0 0 1rem 0;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    padding-bottom: 0.75rem;
    border-bottom: 1.5px solid var(--smc-border-olive);
}

.smc-categorias-lista {
    list-style: none;
    padding: 0;
    margin: 0;
}

.smc-categorias-lista li { margin-bottom: 0.375rem; }

.smc-cat-label {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    padding: 0.5rem 0.75rem;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s ease;
    font-size: 0.9rem;
}

.smc-cat-label:hover { background: rgba(51,204,51,0.08); }

.smc-cat-label input[type="radio"] {
    accent-color: var(--smc-green);
    width: 15px;
    height: 15px;
    flex-shrink: 0;
}

.smc-cat-label input[type="radio"]:checked + .smc-cat-nombre {
    color: var(--smc-green);
    font-weight: 700;
}

.smc-cat-nombre { flex: 1; color: var(--smc-dark); font-weight: 500; }

.smc-cat-count {
    background: white;
    color: var(--smc-gray);
    font-size: 0.7rem;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 999px;
    border: 1px solid var(--smc-border-olive);
}

/* ============================================================
   MAIN
   ============================================================ */
.smc-main { min-width: 0; }

.smc-resultados-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.25rem;
    padding-bottom: 0.875rem;
    border-bottom: 1.5px solid var(--smc-border-olive);
}

.smc-total-productos {
    font-size: 0.875rem;
    color: var(--smc-gray);
    font-weight: 600;
}

/* Grid */
.smc-grid { display: grid; gap: 1.25rem; }
.smc-grid-2 { grid-template-columns: repeat(2, 1fr); }
.smc-grid-3 { grid-template-columns: repeat(3, 1fr); }
.smc-grid-4 { grid-template-columns: repeat(4, 1fr); }

/* ============================================================
   CARD PRODUCTO
   ============================================================ */
.smc-producto-card {
    background: white;
    border-radius: 16px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    border: 1.5px solid var(--smc-border-olive);
    overflow: hidden;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
}

.smc-producto-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 32px rgba(0,0,0,0.11);
    border-color: var(--smc-green);
}

.smc-producto-imagen-wrap {
    position: relative;
    display: block;
    overflow: hidden;
    background: var(--smc-olive);
    aspect-ratio: 1;
    cursor: pointer;
}

.smc-producto-imagen {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 12px;
    transition: transform 0.4s ease;
    box-sizing: border-box;
}

.smc-producto-card:hover .smc-producto-imagen {
    transform: scale(1.06);
}

.smc-badge-agotado {
    position: absolute;
    top: 10px;
    right: 10px;
    background: var(--smc-gray);
    color: white;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 999px;
    z-index: 2;
}

/* Info */
.smc-producto-info {
    padding: 0.875rem 1rem 1rem;
    display: flex;
    flex-direction: column;
    flex: 1;
    gap: 0.4rem;
    background: white;
}

.smc-producto-nombre {
    font-size: 0.9rem;
    font-weight: 700;
    margin: 0;
    line-height: 1.3;
}

.smc-producto-nombre a {
    color: var(--smc-dark);
    text-decoration: none;
    transition: color 0.2s ease;
}

.smc-producto-nombre a:hover { color: var(--smc-green); }

.smc-producto-desc {
    font-size: 0.78rem;
    color: var(--smc-gray);
    margin: 0;
    line-height: 1.45;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.smc-producto-precio {
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--smc-green);
    margin-top: auto;
    padding-top: 0.25rem;
}

.smc-producto-precio .woocommerce-Price-amount { color: var(--smc-green); }

.smc-stock { font-size: 0.78rem; font-weight: 600; }
.smc-stock-ok      { color: var(--smc-green); }
.smc-stock-agotado { color: var(--smc-gray); }

.smc-btn-comprar {
    display: block;
    text-align: center;
    padding: 0.65rem 1rem;
    background: var(--smc-red);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.3s ease;
    margin-top: 0.5rem;
    letter-spacing: 0.3px;
}

.smc-btn-comprar:hover {
    background: var(--smc-green);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(51,204,51,0.3);
    color: white;
}

/* ============================================================
   LOADING
   ============================================================ */
.smc-loading {
    text-align: center;
    padding: 3rem;
    color: var(--smc-gray);
    font-size: 1rem;
}

.smc-spinner {
    display: inline-block;
    width: 30px;
    height: 30px;
    border: 3px solid var(--smc-border);
    border-top-color: var(--smc-green);
    border-radius: 50%;
    animation: smc-spin 0.8s linear infinite;
    margin-bottom: 1rem;
}

@keyframes smc-spin { to { transform: rotate(360deg); } }

/* ============================================================
   SIN RESULTADOS
   ============================================================ */
.smc-no-resultados {
    grid-column: 1 / -1;
    text-align: center;
    padding: 3rem;
    color: var(--smc-gray);
}

/* ============================================================
   PAGINACIÓN
   ============================================================ */
.smc-paginacion {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1.5px solid var(--smc-border-olive);
}

.smc-btn-prev,
.smc-btn-next {
    padding: 0.5rem 1.125rem;
    background: white;
    border: 1.5px solid var(--smc-border-olive);
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s ease;
    color: var(--smc-dark);
}

.smc-btn-prev:hover:not(:disabled),
.smc-btn-next:hover:not(:disabled) {
    border-color: var(--smc-green);
    color: var(--smc-green);
}

.smc-btn-prev:disabled,
.smc-btn-next:disabled { opacity: 0.35; cursor: not-allowed; }

.smc-pagina-info {
    font-size: 0.875rem;
    color: var(--smc-gray);
    font-weight: 600;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1024px) {
    .smc-layout { grid-template-columns: 200px 1fr; gap: 1.5rem; }
    .smc-grid-4 { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 768px) {
    .smiley-catalogo { padding: 1rem 0.5rem; }
    .smc-layout { grid-template-columns: 1fr; }
    .smc-sidebar { position: static; }
    .smc-grid-3,
    .smc-grid-4 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 480px) {
    .smc-grid-2,
    .smc-grid-3,
    .smc-grid-4 { grid-template-columns: repeat(2, 1fr); }
    .smc-producto-info { padding: 0.75rem; }
}
/* ============================================================
   TÍTULO TIENDA
   ============================================================ */
.smc-tienda-titulo {
    text-align: center;
    font-size: 1.75rem;
    font-weight: 800;
    color: #1a202c;
    margin-bottom: 0.5rem;
}

/* ============================================================
   PÁGINA DE PRODUCTO — Martina Gourmet
   ============================================================ */

/* Fondo verde oliva */
.single-product .site-main {
    background: #f5f7f0;
}

/* Imagen principal */
.single-product .ct-media-container {
    background: #f5f7f0;
    border-radius: 16px;
    max-height: 480px;
}

.single-product .ct-media-container img {
    object-fit: contain !important;
    max-height: 480px;
    padding: 1.5rem;
}

/* Panel derecho */
.single-product .entry-summary {
    background: white;
    border-radius: 16px;
    padding: 2rem !important;
    border: 1.5px solid #dde5d0;
}

/* Precio */
.single-product .woocommerce-Price-amount {
    color: #33cc33 !important;
    font-size: 1.75rem !important;
    font-weight: 800 !important;
}

/* Botón Lo quiero */
.single-product .single_add_to_cart_button {
    background: #ff0000 !important;
    border-color: #ff0000 !important;
    border-radius: 8px !important;
    font-weight: 700 !important;
    transition: all 0.3s ease !important;
}

.single-product .single_add_to_cart_button:hover {
    background: #33cc33 !important;
    border-color: #33cc33 !important;
}

/* Pestañas */
.single-product .woocommerce-tabs ul.tabs li.active a {
    color: #33cc33 !important;
    border-bottom: 2px solid #33cc33 !important;
}

/* Productos relacionados */
.related.products h2 {
    color: #1a202c;
    font-size: 1.25rem;
    font-weight: 700;
    border-bottom: 1.5px solid #dde5d0;
    padding-bottom: 0.75rem;
    margin-bottom: 1.5rem;
}

.related.products .ct-media-container {
    background: #f5f7f0;
    border-radius: 12px;
}

.related.products .ct-media-container img {
    object-fit: contain !important;
    padding: 1rem;
}

.related.products .button {
    background: #ff0000 !important;
    color: white !important;
    border-radius: 8px !important;
    font-weight: 700 !important;
    border: none !important;
    transition: all 0.3s ease !important;
}

.related.products .button:hover {
    background: #33cc33 !important;
    color: white !important;
}

/* ============================================================
   PÁGINA DE PRODUCTO — Martina Gourmet
   ============================================================ */
.single-product .site-main {
    background: #f5f7f0;
}

.single-product .ct-media-container {
    background: #f5f7f0;
    border-radius: 16px;
    max-height: 480px;
}

.single-product .ct-media-container img {
    object-fit: contain !important;
    max-height: 480px;
    padding: 1.5rem;
}

.single-product .entry-summary {
    background: white;
    border-radius: 16px;
    padding: 2rem !important;
    border: 1.5px solid #dde5d0;
}

.single-product .woocommerce-Price-amount {
    color: #33cc33 !important;
    font-size: 1.75rem !important;
    font-weight: 800 !important;
}

.single-product .single_add_to_cart_button {
    background: #ff0000 !important;
    border-color: #ff0000 !important;
    border-radius: 8px !important;
    font-weight: 700 !important;
    letter-spacing: 0.3px !important;
    transition: all 0.3s ease !important;
}

.single-product .single_add_to_cart_button:hover {
    background: #33cc33 !important;
    border-color: #33cc33 !important;
}

.single-product .woocommerce-tabs ul.tabs li.active a {
    color: #33cc33 !important;
    border-bottom: 2px solid #33cc33 !important;
}

.related.products h2 {
    color: #1a202c;
    font-size: 1.25rem;
    font-weight: 700;
    border-bottom: 1.5px solid #dde5d0;
    padding-bottom: 0.75rem;
    margin-bottom: 1.5rem;
}

.related.products .ct-media-container {
    background: #f5f7f0;
    border-radius: 12px;
}

.related.products .ct-media-container img {
    object-fit: contain !important;
    padding: 1rem;
}

.related.products .button {
    background: #ff0000 !important;
    color: white !important;
    border-radius: 8px !important;
    font-weight: 700 !important;
    border: none !important;
    transition: all 0.3s ease !important;
}

.related.products .button:hover {
    background: #33cc33 !important;
    color: white !important;
}

.ct-cart-content,
.ct-cart-content a,
[data-id="cart"] a {
    color: #ffffff !important;
}

[data-id="cart"] a:hover {
    color: #33cc33 !important;
}
