/* =============================================
   MERCADERIA - Estilos especificos
   ============================================= */

/* Section header */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.25rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid rgba(168, 85, 247, 0.2);
}
.section-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #e2e8f0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Category chips */
.category-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
}
.category-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.45rem 0.9rem;
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.25);
    border-radius: 20px;
    color: #94a3b8;
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}
.category-chip:hover {
    background: rgba(34, 197, 94, 0.2);
    border-color: rgba(34, 197, 94, 0.4);
    color: #4ade80;
}
.category-chip.active {
    background: linear-gradient(135deg, #22c55e, #16a34a);
    border-color: transparent;
    color: #fff;
    box-shadow: 0 2px 10px rgba(34, 197, 94, 0.4);
}
.category-chip span {
    font-size: 1rem;
}

/* Filter bar - Secondary filters */
.filter-bar {
    display: inline-flex;
    gap: 0.5rem;
    margin-bottom: 1.25rem;
    align-items: center;
    flex-wrap: wrap;
}

/* Filter bar inline - Selectores en linea */
.filter-bar-inline {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
    align-items: center;
    flex-wrap: wrap;
}
.filter-bar-inline select {
    background: rgba(30, 30, 40, 0.95);
    border: 1px solid rgba(34, 197, 94, 0.3);
    border-radius: 20px;
    padding: 0.5rem 2rem 0.5rem 1rem;
    color: #e2e8f0;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' fill='%2322c55e' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10l-5 5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    min-width: 140px;
}
.filter-bar-inline select:hover,
.filter-bar-inline select:focus {
    border-color: #22c55e;
    outline: none;
}
.filter-bar-inline select option {
    background: #1a1525;
    color: #e2e8f0;
}
.filter-bar-inline .filter-results {
    color: #94a3b8;
    font-size: 0.8rem;
    margin-left: 0.5rem;
}

.filter-bar select {
    background: rgba(30, 30, 40, 0.95);
    border: 1px solid rgba(168, 85, 247, 0.3);
    border-radius: 20px;
    padding: 0.4rem 1.5rem 0.4rem 0.75rem;
    color: #e2e8f0;
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.2s;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' fill='%23a855f7' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10l-5 5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.5rem center;
}
.filter-bar select:hover, .filter-bar select:focus {
    border-color: #a855f7;
    outline: none;
}
.filter-bar select option {
    background: #1a1525;
    color: #e2e8f0;
}
.filter-results {
    color: #94a3b8;
    font-size: 0.75rem;
    margin-left: 0.5rem;
}

/* Products grid */
.products-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.25rem;
}

/* Product card - Estilo mejorado */
.product-card {
    background: linear-gradient(145deg, rgba(25, 20, 35, 0.98), rgba(15, 12, 25, 0.99));
    border: 1px solid rgba(34, 197, 94, 0.2);
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    cursor: pointer;
    position: relative;
}
.product-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #22c55e, #16a34a, #22c55e);
    opacity: 0;
    transition: opacity 0.3s;
    z-index: 1;
}
.product-card:hover {
    border-color: rgba(34, 197, 94, 0.5);
    transform: translateY(-6px);
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.4), 0 0 50px rgba(34, 197, 94, 0.15);
}
.product-card:hover::before {
    opacity: 1;
}
.product-card-image-container {
    position: relative;
    overflow: hidden;
    background: #0a0a0f;
    aspect-ratio: 1 / 1;
    cursor: pointer;
}
.product-card-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #0a0a0f;
    transition: transform 0.4s ease;
    padding: 0.5rem;
}
.product-card:hover .product-card-image {
    transform: scale(1.08);
}
.product-card-image-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: linear-gradient(to top, rgba(15, 12, 25, 0.95), transparent);
    pointer-events: none;
}
.product-card-body {
    padding: 1rem;
}
.product-card-category {
    display: inline-block;
    background: rgba(34, 197, 94, 0.15);
    color: #4ade80;
    padding: 0.2rem 0.6rem;
    border-radius: 12px;
    font-size: 0.65rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    border: 1px solid rgba(34, 197, 94, 0.25);
}
.product-card-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: #fff;
    margin-bottom: 0.5rem;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.2s;
}
.product-card:hover .product-card-title {
    color: #4ade80;
}
.product-card-price {
    font-size: 1.35rem;
    font-weight: 700;
    color: #22c55e;
    margin-bottom: 0.5rem;
    text-shadow: 0 0 20px rgba(34, 197, 94, 0.3);
}
.product-card-location {
    font-size: 0.75rem;
    color: #94a3b8;
    display: flex;
    align-items: center;
    gap: 0.3rem;
}
.product-card-condition {
    position: absolute;
    top: 10px;
    right: 10px;
    background: linear-gradient(135deg, #22c55e, #16a34a);
    color: #fff;
    padding: 0.25rem 0.6rem;
    border-radius: 20px;
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    box-shadow: 0 2px 8px rgba(34, 197, 94, 0.4);
    letter-spacing: 0.5px;
}
.product-card-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid rgba(34, 197, 94, 0.1);
}
.btn-card-whatsapp {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.55rem;
    background: linear-gradient(135deg, #25d366, #128c7e);
    border: none;
    border-radius: 8px;
    color: #fff;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    box-shadow: 0 2px 8px rgba(37, 211, 102, 0.3);
}
.btn-card-whatsapp:hover {
    background: linear-gradient(135deg, #128c7e, #075e54);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.45);
}
.btn-card-whatsapp svg {
    width: 14px;
    height: 14px;
}
.btn-card-view {
    padding: 0.55rem 0.85rem;
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.3);
    border-radius: 8px;
    color: #4ade80;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}
.btn-card-view:hover {
    background: rgba(34, 197, 94, 0.2);
    border-color: rgba(34, 197, 94, 0.5);
}

/* Modal */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.9);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}
.modal-overlay.active {
    display: flex;
}
.modal {
    background: linear-gradient(145deg, rgba(25, 20, 35, 0.99), rgba(15, 12, 25, 1));
    border: 1px solid rgba(168, 85, 247, 0.3);
    border-radius: 20px;
    max-width: 700px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5), 0 0 80px rgba(168, 85, 247, 0.2);
    /* Override components.css defaults */
    opacity: 1;
    visibility: visible;
    transform: none;
    top: auto;
    left: auto;
}
.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(0,0,0,0.6);
    border: none;
    color: #fff;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    z-index: 10;
}
.modal-close:hover {
    background: rgba(239, 68, 68, 0.7);
}

/* Image Gallery */
.modal-gallery {
    position: relative;
    width: 100%;
    height: 350px;
    background: #0a0a0f;
}
.modal-gallery-main {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #0a0a0f;
}
.modal-gallery-thumbs {
    position: absolute;
    bottom: 1rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 0.5rem;
}
.modal-gallery-thumb {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    object-fit: cover;
    cursor: pointer;
    border: 2px solid transparent;
    opacity: 0.6;
    transition: all 0.2s;
}
.modal-gallery-thumb:hover,
.modal-gallery-thumb.active {
    border-color: #a855f7;
    opacity: 1;
}
.modal-gallery-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0,0,0,0.6);
    border: none;
    color: #fff;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}
.modal-gallery-nav:hover {
    background: rgba(168, 85, 247, 0.7);
}
.modal-gallery-nav.prev { left: 0.5rem; }
.modal-gallery-nav.next { right: 0.5rem; }

.modal-body {
    padding: 1.5rem;
}
.modal-category {
    display: inline-block;
    background: rgba(168, 85, 247, 0.2);
    color: #c4b5fd;
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
    font-size: 0.75rem;
    font-weight: 500;
    margin-bottom: 0.75rem;
    text-transform: uppercase;
}
.modal-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 0.75rem;
    line-height: 1.3;
}
.modal-price-container {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}
.modal-price {
    font-size: 2rem;
    font-weight: 800;
    color: #22c55e;
}
.modal-price-original {
    font-size: 1.1rem;
    color: #6b7280;
    text-decoration: line-through;
}
.modal-discount {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: #fff;
    padding: 0.25rem 0.6rem;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 700;
}
.modal-description {
    color: #9ca3af;
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}
.modal-details {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
}
.modal-detail {
    background: rgba(168, 85, 247, 0.1);
    border-radius: 10px;
    padding: 0.75rem;
}
.modal-detail-label {
    font-size: 0.7rem;
    color: #6b7280;
    text-transform: uppercase;
    margin-bottom: 0.25rem;
}
.modal-detail-value {
    font-size: 0.9rem;
    color: #e2e8f0;
    font-weight: 500;
}

/* Purchase CTA */
.modal-purchase {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.15), rgba(22, 163, 74, 0.1));
    border: 1px solid rgba(34, 197, 94, 0.3);
    border-radius: 16px;
    padding: 1.25rem;
    margin-bottom: 1rem;
}
.modal-purchase-title {
    font-size: 1rem;
    font-weight: 700;
    color: #22c55e;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.modal-purchase-steps {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1rem;
}
.modal-purchase-step {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: #d1d5db;
}
.modal-purchase-step span:first-child {
    background: rgba(34, 197, 94, 0.3);
    color: #22c55e;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: 700;
    flex-shrink: 0;
}
.btn-whatsapp-buy {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    width: 100%;
    padding: 1rem 1.5rem;
    background: linear-gradient(135deg, #25d366, #128c7e);
    border: none;
    border-radius: 14px;
    color: #fff;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4);
    text-decoration: none;
}
.btn-whatsapp-buy:hover {
    background: linear-gradient(135deg, #128c7e, #075e54);
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(37, 211, 102, 0.5);
}
.btn-whatsapp-buy svg {
    width: 24px;
    height: 24px;
}

.modal-contact-alt {
    text-align: center;
    padding-top: 1rem;
    border-top: 1px solid rgba(168, 85, 247, 0.2);
}
.modal-contact-alt p {
    color: #6b7280;
    font-size: 0.8rem;
    margin-bottom: 0.5rem;
}
.modal-contact-phone {
    color: #a855f7;
    font-weight: 600;
    font-size: 1rem;
}

/* Sidebar widgets */
.widget {
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.12), rgba(20, 20, 30, 0.95));
    border: 1px solid rgba(168, 85, 247, 0.25);
    border-radius: 16px;
    padding: 1.25rem;
    margin-bottom: 1rem;
}
.widget-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: #a855f7;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-shadow: 0 0 10px rgba(168, 85, 247, 0.5);
}
.widget-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem;
    border-radius: 8px;
    color: #94a3b8;
    text-decoration: none;
    transition: all 0.2s;
}
.widget-item:hover {
    background: rgba(168, 85, 247, 0.1);
    color: #e2e8f0;
}
.widget-item.active {
    background: rgba(168, 85, 247, 0.2);
    color: #a855f7;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 2rem;
    flex-wrap: wrap;
}
.pagination-btn {
    padding: 0.6rem 1rem;
    background: rgba(168, 85, 247, 0.15);
    border: 1px solid rgba(168, 85, 247, 0.3);
    border-radius: 10px;
    color: #e2e8f0;
    cursor: pointer;
    transition: all 0.2s;
}
.pagination-btn:hover {
    background: rgba(168, 85, 247, 0.3);
    border-color: rgba(168, 85, 247, 0.5);
}
.pagination-btn.active {
    background: linear-gradient(135deg, #a855f7, #7c3aed);
    border-color: transparent;
}
.pagination-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Ad widget shimmer */
@keyframes shimmer {
    0% { transform: translateX(-100%) rotate(45deg); }
    100% { transform: translateX(100%) rotate(45deg); }
}

