/* ============================================
   COMPONENTS - BUTTONS, CARDS, MODALS, TABLES
   ============================================ */

/* Buttons */
.btn {
    padding: 15px 40px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 700;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn-primary {
    background: rgba(0, 212, 212, 0.08);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: var(--primary);
    border: 2px solid var(--primary);
    box-shadow: var(--neon-shadow), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.btn-primary:hover {
    background: var(--primary);
    color: var(--bg-dark);
    transform: translateY(-5px);
    box-shadow: 0 0 20px var(--primary), 0 0 40px var(--primary), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

/* Floating Social Buttons */
.floating-social {
    position: fixed;
    right: 20px;
    bottom: 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    z-index: 900;
}

.social-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-decoration: none;
    font-size: 1.5rem;
    transition: var(--transition);
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.social-btn:hover {
    transform: scale(1.1) translateY(-5px);
}

.social-btn.wa:hover {
    background: #25D366;
    border-color: #25D366;
    box-shadow: 0 0 15px #25D366;
}

.social-btn.ig:hover {
    background: #E1306C;
    border-color: #E1306C;
    box-shadow: 0 0 15px #E1306C;
}

.social-btn.tk:hover {
    background: #000000;
    border-color: #ff0050;
    box-shadow: -2px -2px 10px #00f2fe, 2px 2px 10px #ff0050;
}

.social-btn.fb:hover {
    background: #1877F2;
    border-color: #1877F2;
    box-shadow: 0 0 15px #1877F2;
}

/* Cart Modal */
.cart-modal {
    background: rgba(18, 18, 20, 0.85);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
    border-radius: 24px;
    padding: 30px;
}

.cart-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 9999;
    display: none;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    visibility: hidden;
}

.cart-overlay.active {
    display: flex;
    opacity: 1;
    visibility: visible;
}

/* Cart Icon */
.cart-icon-container {
    position: relative;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    transition: var(--transition);
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.cart-icon-container:hover {
    background: rgba(0, 212, 212, 0.15);
    border-color: rgba(0, 212, 212, 0.3);
    box-shadow: 0 0 15px rgba(0, 212, 212, 0.2);
}

.cart-count {
    position: absolute;
    top: 0;
    right: 0;
    background: var(--secondary);
    color: white;
    font-size: 0.7rem;
    font-weight: 800;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 10px var(--secondary);
}

/* PWA Install Banner */
#pwa-install-banner {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, rgba(0, 212, 212, 0.95), rgba(0, 122, 122, 0.95));
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    color: #fff;
    padding: 15px 20px;
    z-index: 9999;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

#pwa-install-banner span {
    font-size: 0.9rem;
}

#pwa-install-btn {
    background: #fff;
    color: #007a7a;
    border: none;
    padding: 8px 20px;
    border-radius: 8px;
    font-weight: bold;
    cursor: pointer;
    transition: var(--transition);
}

#pwa-install-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

#pwa-dismiss-btn {
    background: transparent;
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.5);
    padding: 8px 15px;
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition);
}

#pwa-dismiss-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* Connection Status Banner */
#connection-banner {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(255, 82, 82, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: #fff;
    text-align: center;
    padding: 10px;
    z-index: 9999;
    font-size: 0.85rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

/* Badges */
.category-badge {
    display: inline-block;
    padding: 4px 12px;
    background: rgba(0, 212, 212, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: var(--primary);
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    border: 1px solid rgba(0, 212, 212, 0.25);
    box-shadow: 0 2px 8px rgba(0, 212, 212, 0.1);
}

.detail-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: var(--text-light);
    border-radius: 8px;
    font-size: 0.7rem;
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.detail-badge i {
    color: var(--primary);
}

/* Category Filters */
.category-filters {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 40px;
    flex-wrap: wrap;
    padding: 0 5%;
}

.filter-btn {
    padding: 10px 25px;
    border-radius: 30px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    color: var(--text-muted);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.filter-btn:hover, .filter-btn.active {
    background: rgba(0, 212, 212, 0.15);
    color: var(--primary);
    border-color: var(--primary);
    box-shadow: 0 0 20px rgba(0, 212, 212, 0.3), 0 4px 15px rgba(0, 0, 0, 0.2);
}

/* Product Slider */
.product-slider {
    position: relative;
    width: 100%;
    height: 280px;
    overflow: hidden;
}

.slider-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity 0.5s ease;
}

.slider-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.4);
    color: white;
    border: none;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    z-index: 10;
    backdrop-filter: blur(5px);
}

.slider-arrow:hover {
    background: var(--primary);
    color: var(--bg-dark);
}

.slider-arrow.prev { left: 10px; }
.slider-arrow.next { right: 10px; }

.slider-dots {
    position: absolute;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 10;
}

.dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    transition: var(--transition);
}

.dot.active {
    background: var(--primary);
    transform: scale(1.3);
    box-shadow: 0 0 10px var(--primary);
}

/* Product Image Modal (Lightbox) */
.product-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(10px);
    z-index: 3000;
    display: none;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.product-modal-overlay.active {
    display: flex;
    opacity: 1;
}

.product-modal-content {
    max-width: 90%;
    max-height: 90%;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    transform: scale(0.9);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.product-modal-overlay.active .product-modal-content {
    transform: scale(1);
}

.product-modal-close {
    position: absolute;
    top: -50px;
    right: 0;
    background: transparent;
    border: none;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    transition: var(--transition);
    z-index: 3100;
}

.product-modal-close:hover {
    color: var(--primary);
    transform: scale(1.2) rotate(90deg);
}

.modal-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.05);
    color: white;
    border: 1px solid var(--glass-border);
    width: 65px;
    height: 65px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    font-size: 1.8rem;
    backdrop-filter: blur(10px);
    z-index: 3100;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}

.modal-arrow:hover {
    background: var(--primary);
    color: var(--bg-dark);
    box-shadow: 0 0 25px var(--primary);
    transform: translateY(-50%) scale(1.1);
}

.modal-arrow.prev { left: 40px; }
.modal-arrow.next { right: 40px; }

#modal-img {
    max-width: 100%;
    max-height: 75vh;
    border-radius: 15px;
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.5), 0 0 20px rgba(0, 212, 212, 0.2);
    object-fit: contain;
    border: 1px solid var(--glass-border);
    transition: opacity 0.3s ease;
}

.product-modal-info {
    margin-top: 25px;
    text-align: center;
    color: white;
    width: 100%;
    padding: 20px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 15px;
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(5px);
}

.product-modal-info h2 {
    font-size: 2rem;
    margin-bottom: 10px;
    background: linear-gradient(to right, #ffffff, var(--primary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 800;
}

.product-modal-info p {
    font-size: 1.1rem;
    color: var(--text-muted);
    font-weight: 400;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.product-slider img {
    cursor: zoom-in;
}

@media (max-width: 1100px) {
    .modal-arrow {
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
        background: rgba(0, 0, 0, 0.5);
    }
    .modal-arrow.prev { left: 15px; }
    .modal-arrow.next { right: 15px; }
}

/* Loading Spinner (compartido) */
.loader {
    border: 4px solid rgba(255, 255, 255, 0.1);
    border-left-color: var(--primary);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin: 100px auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
