* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: Arial, Helvetica, sans-serif;
    background-color: #f3f3f3;
    color: #111;
}

.topbar {
    background-color: #ffd500;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 24px;
    gap: 20px;
    flex-wrap: wrap;
}

.logo {
    width: 64px;
    height: 64px;
    background-color: #d71920;
    color: white;
    font-weight: 900;
    font-size: 20px;

    display: flex;
    align-items: center;
    justify-content: center;

    border: 4px solid #000;
    border-radius: 6px;

    text-align: center;
    line-height: 1;
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 26px;
    flex-wrap: wrap;
    justify-content: center;
    flex: 1;
}

.main-nav a {
    text-decoration: none;
    color: #111;
    font-weight: 700;
    font-size: 14px;
}

.main-nav a:hover {
    text-decoration: underline;
}

.nav-sale {
    color: #d71920 !important;
}

.nav-icons {
    display: flex;
    gap: 18px;
    font-size: 22px;
    align-items: center;
    flex-shrink: 0;
}

.cart-link {
    text-decoration: none;
    color: #111;
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 700;
}

.cart-count {
    font-size: 15px;
    font-weight: 700;
}

.search-section {
    background-color: #ffd500;
    padding: 6px 24px 18px;
    display: flex;
    justify-content: center;
}

.search-box {
    width: min(920px, 90%);
    background-color: #fff;
    border-radius: 18px;
    display: flex;
    align-items: center;
    padding: 14px 18px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.12);
}

.search-icon {
    margin-right: 10px;
    font-size: 20px;
    color: #666;
}

.search-box input {
    border: none;
    outline: none;
    font-size: 20px;
    width: 100%;
    background: transparent;
}

.home-content {
    padding: 56px 40px 60px;
}

.hero-title {
    text-align: center;
    margin-bottom: 42px;
}

.hero-title h1 {
    font-size: 34px;
    font-weight: 800;
    color: #111;
}

.catalogo {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 34px 28px;
    max-width: 1600px;
    margin: 0 auto;
}

.product-card {
    position: relative;
    background-color: transparent;
    padding: 10px 8px 18px;
}

.product-image {
    height: 240px;
    background: linear-gradient(145deg, #1b1b1b, #3d3d3d);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    margin-bottom: 16px;
}

.lego-box {
    width: 110px;
    height: 110px;
    background-color: #d71920;
    color: #fff;
    border: 5px solid #ffd500;
    border-radius: 8px;
    font-size: 30px;
    font-weight: 900;
    display: flex;
    align-items: center;
    justify-content: center;
    transform: rotate(-8deg);
    box-shadow: 0 12px 28px rgba(0,0,0,0.35);
}

.availability-badge {
    display: inline-block;
    background-color: #1f9d55;
    color: #fff;
    font-weight: 700;
    font-size: 14px;
    padding: 8px 12px;
    margin-bottom: 14px;
    border-radius: 6px;
}

.sin-stock-badge {
    background-color: #7a7a7a;
}

.product-name {
    font-size: 19px;
    line-height: 1.35;
    font-weight: 700;
    margin-bottom: 14px;
    min-height: 52px;
}

.product-prices {
    margin-bottom: 10px;
}

.current-price {
    color: #111;
    font-size: 24px;
    font-weight: 800;
}

.product-meta {
    color: #444;
    font-size: 14px;
    margin-bottom: 6px;
}

.buy-link {
    text-decoration: none;
}

.buy-btn {
    margin-top: 14px;
    background-color: #d71920;
    color: #fff;
    border: none;
    border-radius: 10px;
    padding: 12px 18px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.15s ease, opacity 0.15s ease;
}

.buy-btn:hover {
    transform: translateY(-1px);
    opacity: 0.93;
}

.disabled-btn {
    background-color: #999;
    cursor: not-allowed;
}

.disabled-btn:hover {
    transform: none;
    opacity: 1;
}

.cart-button {
    background-color: #d71920;
    color: white;
    text-decoration: none;
    padding: 10px 14px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.cart-button:hover {
    opacity: 0.9;
}

.page-content {
    padding: 56px 40px 60px;
    max-width: 1400px;
    margin: 0 auto;
}

.page-title {
    text-align: center;
    margin-bottom: 36px;
}

.page-title h1 {
    font-size: 34px;
    font-weight: 800;
    color: #111;
    margin-bottom: 10px;
}

.page-title p {
    font-size: 16px;
    color: #555;
}

.table-card,
.message-card,
.status-card {
    background-color: #fff;
    border-radius: 16px;
    padding: 28px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.08);
    max-width: 1100px;
    margin: 0 auto;
}

.styled-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 28px;
}

.styled-table thead {
    background-color: #f7f7f7;
}

.styled-table th,
.styled-table td {
    padding: 16px 12px;
    text-align: center;
    border-bottom: 1px solid #e7e7e7;
}

.styled-table th {
    font-size: 15px;
    font-weight: 800;
}

.styled-table td {
    font-size: 15px;
}

.table-actions {
    display: flex;
    justify-content: center;
    gap: 8px;
}

.small-btn {
    background-color: #d71920;
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
}

.small-btn:disabled {
    background-color: #999;
    cursor: not-allowed;
}

.summary-box {
    text-align: center;
    margin-top: 10px;
}

.summary-box h2 {
    font-size: 30px;
    margin-bottom: 20px;
}

.summary-actions {
    display: flex;
    justify-content: center;
    gap: 14px;
    flex-wrap: wrap;
    margin-top: 18px;
}

.secondary-btn {
    margin-top: 14px;
    background-color: #333;
    color: #fff;
    border: none;
    border-radius: 10px;
    padding: 12px 18px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.15s ease, opacity 0.15s ease;
}

.secondary-btn:hover {
    transform: translateY(-1px);
    opacity: 0.93;
}

.message-card,
.status-card {
    text-align: center;
}

.message-card h2,
.status-card h1 {
    font-size: 34px;
    margin-bottom: 14px;
    font-weight: 800;
}

.message-card p,
.status-card p {
    font-size: 17px;
    color: #555;
    margin-bottom: 10px;
}

.status-details {
    margin: 20px 0;
    padding: 18px;
    background-color: #f7f7f7;
    border-radius: 12px;
}

.success-card {
    border-top: 8px solid #1f9d55;
}

.warning-card {
    border-top: 8px solid #f0ad00;
}

.error-card {
    border-top: 8px solid #d71920;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 10px;
}

@media (max-width: 900px) {
    .styled-table {
        font-size: 13px;
    }

    .styled-table th,
    .styled-table td {
        padding: 10px 6px;
    }

    .page-title h1,
    .message-card h2,
    .status-card h1 {
        font-size: 28px;
    }
    
    .topbar {
        justify-content: center;
    }

    .main-nav {
        gap: 14px;
    }

    .main-nav a {
        font-size: 12px;
    }

    .hero-title h1 {
        font-size: 28px;
    }

    .product-image {
        height: 210px;
    }
}