/* ===== PRODUCT PAGE STYLES ===== */
/* Diseño moderno y responsive para página de producto */

/* ===== BASE STYLES ===== */
.modern-app {
    min-height: 100vh;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    font-family: 'Inter', sans-serif;
}

.app-header {
    background: white;
    box-shadow: 0 2px 20px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0,0,0,0.05);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0.5rem 1rem;
}

.app-logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: var(--primary);
    font-weight: 600;
    font-size: 1.1rem;
    transition: all 0.3s ease;
}

.app-logo:hover {
    color: var(--secondary);
    transform: translateX(-2px);
}

.app-logo i {
    margin-right: 0.75rem;
    font-size: 1.2rem;
}

.logo-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 0.75rem;
    color: white;
    font-size: 1.1rem;
}

.header-actions {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.header-btn {
    background: rgba(0,0,0,0.05);
    border: none;
    color: var(--primary);
    padding: 0.75rem;
    border-radius: 12px;
    cursor: pointer;
    text-decoration: none;
    position: relative;
    transition: all 0.3s ease;
    font-size: 1.1rem;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.header-btn:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.cart-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: var(--accent);
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    font-size: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    border: 2px solid white;
}

.page-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    padding-bottom: 4rem; /* Espacio para el footer fijo */
}

.app-main {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}


/* ===== PRODUCT GALLERY ===== */
.product-gallery {
    background: white;
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
    position: relative;
    overflow: hidden;
}

.main-image-container {
    position: relative;
    margin-bottom: 1.5rem;
    border-radius: 16px;
    overflow: hidden;
    background: #f8f9fa;
    aspect-ratio: 4/3;
}

.main-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 16px;
    transition: transform 0.3s ease;
}

.main-image:hover {
    transform: scale(1.02);
}

.no-image-placeholder {
    width: 100%;
    height: 100%;
    background: #f8f9fa;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #6c757d;
    font-size: 1.1rem;
    gap: 0.5rem;
}

.no-image-placeholder i {
    font-size: 3rem;
    opacity: 0.5;
}

.sale-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: linear-gradient(135deg, #ff6b6b, #ee5a24);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-weight: 700;
    font-size: 0.9rem;
    box-shadow: 0 4px 15px rgba(255,107,107,0.4);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.image-thumbnails {
    display: flex;
    gap: 0.75rem;
    overflow-x: auto;
    padding: 0.5rem 0;
    scrollbar-width: thin;
    scrollbar-color: var(--primary) transparent;
}

.image-thumbnails::-webkit-scrollbar {
    height: 4px;
}

.image-thumbnails::-webkit-scrollbar-track {
    background: transparent;
}

.image-thumbnails::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 2px;
}

.thumbnail {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 12px;
    cursor: pointer;
    border: 3px solid transparent;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.thumbnail:hover {
    border-color: var(--primary);
    transform: scale(1.05);
}

.thumbnail.active {
    border-color: var(--primary);
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

/* ===== PRODUCT DETAILS ===== */
.product-details {
    background: white;
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
    position: relative;
    overflow: hidden;
}

.product-details::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--secondary), var(--accent));
}

.product-header {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #f1f3f4;
}

.hero-title {
    font-size: 2rem;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 0.5rem;
    line-height: 1.2;
}

.hero-subtitle {
    color: #6c757d;
    margin-bottom: 1rem;
    font-size: 1rem;
}

.category-link {
    color: var(--secondary);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
}

.category-link:hover {
    color: var(--primary);
    text-decoration: underline;
}

.stock-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    border-radius: 12px;
    font-weight: 600;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
}

.stock-status.in-stock {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.stock-status.out-of-stock {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.product-price-container {
    margin: 1.5rem 0;
}

.price-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.sale-price {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--primary);
}

.original-price {
    font-size: 1.5rem;
    color: #6c757d;
    text-decoration: line-through;
}

.regular-price {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--primary);
}

.discount-badge {
    background: linear-gradient(135deg, #ff6b6b, #ee5a24);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-weight: 700;
    font-size: 0.9rem;
}

/* ===== PRODUCT OPTIONS ===== */
.product-options {
    background: #f8f9fa;
    border-radius: 16px;
    padding: 1.5rem;
    margin: 2rem 0;
    border: 1px solid #e9ecef;
}

.options-header {
    margin-bottom: 1.5rem;
}

.options-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.options-subtitle {
    color: #6c757d;
    font-size: 0.95rem;
}

.option-group {
    margin-bottom: 1.5rem;
}

.option-header {
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1rem;
}

.option-values-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 1rem;
}

.option-card {
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    padding: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.option-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    transition: left 0.5s ease;
}

.option-card:hover::before {
    left: 100%;
}

.option-card:hover {
    border-color: var(--primary);
    background: #f8f9ff;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}

.option-card.selected {
    border-color: var(--primary);
    background: var(--primary);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.2);
}

.option-card-content {
    position: relative;
    z-index: 1;
}

.option-value-text {
    font-weight: 600;
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

.option-price {
    font-size: 0.85rem;
    color: #28a745;
    font-weight: 600;
}

.option-card.selected .option-price {
    color: #90EE90;
}

.option-check {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.option-card.selected .option-check {
    opacity: 1;
}

/* ===== PRODUCT DESCRIPTION ===== */
.product-description {
    background: #f8f9fa;
    border-radius: 16px;
    padding: 1.5rem;
    margin: 2rem 0;
    border: 1px solid #e9ecef;
}

.description-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.description-text {
    color: #495057;
    line-height: 1.6;
    font-size: 1rem;
}

/* ===== PRODUCT SPECS ===== */
.product-specs {
    background: #f8f9fa;
    border-radius: 16px;
    padding: 1.5rem;
    margin: 2rem 0;
    border: 1px solid #e9ecef;
}

.specs-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.specs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.spec-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    background: white;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.spec-label {
    font-weight: 600;
    color: #6c757d;
}

.spec-value {
    font-weight: 500;
    color: var(--primary);
}

/* ===== SHARE SECTION ===== */
.share-section {
    background: #f8f9fa;
    border-radius: 16px;
    padding: 1.5rem;
    margin: 1.5rem 0 0 0;
    border: 1px solid #e9ecef;
}

.share-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.share-buttons {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.75rem;
    justify-items: center;
}

.share-btn {
    padding: 0.75rem;
    border: none;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: white;
    font-size: 1.2rem;
    min-width: 48px;
    min-height: 48px;
}

.share-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.2);
}

.share-btn.whatsapp {
    background: linear-gradient(135deg, #25D366, #128C7E);
}

.share-btn.facebook {
    background: linear-gradient(135deg, #1877F2, #0A5FCC);
}

.share-btn.instagram {
    background: linear-gradient(45deg, #F58529, #DD2A7B, #8134AF);
}

.share-btn.twitter {
    background: linear-gradient(135deg, #1DA1F2, #0D8BD9);
}

/* ===== ACTION BUTTONS ===== */
.action-buttons {
    margin-top: 2rem;
}

.add-to-cart-btn {
    width: 100%;
    padding: 1.25rem 2rem;
    border: none;
    border-radius: 16px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    position: relative;
    overflow: hidden;
}

.add-to-cart-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s ease;
}

.add-to-cart-btn:hover::before {
    left: 100%;
}

.add-to-cart-btn.primary {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
}

.add-to-cart-btn.secondary {
    background: linear-gradient(135deg, #25D366, #128C7E);
    color: white;
}

.add-to-cart-btn.disabled {
    background: #6c757d;
    color: white;
    cursor: not-allowed;
    opacity: 0.6;
}

.add-to-cart-btn:hover:not(.disabled) {
    transform: translateY(-3px);
    box-shadow: 0 12px 35px rgba(0,0,0,0.2);
}

.price-display {
    margin-left: auto;
    font-size: 1.2rem;
    font-weight: 800;
}

/* ===== BOTTOM NAVIGATION ===== */
.bottom-nav {
    background: white;
    border-top: 1px solid #e9ecef;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    backdrop-filter: blur(10px);
}

.nav-container {
    display: flex;
    justify-content: space-around;
    padding: 0.5rem 0;
    max-width: 1200px;
    margin: 0 auto;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: #6c757d;
    padding: 0.25rem;
    border-radius: 12px;
    transition: all 0.3s ease;
    position: relative;
    min-width: 60px;
}

.nav-item:hover {
    color: var(--primary);
    background: #f8f9ff;
    transform: translateY(-2px);
}

.nav-icon {
    font-size: 1.1rem;
    margin-bottom: 0.2rem;
}

.nav-label {
    font-size: 0.7rem;
    font-weight: 600;
}

.nav-badge {
    position: absolute;
    top: 0;
    right: 0;
    background: var(--accent);
    color: white;
    border-radius: 50%;
    width: 16px;
    height: 16px;
    font-size: 0.65rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
}

/* ===== MODAL STYLES ===== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    backdrop-filter: blur(5px);
}

.modal-content {
    background: white;
    border-radius: 20px;
    padding: 2rem;
    max-width: 400px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from { transform: translateY(-50px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e9ecef;
}

.modal-header h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
    margin: 0;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #6c757d;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.modal-close:hover {
    background: #f8f9fa;
    color: var(--primary);
}

.quantity-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.quantity-btn {
    width: 50px;
    height: 50px;
    border: 2px solid var(--primary);
    background: white;
    color: var(--primary);
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.5rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.quantity-btn:hover {
    background: var(--primary);
    color: white;
    transform: scale(1.1);
}

.quantity-input {
    width: 100px;
    text-align: center;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    padding: 1rem;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--primary);
}

.quantity-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.total-price {
    text-align: center;
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: #f8f9ff;
    border-radius: 12px;
}

.modal-footer {
    display: flex;
    gap: 1rem;
}

.btn-secondary {
    flex: 1;
    padding: 1rem;
    border: 2px solid #e9ecef;
    background: white;
    color: #6c757d;
    border-radius: 12px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: #f8f9ff;
}

.btn-primary {
    flex: 1;
    padding: 1rem;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    font-weight: 700;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.2);
}

/* ===== RESPONSIVE DESIGN ===== */
@media (min-width: 1024px) {
    .app-main {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 3rem;
        align-items: start;
    }
    
    .product-gallery {
        position: sticky;
        top: 2rem;
    }
    
    .main-image-container {
        aspect-ratio: 1;
    }
    
    .thumbnail {
        width: 100px;
        height: 100px;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .share-buttons {
        grid-template-columns: repeat(4, 1fr);
        gap: 0.5rem;
        display: flex;
        flex-direction: row;
        justify-content: space-between;
    }
    
    .share-btn {
        min-width: 44px;
        min-height: 44px;
        font-size: 1.1rem;
        flex: 1;
        margin: 0 0.25rem;
    }
    
    .product-gallery .share-section {
        margin-top: 2rem;
    }
}

/* Mobile specific styles */
@media (max-width: 768px) {
    .share-buttons {
        display: flex !important;
        flex-direction: row !important;
        grid-template-columns: none !important;
        gap: 0.5rem;
        justify-content: space-between;
    }
    
    .share-btn {
        flex: 1;
        margin: 0 0.25rem;
        min-width: 40px;
        min-height: 40px;
        font-size: 1rem;
    }
    
    .specs-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .page-wrapper {
        padding: 1rem;
        padding-bottom: 3.5rem; /* Menos espacio para footer más fino */
    }
    
    .header-content {
        padding: 0.4rem 0.8rem;
    }
    
    .nav-container {
        padding: 0.4rem 0;
    }
    
    .nav-item {
        padding: 0.2rem;
        min-width: 50px;
    }
    
    .nav-icon {
        font-size: 1rem;
        margin-bottom: 0.15rem;
    }
    
    .nav-label {
        font-size: 0.65rem;
    }
    
    .nav-badge {
        width: 14px;
        height: 14px;
        font-size: 0.6rem;
    }
    
    .product-gallery,
    .product-details {
        padding: 1.5rem;
    }
    
    .hero-title {
        font-size: 1.75rem;
    }
    
    .sale-price,
    .regular-price {
        font-size: 2rem;
    }
    
    .option-values-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .specs-grid {
        grid-template-columns: 1fr;
    }
    
    .share-buttons {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .option-values-grid {
        grid-template-columns: 1fr;
    }
    
    .share-buttons {
        grid-template-columns: 1fr;
    }
    
    .price-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
}