:root {
    --primary-color: #2563eb;
    --secondary-color: #1e40af;
    --accent-color: #db2777;
    --success-color: #059669;
    --warning-color: #d97706;
    --danger-color: #dc2626;
    --light-bg: #f8fafc;
    --card-bg: #ffffff;
    --text-primary: #1f2937;
    --text-secondary: #6b7280;
    --border-color: #e5e7eb;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
    --font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    /* Fondo con imagen externa */
    background-image: url("https://external-content.duckduckgo.com/iu/?u=https%3A%2F%2Fwallpaperset.com%2Fw%2Ffull%2Fb%2Ff%2F9%2F7707.jpg&f=1&nofb=1&ipt=2a3bff5c2570aa166c950cf040f0ba50acbb3b7e2b2a1fbe7528ccff76d50fa6");
    
    /* Ajustes para que la imagen se vea profesional */
    background-size: cover;       /* Cubre todo el ancho y alto */
    background-position: center;  /* Centra la imagen */
    background-attachment: fixed; /* Mantiene el fondo quieto al hacer scroll */
    background-repeat: no-repeat;
    
    /* Tus variables y layout */
    font-family: var(--font-family);
    color: var(--text-primary);
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

header {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 2rem 1rem;
    text-align: center;
    box-shadow: var(--shadow-md);
}

header h1 {
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    font-weight: 700;
    letter-spacing: -0.5px;
}

header p {
    margin-top: 0.5rem;
    opacity: 0.95;
    font-size: 0.95rem;
}

nav {
    background-color: var(--card-bg);
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 1000;
    gap: 0;
}

nav a {
    color: var(--text-primary);
    text-decoration: none;
    padding: 1rem 1.5rem;
    font-weight: 500;
    font-size: 0.95rem;
    position: relative;
    transition: all 0.3s ease;
    border-bottom: 3px solid transparent;
    display: inline-block;
}

nav a:hover {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

nav span {
    padding: 1rem 1.5rem;
    color: var(--text-secondary);
    font-size: 0.95rem;
}

footer {
    background-color: var(--text-primary);
    color: white;
    text-align: center;
    padding: 2rem 1rem;
    margin-top: auto;
    font-size: 0.9rem;
    box-shadow: 0 -2px 4px rgba(0, 0, 0, 0.1);
}

.container {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem 1rem;
    flex: 1;
}

.container h2 {
    font-size: clamp(1.5rem, 3vw, 2rem);
    margin-bottom: 2rem;
    color: var(--text-primary);
    font-weight: 700;
}

.news-container,
.product-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.news-item,
.product-item {
    background: var(--card-bg);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    height: 100%;
}

.news-item:hover,
.product-item:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.product-item img,
.news-item img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.product-item:hover img,
.news-item:hover img {
    transform: scale(1.05);
}

.product-item h3,
.news-item h3 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
    padding: 1rem 1rem 0.5rem;
}

.product-item p,
.news-item p {
    color: var(--text-secondary);
    padding: 0 1rem;
    font-size: 0.95rem;
    flex: 1;
}

.product-item .price {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    padding: 0.5rem 1rem;
}

.product-item .price .old-price {
    text-decoration: line-through;
    color: var(--text-secondary);
    font-size: 1rem;
    margin-right: 0.5rem;
}

.product-item form {
    padding: 0 1rem 1rem;
    display: flex;
    gap: 0.5rem;
    align-items: center;
    flex-wrap: wrap;
}

.product-item form input[type="number"] {
    width: 60px;
    padding: 0.5rem;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 0.9rem;
}

.product-item a {
    color: white;
    text-decoration: none;
    padding: 0.5rem 1rem;
    margin-top: 0.5rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.carousel {
    position: relative;
    overflow: hidden;
    width: 100%;
    max-width: 600px;
    height: auto;
    margin: 2rem auto;
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
}

.carousel-inner {
    display: flex;
    transition: transform 0.5s ease-in-out;
}

.carousel-item {
    min-width: 100%;
    box-sizing: border-box;
}

.carousel-item img {
    width: 100%;
    height: auto;
    display: block;
}

.carousel-control {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.6);
    color: white;
    border: none;
    padding: 0.8rem 1rem;
    cursor: pointer;
    border-radius: 6px;
    transition: background 0.3s ease;
    font-size: 1.2rem;
    font-weight: bold;
    z-index: 10;
}

.carousel-control:hover {
    background: rgba(0, 0, 0, 0.8);
}

.carousel-control.prev {
    left: 1rem;
}

.carousel-control.next {
    right: 1rem;
}

.search-form {
    display: flex;
    gap: 0.5rem;
    margin: 2rem 0;
    flex-wrap: wrap;
}

.search-form input {
    flex: 1;
    min-width: 250px;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.search-form input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.search-form button {
    padding: 0.75rem 2rem;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.search-form button:hover {
    background-color: var(--secondary-color);
    transform: translateY(-2px);
}

.contact-form,
.form-container {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: var(--shadow-md);
    max-width: 600px;
    margin: 2rem auto;
}

.contact-form label,
.form-container label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.95rem;
}

.contact-form input,
.contact-form textarea,
.form-container input,
.form-container textarea {
    width: 100%;
    padding: 0.75rem;
    margin-bottom: 1.5rem;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.3s ease;
}

.contact-form input:focus,
.contact-form textarea:focus,
.form-container input:focus,
.form-container textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.contact-form button,
.form-container button {
    width: 100%;
    padding: 0.75rem;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.contact-form button:hover,
.form-container button:hover {
    background-color: var(--secondary-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

table {
    width: 100%;
    border-collapse: collapse;
    margin: 2rem 0;
    background: var(--card-bg);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

table th {
    background-color: var(--primary-color);
    color: white;
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid var(--secondary-color);
}

table td {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-primary);
}

table tr:last-child td {
    border-bottom: none;
}

table tr:hover {
    background-color: var(--light-bg);
}

table tbody tr {
    transition: background-color 0.2s ease;
}

#paypal-button-container {
    background: var(--card-bg);
    margin: 2rem auto;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: var(--shadow-md);
    max-width: 400px;
}

.modern-button {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background-color: var(--primary-color);
    color: white;
    text-decoration: none;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.95rem;
}

.modern-button:hover {
    background-color: var(--secondary-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.modern-button:active {
    transform: translateY(0);
}

.modern-button.secondary {
    background-color: var(--text-secondary);
}

.modern-button.secondary:hover {
    background-color: var(--text-primary);
}

.modern-button.success {
    background-color: var(--success-color);
}

.modern-button.success:hover {
    background-color: #047857;
}

.modern-button.danger {
    background-color: var(--danger-color);
}

.modern-button.danger:hover {
    background-color: #b91c1c;
}

.pagination {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin: 2rem 0;
    flex-wrap: wrap;
}

.pagination a,
.pagination span {
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    text-decoration: none;
    color: var(--primary-color);
    font-weight: 600;
    transition: all 0.3s ease;
    cursor: pointer;
}

.pagination a:hover {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.pagination .current {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.alert {
    padding: 1rem;
    margin: 1rem 0;
    border-radius: 6px;
    font-weight: 500;
}

.alert-success {
    background-color: #d1fae5;
    color: #065f46;
    border-left: 4px solid var(--success-color);
}

.alert-error {
    background-color: #fee2e2;
    color: #7f1d1d;
    border-left: 4px solid var(--danger-color);
}

.alert-warning {
    background-color: #fef3c7;
    color: #92400e;
    border-left: 4px solid var(--warning-color);
}

.alert-info {
    background-color: #dbeafe;
    color: #0c2d6b;
    border-left: 4px solid var(--primary-color);
}

@media (max-width: 768px) {
    nav {
        flex-direction: column;
        align-items: center;
    }

    nav a {
        width: 100%;
        text-align: center;
        border-bottom: 1px solid var(--border-color);
    }

    .news-container,
    .product-container {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 1.5rem;
    }

    .container {
        padding: 1rem;
    }

    .search-form {
        flex-direction: column;
    }

    .search-form input {
        min-width: 100%;
    }

    table {
        font-size: 0.9rem;
    }

    table th,
    table td {
        padding: 0.75rem 0.5rem;
    }
}

@media (max-width: 480px) {
    header h1 {
        font-size: 1.5rem;
    }

    .news-container,
    .product-container {
        grid-template-columns: 1fr;
    }

    nav a {
        padding: 0.75rem 1rem;
        font-size: 0.9rem;
    }
}