/* ============================================
   PAISA IPHONE - ESTILOS GLOBALES
   ============================================ */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #2ECC71;
    --primary-dark: #27AE60;
    --secondary: #D4AF37;
    --dark: #1a1a1a;
    --light: #FFFFFF;
    --gray-50: #F8F9FA;
    --gray-100: #F5F5F5;
    --gray-200: #E8E8E8;
    --gray-600: #666666;
    --gray-700: #555555;
    --gray-900: #1a1a1a;
    --border-radius: 0.5rem;
    --transition: all 0.3s ease;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--light);
    color: var(--gray-900);
    line-height: 1.6;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    line-height: 1.2;
}

h1 { font-size: 3rem; }
h2 { font-size: 2.5rem; }
h3 { font-size: 1.75rem; }
h4 { font-size: 1.5rem; }

a {
    color: var(--primary);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--primary-dark);
}

/* ============================================
   LAYOUT
   ============================================ */

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1rem;
}

@media (min-width: 768px) {
    .container {
        padding: 0 2rem;
    }
}

/* ============================================
   TOP BAR
   ============================================ */

.top-bar {
    background-color: var(--gray-50);
    border-bottom: 1px solid var(--gray-200);
    padding: 0.75rem 0;
    font-size: 0.875rem;
}

.top-bar-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.top-bar-left, .top-bar-right {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.top-bar span {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--gray-600);
}

.top-bar i {
    color: var(--primary);
}

@media (max-width: 768px) {
    .top-bar-content {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .top-bar-left, .top-bar-right {
        gap: 1rem;
        font-size: 0.75rem;
    }
}

/* ============================================
   HEADER
   ============================================ */

.header {
    background-color: var(--light);
    border-bottom: 1px solid var(--gray-200);
    position: sticky;
    top: 0;
    z-index: 100;
    padding: 1rem 0;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
}

.logo {
    display: flex;
    align-items: center;
    gap: 1rem;
    min-width: 200px;
}

.logo a {
    display: flex;
    align-items: center;
    gap: 1rem;
    color: var(--gray-900);
}

.logo-icon {
    width: 40px;
    height: 40px;
    background-color: var(--primary);
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--light);
    font-weight: bold;
    font-size: 1.25rem;
}

.logo-text h1 {
    font-size: 1.25rem;
    margin: 0;
}

.logo-text p {
    font-size: 0.75rem;
    color: var(--gray-600);
    margin: 0;
}

.nav {
    flex: 1;
}

.nav ul {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav a {
    color: var(--gray-700);
    font-weight: 500;
    transition: var(--transition);
}

.nav a:hover {
    color: var(--primary);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.cart-icon {
    position: relative;
}

.cart-icon a {
    font-size: 1.5rem;
    color: var(--gray-900);
}

.cart-count {
    position: absolute;
    top: -8px;
    right: -8px;
    background-color: var(--primary);
    color: var(--light);
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: bold;
}

@media (max-width: 768px) {
    .header-content {
        flex-wrap: wrap;
        gap: 1rem;
    }
    
    .nav {
        display: none;
    }
    
    .logo {
        min-width: auto;
    }
    
    .header-actions {
        gap: 1rem;
    }
    
    .header-actions .btn {
        display: none;
    }
}

/* ============================================
   BUTTONS
   ============================================ */

.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: var(--border-radius);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    font-size: 1rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-primary {
    background-color: var(--primary);
    color: var(--light);
}

.btn-primary:hover {
    background-color: var(--primary-dark);
}

.btn-secondary {
    background-color: var(--gray-100);
    color: var(--gray-900);
    border: 2px solid var(--gray-300);
}

.btn-secondary:hover {
    background-color: var(--gray-200);
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: 1.125rem;
    height: 3rem;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ============================================
   CARDS
   ============================================ */

.card {
    background-color: var(--light);
    border: 1px solid var(--gray-200);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    transition: var(--transition);
}

.card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.card-image {
    width: 100%;
    height: 200px;
    background-color: var(--gray-100);
    border-radius: var(--border-radius);
    overflow: hidden;
    margin-bottom: 1rem;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.card:hover .card-image img {
    transform: scale(1.05);
}

.card-title {
    font-size: 1.125rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.card-price {
    font-size: 1.75rem;
    color: var(--primary);
    font-weight: 700;
    margin-bottom: 1rem;
}

.card-original-price {
    text-decoration: line-through;
    color: var(--gray-600);
    font-size: 0.875rem;
    margin-left: 0.5rem;
}

/* ============================================
   HERO SECTION
   ============================================ */

.hero {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
    padding: 4rem 0;
}

.hero-content h1 {
    margin-bottom: 1rem;
    line-height: 1.2;
}

.hero-content p {
    font-size: 1.125rem;
    color: var(--gray-600);
    margin-bottom: 2rem;
    line-height: 1.8;
}

.hero-badges {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 2rem;
}

.hero-badge {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.hero-badge i {
    color: var(--primary);
    font-size: 1.5rem;
}

.hero-badge p {
    margin: 0;
    font-weight: 500;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.hero-image {
    position: relative;
    height: 400px;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

.hero-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-accent {
    position: absolute;
    top: 0;
    right: 0;
    width: 4px;
    height: 100%;
    background-color: var(--secondary);
    opacity: 0.6;
}

@media (max-width: 768px) {
    .hero {
        grid-template-columns: 1fr;
        gap: 2rem;
        padding: 2rem 0;
    }
    
    .hero-image {
        height: 300px;
    }
    
    .hero-buttons {
        flex-direction: column;
    }
    
    .hero-buttons .btn {
        width: 100%;
    }
}

/* ============================================
   PRODUCTS GRID
   ============================================ */

.products-section {
    padding: 3rem 0;
}

.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-header h2 {
    margin-bottom: 1rem;
}

.section-header p {
    font-size: 1.125rem;
    color: var(--gray-600);
    max-width: 600px;
    margin: 0 auto;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 2rem;
}

@media (max-width: 768px) {
    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 1rem;
    }
}

/* ============================================
   PRODUCT DETAIL
   ============================================ */

.product-detail {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    padding: 2rem 0;
}

.product-gallery {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.product-main-image {
    width: 100%;
    height: 400px;
    background-color: var(--gray-100);
    border-radius: var(--border-radius);
    overflow: hidden;
}

.product-main-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-thumbnails {
    display: flex;
    gap: 1rem;
}

.product-thumbnail {
    width: 80px;
    height: 80px;
    background-color: var(--gray-100);
    border: 2px solid var(--gray-200);
    border-radius: var(--border-radius);
    cursor: pointer;
    overflow: hidden;
    transition: var(--transition);
}

.product-thumbnail:hover,
.product-thumbnail.active {
    border-color: var(--primary);
}

.product-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-info h1 {
    margin-bottom: 1rem;
}

.product-rating {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.stars {
    display: flex;
    gap: 0.25rem;
}

.star {
    color: #FFD700;
}

.product-specs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.spec-badge {
    background-color: var(--gray-100);
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius);
    font-size: 0.875rem;
}

.spec-badge.condition {
    background-color: #FFF3CD;
    color: #856404;
}

.product-price {
    font-size: 2.5rem;
    color: var(--primary);
    font-weight: 700;
    margin-bottom: 1rem;
}

.price-original {
    text-decoration: line-through;
    color: var(--gray-600);
    font-size: 1.25rem;
    margin-left: 1rem;
}

.trust-box {
    background-color: #E8F8F5;
    border: 1px solid #A3E4D7;
    border-radius: var(--border-radius);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.trust-item {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
}

.trust-item:last-child {
    margin-bottom: 0;
}

.trust-item i {
    color: var(--primary);
    font-size: 1.25rem;
    flex-shrink: 0;
}

.trust-item p {
    margin: 0;
    font-weight: 500;
}

.trust-item small {
    display: block;
    color: var(--gray-600);
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

.quantity-selector {
    display: flex;
    align-items: center;
    border: 1px solid var(--gray-200);
    border-radius: var(--border-radius);
    width: fit-content;
    margin-bottom: 1.5rem;
}

.quantity-selector button {
    background: none;
    border: none;
    padding: 0.5rem 1rem;
    cursor: pointer;
    font-size: 1.25rem;
    color: var(--gray-600);
}

.quantity-selector input {
    border: none;
    width: 60px;
    text-align: center;
    font-weight: 600;
}

.product-buttons {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
}

.product-buttons .btn {
    flex: 1;
    height: 3rem;
    font-size: 1.125rem;
}

.product-description {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--gray-200);
}

.product-description h2 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.specifications {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.spec-card {
    background-color: var(--gray-50);
    padding: 1rem;
    border-radius: var(--border-radius);
}

.spec-card p:first-child {
    color: var(--gray-600);
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
}

.spec-card p:last-child {
    font-weight: 600;
    margin: 0;
}

@media (max-width: 768px) {
    .product-detail {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .product-main-image {
        height: 300px;
    }
    
    .product-price {
        font-size: 2rem;
    }
    
    .product-buttons {
        flex-direction: column;
    }
}

/* ============================================
   FILTERS
   ============================================ */

.filters {
    background-color: var(--gray-50);
    padding: 1.5rem;
    border-radius: var(--border-radius);
    margin-bottom: 2rem;
}

.filter-group {
    margin-bottom: 1.5rem;
}

.filter-group:last-child {
    margin-bottom: 0;
}

.filter-group h3 {
    font-size: 1rem;
    margin-bottom: 0.75rem;
}

.filter-group input,
.filter-group select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--gray-200);
    border-radius: var(--border-radius);
    font-family: 'Inter', sans-serif;
}

.filter-group input:focus,
.filter-group select:focus {
    outline: none;
    border-color: var(--primary);
}

/* ============================================
   CHECKOUT
   ============================================ */

.checkout-container {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
    padding: 2rem 0;
}

.checkout-form {
    background-color: var(--light);
    border: 1px solid var(--gray-200);
    border-radius: var(--border-radius);
    padding: 2rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--gray-200);
    border-radius: var(--border-radius);
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(46, 204, 113, 0.1);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.order-summary {
    background-color: var(--gray-50);
    border: 1px solid var(--gray-200);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    height: fit-content;
    position: sticky;
    top: 100px;
}

.order-summary h3 {
    margin-bottom: 1.5rem;
}

.order-item {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--gray-200);
}

.order-item:last-child {
    border-bottom: none;
    margin-bottom: 1.5rem;
    padding-bottom: 0;
}

.order-item-image {
    width: 60px;
    height: 60px;
    background-color: var(--gray-100);
    border-radius: var(--border-radius);
    overflow: hidden;
}

.order-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.order-item-details p {
    margin: 0;
    font-size: 0.875rem;
}

.order-item-details p:first-child {
    font-weight: 600;
}

.order-totals {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding-top: 1.5rem;
    border-top: 2px solid var(--gray-200);
}

.total-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.total-row.final {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
}

@media (max-width: 768px) {
    .checkout-container {
        grid-template-columns: 1fr;
    }
    
    .order-summary {
        position: static;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
}

/* ============================================
   FOOTER
   ============================================ */

.footer {
    background-color: var(--dark);
    color: #B0B0B0;
    padding: 3rem 0 1rem;
    margin-top: 4rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3,
.footer-section h4 {
    color: var(--light);
    margin-bottom: 1rem;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section a {
    color: #B0B0B0;
    transition: var(--transition);
}

.footer-section a:hover {
    color: var(--primary);
}

.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.social-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    transition: var(--transition);
}

.social-links a:hover {
    background-color: var(--primary);
}

.footer-badges {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    padding: 2rem 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 2rem;
}

.badge {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.badge i {
    color: var(--primary);
    font-size: 1.5rem;
    flex-shrink: 0;
}

.badge p {
    margin: 0;
    color: var(--light);
    font-weight: 600;
}

.badge small {
    display: block;
    color: #B0B0B0;
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-links {
    display: flex;
    gap: 2rem;
}

@media (max-width: 768px) {
    .footer-content {
        grid-template-columns: 1fr;
    }
    
    .footer-bottom {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .footer-links {
        flex-direction: column;
        gap: 0.5rem;
    }
}

/* ============================================
   UTILITIES
   ============================================ */

.text-center {
    text-align: center;
}

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

.hidden {
    display: none !important;
}

.alert {
    padding: 1rem;
    border-radius: var(--border-radius);
    margin-bottom: 1rem;
}

.alert-success {
    background-color: #D4EDDA;
    color: #155724;
    border: 1px solid #C3E6CB;
}

.alert-error {
    background-color: #F8D7DA;
    color: #721C24;
    border: 1px solid #F5C6CB;
}

.alert-info {
    background-color: #D1ECF1;
    color: #0C5460;
    border: 1px solid #BEE5EB;
}

/* ============================================
   BREADCRUMB
   ============================================ */

.breadcrumb {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    padding: 1rem 0;
    border-bottom: 1px solid var(--gray-200);
    margin-bottom: 2rem;
    font-size: 0.875rem;
}

.breadcrumb a {
    color: var(--primary);
}

.breadcrumb span {
    color: var(--gray-600);
}

/* ============================================
   LOADING & ANIMATIONS
   ============================================ */

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.3s ease-in-out;
}

.loader {
    border: 4px solid var(--gray-200);
    border-top: 4px solid var(--primary);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
