/* ===== TIENDA CSS ===== */

body {
    font-family: 'Montserrat', sans-serif;
    background: #000;
    color: #fff;
}

/* ===== LAYOUT DE TIENDA ===== */
.shop-layout {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 2rem;
    padding: 0 2rem;
}

/* ===== SIDEBAR DE FILTROS ===== */
.shop-sidebar {
    position: sticky;
    top: 80px;
    height: fit-content;
    background: rgba(26, 26, 26, 0.5);
    border: 1px solid #333;
    border-radius: 4px;
    padding: 1.5rem;
}

.sidebar-section {
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid #333;
}

.sidebar-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.sidebar-section h3 {
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    margin-bottom: 1rem;
    color: #fff;
}

.search-input {
    width: 100%;
    padding: 0.75rem;
    background: #000;
    border: 1px solid #333;
    border-radius: 4px;
    color: #fff;
    font-size: 0.9rem;
}

.search-input:focus {
    outline: none;
    border-color: #fff;
}

.filter-btn {
    width: 100%;
    padding: 0.75rem 1rem;
    background: transparent;
    border: 1px solid transparent;
    color: #999;
    text-align: left;
    cursor: pointer;
    border-radius: 4px;
    margin-bottom: 0.5rem;
    transition: all 0.3s;
    font-size: 0.9rem;
}

.filter-btn:hover {
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
}

.filter-btn.active {
    background: #fff;
    color: #000;
    font-weight: 600;
}

.price-range {
    padding: 0.5rem 0;
}

.price-inputs {
    display: flex;
    justify-content: space-between;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    color: #999;
}

.price-range input[type="range"] {
    width: 100%;
    margin-bottom: 0.5rem;
    -webkit-appearance: none;
    appearance: none;
    height: 4px;
    background: #333;
    border-radius: 2px;
    outline: none;
}

.price-range input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    background: #fff;
    border-radius: 50%;
    cursor: pointer;
}

.price-range input[type="range"]::-moz-range-thumb {
    width: 16px;
    height: 16px;
    background: #fff;
    border-radius: 50%;
    cursor: pointer;
    border: none;
}

.sort-select {
    width: 100%;
    padding: 0.75rem;
    background: #000;
    border: 1px solid #333;
    border-radius: 4px;
    color: #fff;
    font-size: 0.9rem;
    cursor: pointer;
}

.sort-select:focus {
    outline: none;
    border-color: #fff;
}

/* ===== PRODUCTOS ===== */
.shop-main {
    min-height: 400px;
}

.results-message {
    padding: 1rem;
    background: rgba(26, 26, 26, 0.5);
    border: 1px solid #333;
    border-radius: 4px;
    margin-bottom: 2rem;
    text-align: center;
    color: #999;
    font-size: 0.9rem;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
}

.product-card {
    background: rgba(26, 26, 26, 0.5);
    border: 1px solid #333;
    border-radius: 4px;
    overflow: hidden;
    transition: transform 0.3s, border-color 0.3s;
}

.product-card:hover {
    transform: translateY(-4px);
    border-color: #555;
}

.product-img-wrap {
    position: relative;
    width: 100%;
    aspect-ratio: 1;
    background: #000;
    overflow: hidden;
}

.product-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.product-card:hover .product-img-wrap img {
    transform: scale(1.05);
}

.product-no-img {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #111;
}

.product-category-tag {
    position: absolute;
    top: 1rem;
    left: 1rem;
    background: #fff;
    color: #000;
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.product-info {
    padding: 1.5rem;
}

.product-info h3 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.product-description {
    font-size: 0.85rem;
    color: #999;
    margin-bottom: 1rem;
    line-height: 1.5;
}

.product-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1rem;
}

.product-price {
    font-size: 1.5rem;
    font-weight: 700;
    color: #fff;
}

.btn-buy {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.8rem 1.5rem;
    background: #fff;
    color: #000;
    border: none;
    border-radius: 4px;
    font-weight: 700;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    text-decoration: none;
    position: relative;
    z-index: 10;
}

.btn-buy:hover {
    opacity: 0.8;
}

.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: #999;
}

.empty-state svg {
    margin-bottom: 1rem;
    opacity: 0.5;
}

/* ===== MODAL DE PRODUCTO ===== */
.product-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    align-items: center;
    justify-content: center;
}

.product-modal.active {
    display: flex;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
}

.modal-content {
    position: relative;
    background: #1a1a1a;
    border: 1px solid #333;
    border-radius: 4px;
    max-width: 1000px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    z-index: 10000;
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(0, 0, 0, 0.8);
    border: none;
    color: white;
    font-size: 2rem;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 10001;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    transition: background 0.3s;
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.1);
}

.modal-body {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    padding: 3rem;
}

.modal-image img {
    width: 100%;
    border-radius: 4px;
}

.modal-details h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

.modal-details p {
    color: #999;
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.modal-price {
    font-size: 2.5rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 2rem;
}

.modal-option {
    margin-bottom: 1.5rem;
}

.modal-option label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.75rem;
    font-size: 0.9rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.color-options,
.size-options {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.color-btn {
    width: 48px;
    height: 48px;
    border-radius: 4px;
    cursor: pointer;
    transition: transform 0.3s, box-shadow 0.3s;
}

.color-btn:hover {
    transform: scale(1.1);
}

.color-btn.active {
    box-shadow: 0 0 0 3px #fff;
}

.size-btn {
    padding: 0.75rem 1.25rem;
    background: #000;
    border: 2px solid #333;
    color: white;
    cursor: pointer;
    border-radius: 4px;
    font-weight: 600;
    transition: all 0.3s;
    min-width: 60px;
}

.size-btn:hover {
    border-color: #fff;
}

.size-btn.active {
    background: #fff;
    color: #000;
    border-color: #fff;
}

.quantity-selector {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.qty-btn {
    width: 48px;
    height: 48px;
    background: #000;
    border: 1px solid #333;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.qty-btn:hover {
    background: #fff;
    color: #000;
    border-color: #fff;
}

#modalQuantity {
    width: 80px;
    text-align: center;
    background: #000;
    border: 1px solid #333;
    color: white;
    padding: 0.75rem;
    border-radius: 4px;
    font-size: 1.1rem;
    font-weight: 600;
}

.modal-actions {
    margin-top: 2rem;
}

.btn-add-cart {
    width: 100%;
    padding: 1.25rem;
    background: #fff;
    color: #000;
    border: none;
    border-radius: 4px;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: opacity 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.btn-add-cart:hover {
    opacity: 0.8;
}

/* ===== MODAL DE CARRITO ===== */
.cart-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
}

.cart-modal.active {
    display: block;
}

.cart-sidebar {
    position: fixed;
    top: 0;
    right: 0;
    width: 100%;
    max-width: 450px;
    height: 100%;
    background: #1a1a1a;
    border-left: 1px solid #333;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
    }
    to {
        transform: translateX(0);
    }
}

.cart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2rem;
    border-bottom: 1px solid #333;
}

.cart-header h2 {
    font-size: 1.5rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.cart-empty {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    text-align: center;
    color: #999;
}

.cart-empty svg {
    margin-bottom: 1.5rem;
    opacity: 0.5;
}

.cart-empty p {
    margin-bottom: 2rem;
    font-size: 1.1rem;
}

.btn-continue {
    padding: 1rem 2rem;
    background: #fff;
    color: #000;
    border: none;
    border-radius: 4px;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.3s;
}

.btn-continue:hover {
    opacity: 0.8;
}

.cart-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.cart-items {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem;
}

.cart-item {
    display: grid;
    grid-template-columns: 80px 1fr auto;
    gap: 1rem;
    padding: 1rem;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid #333;
    border-radius: 4px;
    margin-bottom: 1rem;
}

.cart-item img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 4px;
}

.cart-item-details h4 {
    font-size: 1rem;
    margin-bottom: 0.25rem;
}

.cart-item-details p {
    font-size: 0.85rem;
    color: #999;
    margin-bottom: 0.25rem;
}

.cart-item-price {
    font-weight: 700;
    color: #fff !important;
    margin-top: 0.5rem;
}

.cart-item-actions {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    align-items: flex-end;
}

.cart-qty {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: #000;
    border: 1px solid #333;
    border-radius: 4px;
    padding: 0.25rem;
}

.cart-qty button {
    width: 28px;
    height: 28px;
    background: transparent;
    border: none;
    color: #fff;
    cursor: pointer;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s;
    border-radius: 2px;
}

.cart-qty button:hover {
    background: #333;
}

.cart-qty span {
    min-width: 30px;
    text-align: center;
    font-weight: 600;
}

.cart-remove {
    background: transparent;
    border: 1px solid #333;
    color: #999;
    padding: 0.5rem;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s;
}

.cart-remove:hover {
    background: #ff4444;
    border-color: #ff4444;
    color: #fff;
}

.cart-footer {
    padding: 1.5rem;
    border-top: 1px solid #333;
    background: #000;
}

.cart-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
}

.btn-checkout {
    width: 100%;
    padding: 1.25rem;
    background: #25D366;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: opacity 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.btn-checkout:hover {
    opacity: 0.9;
}

.btn-clear {
    width: 100%;
    padding: 0.75rem;
    background: transparent;
    color: #999;
    border: 1px solid #333;
    border-radius: 4px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-clear:hover {
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
    border-color: #fff;
}

/* ===== BOTÓN FLOTANTE DEL CARRITO ===== */
.cart-float-btn {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 64px;
    height: 64px;
    background: #fff;
    color: #000;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    transition: transform 0.3s, box-shadow 0.3s;
    z-index: 9998;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cart-float-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 30px rgba(0, 0, 0, 0.7);
}

.cart-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: #ff4444;
    color: #fff;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
}

/* ===== NOTIFICACIONES ===== */
.cart-notification {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: #fff;
    color: #000;
    padding: 1rem 2rem;
    border-radius: 4px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    z-index: 10001;
    font-weight: 600;
    transition: transform 0.3s;
}

.cart-notification.show {
    transform: translateX(-50%) translateY(0);
}

.cart-notification.error {
    background: #ff4444;
    color: #fff;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
    .shop-layout {
        grid-template-columns: 1fr;
    }
    
    .shop-sidebar {
        position: static;
        margin-bottom: 2rem;
    }
}

@media (max-width: 768px) {
    .modal-body {
        grid-template-columns: 1fr;
        padding: 2rem 1.5rem;
    }
    
    .products-grid {
        grid-template-columns: 1fr;
    }
    
    .cart-sidebar {
        max-width: 100%;
    }
    
    .cart-float-btn {
        bottom: 1rem;
        right: 1rem;
        width: 56px;
        height: 56px;
    }
}
