/* Main Styles */
body {
    background: #f5f5f5;
    padding-top: 20px;
    padding-bottom: 20px;
}

.card {
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    border: none;
    margin-bottom: 20px;
}

.table-card {
    transition: transform 0.2s, box-shadow 0.2s;
}

.table-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.familias {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.fam {
    background: #f3f3f3;
    padding: 6px 8px;
    border-radius: 4px;
}

.controls {
    display: flex;
    gap: 8px;
    align-items: center;
    margin: 12px 0;
    flex-wrap: wrap;
}

textarea.sql-output {
    width: 100%;
    height: 240px;
    font-family: monospace;
    margin-top: 8px;
}

.btn-custom-action {
    background: #17a2b8;
    color: white;
}

.btn-custom-action:hover {
    background: #138496;
    color: white;
}

.product-info {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

.product-info h2 {
    color: #333;
    margin-bottom: 10px;
}

.product-info .info-text {
    color: #666;
    font-size: 14px;
}

.message {
    padding: 12px 20px;
    border-radius: 6px;
    margin-bottom: 20px;
}

.message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.status-info.pendiente {
    background: #fff3cd;
    color: #856404;
}

.status-info.procesado {
    background: #d4edda;
    color: #155724;
}

.status-info.error {
    background: #f8d7da;
    color: #721c24;
}

.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
    text-decoration: none;
    display: inline-block;
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.btn:active {
    transform: translateY(0);
}

.btn-back {
    background: #6c757d;
    color: white;
}

.btn-back:hover {
    background: #5a6268;
}

.btn-next {
    background: #6c757d;
    color: white;
}

.btn-next:hover {
    background: #5a6268;
}

.btn:disabled {
    background: #e0e0e0;
    color: #999;
    cursor: not-allowed;
    transform: none;
}

.btn-status {
    padding: 12px 24px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    border: 2px solid;
}

.btn-status.active {
    opacity: 1;
    transform: scale(1.05);
}

.btn-status.inactive {
    opacity: 0.5;
    cursor: pointer;
}

.btn-status.inactive:hover {
    opacity: 0.7;
}

.btn-approved {
    background: #28a745;
    color: white;
    border-color: #28a745;
}

.btn-approved.active {
    background: #218838;
    box-shadow: 0 0 0 3px rgba(40, 167, 69, 0.25);
}

.btn-pending {
    background: #ff9800;
    color: white;
    border-color: #ff9800;
}

.btn-pending.active {
    background: #f57c00;
    box-shadow: 0 0 0 3px rgba(255, 152, 0, 0.25);
}

.container.estadoProcesado {
    background-color: #d4edda;
    border: #155724;
}

.container.estadoPendiente {
    background-color: #fff3cd;
    border: #856404;
}

/* Layout de Revisión */
.revision-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-bottom: 30px;
}

.field-pair {
    border-bottom: 1px solid #eee;
    padding-bottom: 15px;
    margin-bottom: 15px;
}

.field-label {
    font-weight: bold;
    display: block;
    margin-bottom: 8px;
    color: #444;
}

.field-inputs {
    display: flex;
    gap: 15px;
    align-items: flex-start;
}

.azeta-side,
.propio-side {
    flex: 1;
}

.azeta-side {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.automation-btns {
    display: flex;
    gap: 5px;
}

.btn-mini {
    padding: 2px 8px;
    font-size: 11px;
    background: #6c757d;
    color: white;
    border-radius: 4px;
    border: none;
    cursor: pointer;
}

.btn-mini:hover {
    background: #5a6268;
}

.azeta-side input,
.azeta-side textarea {
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    color: #495057;
    width: 100%;
    padding: 8px;
    border-radius: 4px;
}

.propio-side input,
.propio-side textarea {
    width: 100%;
    padding: 8px;
    border: 1px solid #ced4da;
    border-radius: 4px;
}

.propio-side textarea,
.azeta-side textarea {
    min-height: 100px;
}

/* Product Preview Section */
.product-preview-section {
    background: #fff;
    border-radius: 8px;
    padding: 25px;
    margin-bottom: 40px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    display: flex;
    gap: 30px;
}

.preview-image-container {
    flex: 0 0 250px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f9f9f9;
    border-radius: 4px;
}

.preview-image-container img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.preview-details {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.preview-title {
    font-size: 26px;
    font-weight: 700;
    color: #2c3e50;
    line-height: 1.2;
}

.preview-author {
    font-size: 16px;
    color: #7f8c8d;
    margin-top: -10px;
}

/* New Metadata Grid */
.preview-metadata-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.metadata-column {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.metadata-item {
    font-size: 13px;
    display: flex;
    flex-direction: column;
}

.metadata-item .label {
    font-weight: 600;
    color: #95a5a6;
    font-size: 11px;
    text-transform: uppercase;
}

.metadata-item .value {
    color: #2c3e50;
    font-weight: 500;
}

/* Prices Row */
.preview-prices-row {
    display: flex;
    gap: 20px;
    margin-top: 10px;
}

.price-card {
    flex: 1;
    padding: 15px;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.price-card.azeta {
    background: #eef2f7;
    border: 1px solid #d1d9e6;
}

.price-card.propio {
    background: #fff4e6;
    border: 1px solid #ffe8cc;
}

.price-card .price-label {
    font-size: 11px;
    font-weight: 700;
    color: #666;
    margin-bottom: 5px;
}

.price-card .price-value {
    font-size: 24px;
    font-weight: 800;
}

.price-card.azeta .price-value {
    color: #445566;
}

.price-card.propio .price-value {
    color: #e67e22;
}

/* Tags and rest */
.preview-tags {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.preview-tags .tag {
    background: #f1f3f5;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    color: #495057;
}

.preview-synopsis {
    font-size: 14px;
    line-height: 1.6;
    color: #444;
    max-height: 120px;
    overflow-y: auto;
    border-top: 1px solid #eee;
    padding-top: 15px;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .product-preview-section {
        flex-direction: column;
        align-items: center;
    }

    .preview-image-container {
        flex: 0 0 auto;
        width: 100%;
        max-width: 300px;
    }
}

@media (max-width: 992px) {
    .revision-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .grid-header:nth-child(2) {
        display: none;
    }

    .preview-metadata-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .field-inputs {
        flex-direction: column;
    }

    .azeta-side,
    .propio-side {
        width: 100%;
    }

    .btn-toolbar {
        flex-direction: column;
        gap: 15px;
    }

    .btn-group-lg {
        width: 100%;
        display: flex;
    }

    .btn-group-lg .btn {
        flex: 1;
    }

    .preview-title {
        font-size: 20px;
    }

    .preview-metadata-grid {
        grid-template-columns: 1fr;
    }

    .preview-prices-row {
        flex-direction: column;
        gap: 10px;
    }

    #gotoForm {
        max-width: 100% !important;
        width: 100%;
    }
}

.dropdown-menu {
    background-color: #212529 !important;
}

.dropdown-item:hover {
    background-color: #212529 !important;
    color: #fff !important;
}

.dropdown-item {
    color: #fff !important;
}

/* Shop Preview (Visualizar) Styles */
.shop-preview-container {
    background: #fff;
    border-radius: 8px;
    padding: 0;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    margin-bottom: 40px;
}

.shop-breadcrumb {
    padding: 15px 30px;
    background: #f8f9fa;
    border-bottom: 1px solid #eee;
    font-size: 13px;
    color: #888;
}

.shop-breadcrumb a {
    color: #007bff;
    text-decoration: none;
}

.shop-breadcrumb span {
    margin: 0 8px;
}

.product-main {
    display: flex;
    padding: 40px;
    gap: 50px;
}

.product-images-col {
    flex: 0 0 45%;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.main-image-wrapper {
    border: 1px solid #f0f0f0;
    border-radius: 8px;
    padding: 20px;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 400px;
}

.main-image-wrapper img {
    max-width: 100%;
    max-height: 500px;
    object-fit: contain;
}

.product-info-col {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.product-brand {
    font-size: 14px;
    text-transform: uppercase;
    color: #999;
    letter-spacing: 1px;
    font-weight: 600;
}

.product-title-shop {
    font-size: 32px;
    font-weight: 700;
    color: #222;
    margin: 0;
    line-height: 1.2;
}

.product-reference {
    font-size: 13px;
    color: #666;
}

.product-price-shop {
    font-size: 36px;
    font-weight: 800;
    color: #007bff;
    margin: 10px 0;
}

.product-short-description {
    font-size: 15px;
    line-height: 1.6;
    color: #555;
    border-top: 1px solid #f0f0f0;
    padding-top: 20px;
}

.product-meta-action {
    background: #fdfdfd;
    border: 1px solid #eee;
    border-radius: 8px;
    padding: 25px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.availability-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
}

.availability-badge.in-stock {
    color: #28a745;
}

.product-tabs-section {
    padding: 0 40px 40px;
}

.shop-tabs {
    border-bottom: 2px solid #f0f0f0;
    display: flex;
    gap: 30px;
    margin-bottom: 25px;
}

.shop-tab-item {
    padding: 12px 5px;
    font-size: 16px;
    font-weight: 600;
    color: #999;
    cursor: pointer;
    position: relative;
    border: none;
    background: none;
    transition: color 0.2s;
}

.shop-tab-item.active {
    color: #222;
}

.shop-tab-item.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 2px;
    background: #007bff;
}

.tab-content-shop {
    font-size: 15px;
    line-height: 1.8;
    color: #444;
}

.product-features {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px 30px;
}

.feature-row {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px dashed #eee;
}

.feature-label {
    font-weight: 600;
    color: #666;
}

/* Admin floating bar */
.admin-preview-bar {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(44, 62, 80, 0.9);
    backdrop-filter: blur(10px);
    color: white;
    padding: 10px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.admin-preview-bar .nav-info {
    font-size: 13px;
    font-weight: 500;
}

/* Responsive shop preview */
@media (max-width: 992px) {
    .product-main {
        flex-direction: column;
        padding: 20px;
    }
    .product-images-col {
        flex: 0 0 auto;
    }
    .main-image-wrapper {
        min-height: 300px;
    }
}