/**
 * Estilos del Frontend para Syscom Plugin
 */

/* Mensajes */
.syscom-error,
.syscom-info {
    padding: 15px;
    margin: 20px 0;
    border-radius: 4px;
    font-size: 14px;
}

.syscom-error {
    background: #fef2f2;
    border-left: 4px solid #dc2626;
    color: #991b1b;
}

.syscom-info {
    background: #eff6ff;
    border-left: 4px solid #3b82f6;
    color: #1e40af;
}

/* Grid de Productos */
.syscom-products-grid {
    display: grid;
    gap: 20px;
    margin: 20px 0;
}

.syscom-products-grid.syscom-columns-2 {
    grid-template-columns: repeat(2, 1fr);
}

.syscom-products-grid.syscom-columns-3 {
    grid-template-columns: repeat(3, 1fr);
}

.syscom-products-grid.syscom-columns-4 {
    grid-template-columns: repeat(4, 1fr);
}

@media (max-width: 768px) {
    .syscom-products-grid {
        grid-template-columns: 1fr !important;
    }
}

/* Tarjeta de Producto */
.syscom-product-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.syscom-product-card:hover {
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    transform: translateY(-5px);
}

.syscom-product-image {
    width: 100%;
    height: 200px;
    overflow: hidden;
    background: #f9fafb;
    display: flex;
    align-items: center;
    justify-content: center;
}

.syscom-product-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 10px;
}

.syscom-product-info {
    padding: 15px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.syscom-product-title {
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 10px 0;
    color: #111827;
    line-height: 1.4;
    min-height: 44px;
}

.syscom-product-sku {
    font-size: 12px;
    color: #6b7280;
    margin-bottom: 8px;
}

.syscom-product-stock {
    font-size: 13px;
    margin-bottom: 8px;
    padding: 4px 8px;
    border-radius: 4px;
    display: inline-block;
}

.syscom-product-stock.in-stock {
    background: #d1fae5;
    color: #065f46;
}

.syscom-product-stock.out-of-stock {
    background: #fee2e2;
    color: #991b1b;
}

.syscom-product-price {
    font-size: 20px;
    font-weight: 700;
    color: #059669;
    margin: 10px 0;
}

.syscom-product-link {
    display: inline-block;
    padding: 10px 20px;
    background: #3b82f6;
    color: #fff !important;
    text-decoration: none;
    border-radius: 6px;
    text-align: center;
    transition: background 0.3s ease;
    margin-top: auto;
}

.syscom-product-link:hover {
    background: #2563eb;
}

/* Detalle de Producto */
.syscom-product-detail {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 30px;
    margin: 20px 0;
}

.syscom-product-detail-header {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-bottom: 30px;
}

@media (max-width: 768px) {
    .syscom-product-detail-header {
        grid-template-columns: 1fr;
    }
}

.syscom-product-detail-image {
    width: 100%;
    background: #f9fafb;
    border-radius: 8px;
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.syscom-product-detail-image img {
    max-width: 100%;
    height: auto;
}

.syscom-product-detail-info h1 {
    font-size: 28px;
    margin: 0 0 20px 0;
    color: #111827;
}

.syscom-product-meta {
    margin-bottom: 20px;
}

.syscom-meta-item {
    padding: 10px 0;
    border-bottom: 1px solid #e5e7eb;
    font-size: 14px;
}

.syscom-meta-item strong {
    color: #374151;
    margin-right: 10px;
}

.syscom-product-detail-price {
    font-size: 32px;
    font-weight: 700;
    color: #059669;
    margin: 20px 0;
}

.syscom-product-description {
    margin-top: 30px;
    padding-top: 30px;
    border-top: 1px solid #e5e7eb;
}

.syscom-product-description h3 {
    font-size: 20px;
    margin-bottom: 15px;
    color: #111827;
}

/* Botones */
.syscom-button {
    display: inline-block;
    padding: 12px 24px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.syscom-button-primary {
    background: #3b82f6;
    color: #fff !important;
}

.syscom-button-primary:hover {
    background: #2563eb;
}

/* Grid de Categorías */
.syscom-categories-grid {
    display: grid;
    gap: 15px;
    margin: 20px 0;
}

.syscom-categories-grid.syscom-columns-3 {
    grid-template-columns: repeat(3, 1fr);
}

.syscom-categories-grid.syscom-columns-4 {
    grid-template-columns: repeat(4, 1fr);
}

@media (max-width: 768px) {
    .syscom-categories-grid {
        grid-template-columns: 1fr !important;
    }
}

.syscom-category-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    transition: all 0.3s ease;
}

.syscom-category-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-3px);
}

.syscom-category-card h3 {
    font-size: 18px;
    margin: 0 0 15px 0;
    color: #111827;
}

.syscom-category-link {
    color: #3b82f6 !important;
    text-decoration: none;
    font-weight: 600;
}

.syscom-category-link:hover {
    color: #2563eb !important;
}

/* Grid de Marcas */
.syscom-brands-grid {
    display: grid;
    gap: 15px;
    margin: 20px 0;
}

.syscom-brands-grid.syscom-columns-5 {
    grid-template-columns: repeat(5, 1fr);
}

@media (max-width: 768px) {
    .syscom-brands-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

.syscom-brand-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 15px;
    text-align: center;
    transition: all 0.3s ease;
}

.syscom-brand-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.syscom-brand-name {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 10px;
    color: #111827;
}

.syscom-brand-link {
    font-size: 12px;
    color: #3b82f6 !important;
    text-decoration: none;
}

.syscom-brand-link:hover {
    color: #2563eb !important;
}

/* Formulario de Búsqueda */
.syscom-search-form {
    margin: 20px 0;
}

.syscom-search-input-wrapper {
    display: flex;
    gap: 10px;
    max-width: 600px;
}

.syscom-search-input {
    flex: 1;
    padding: 12px 20px;
    border: 2px solid #e5e7eb;
    border-radius: 6px;
    font-size: 16px;
    transition: border-color 0.3s ease;
}

.syscom-search-input:focus {
    outline: none;
    border-color: #3b82f6;
}

.syscom-search-button {
    padding: 12px 24px;
    background: #3b82f6;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s ease;
}

.syscom-search-button:hover {
    background: #2563eb;
}

.syscom-search-results {
    margin-top: 30px;
}
