/* Page Layout */
.tienda-page {
    background-color: var(--background);
    min-height: 100vh;
}

.pt-32 {
    padding-top: 8rem;
}

.pb-16 {
    padding-bottom: 4rem;
}

.page-title {
    font-size: 2rem;
    color: var(--foreground);
    margin-bottom: 1rem;
}

.page-subtitle {
    font-size: 1.125rem;
    color: var(--muted-foreground);
}

.text-center {
    text-align: center;
}

.max-w-2xl {
    max-width: 42rem;
}

.mx-auto {
    margin-left: auto;
    margin-right: auto;
}

.mb-4 {
    margin-bottom: 1rem;
}

.mb-12 {
    margin-bottom: 3rem;
}

/* Grid */
.products-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

@media (min-width: 640px) {
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .products-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Product Card */
.product-card {
    background-color: var(--card);
    border-radius: 1rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: all 0.3s ease;
}

.product-card:hover {
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

.product-img-container {
    position: relative;
    height: 18rem;
    overflow: hidden;
    cursor: pointer;
}

.product-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.product-img-container:hover .product-img {
    transform: scale(1.1);
}

.product-img-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.2), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.product-img-container:hover .product-img-overlay {
    opacity: 1;
}

.product-content {
    padding: 1.5rem;
}

.product-rating {
    display: flex;
    align-items: center;
    margin-bottom: 0.5rem;
}

.star-icon {
    width: 1rem;
    height: 1rem;
}

.star-icon.filled {
    color: #facc15;
    fill: #facc15;
}

.star-icon.empty {
    color: #d1d5db;
}

.rating-text {
    font-size: 0.875rem;
    color: var(--muted-foreground);
    margin-left: 0.5rem;
}

.product-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--foreground);
    margin-bottom: 0.5rem;
}

.product-desc {
    font-size: 0.875rem;
    color: var(--muted-foreground);
    margin-bottom: 1rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 40px;
}

.product-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.product-price {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
}

.btn-add-cart {
    display: flex;
    align-items: center;
}

.cart-icon {
    margin-right: 0.5rem;
}

/* Modal Styling */
.modal-overlay {
    position: fixed;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.modal-overlay.active {
    display: flex;
}

.modal-container {
    background-color: var(--card);
    border-radius: 1rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    max-width: 42rem;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-header {
    position: sticky;
    top: 0;
    background-color: var(--card);
    border-bottom: 1px solid var(--border);
    padding: 1rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    z-index: 10;
}

.modal-close {
    background: none;
    border: none;
    padding: 0.5rem;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: background-color 0.2s;
    color: var(--foreground);
}

.modal-close:hover {
    background-color: var(--secondary);
}

.modal-body {
    padding: 1.5rem;
}

.product-modal-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

@media (min-width: 768px) {
    .product-modal-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.modal-img-wrapper {
    aspect-ratio: 1 / 1;
    border-radius: 0.75rem;
    overflow: hidden;
    background-color: var(--secondary);
}

.modal-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.modal-info-wrapper {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.text-2xl {
    font-size: 1.5rem;
    line-height: 2rem;
    font-weight: 600;
}

.text-3xl {
    font-size: 1.875rem;
    line-height: 2.25rem;
    font-weight: 700;
}

.hidden {
    display: none !important;
}

.tallas-grid {
    display: flex;
    gap: 0.5rem;
}

.btn-talla {
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    border: 2px solid var(--border);
    background: transparent;
    transition: all 0.2s;
    cursor: pointer;
    color: var(--foreground);
}

.btn-talla.selected {
    border-color: var(--primary);
    background-color: rgba(255, 107, 107, 0.05);
    color: var(--primary);
}

.btn-talla:hover:not(.selected) {
    border-color: rgba(255, 107, 107, 0.5);
}

.quantity-counter {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.qty-btn {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 0.5rem;
    border: 1px solid var(--border);
    background-color: transparent;
    cursor: pointer;
    transition: background-color 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}

.qty-btn:hover {
    background-color: var(--secondary);
}

.qty-val {
    width: 3rem;
    text-align: center;
    font-weight: 500;
}

.w-full {
    width: 100%;
    display: block;
    text-align: center;
}

.mt-6 {
    margin-top: 1.5rem;
}

.inline {
    display: inline-block;
}

.mr-2 {
    margin-right: 0.5rem;
}

/* Animations */
.fade-in-up {
    animation: fadeInUp 0.8s ease-out forwards;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.toast {
    padding: 1rem;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
    font-size: 0.875rem;
    text-align: center;
}

.toast.success {
    background-color: #dcfce7;
    color: #15803d;
    border: 1px solid #166534;
}

.toast.error {
    background-color: #fee2e2;
    color: #b91c1c;
    border: 1px solid #7f1d1d;
}