/* ============================================
   🎨 VARIABLES - STYLE AMAZON
============================================ */
:root {
    --amazon-dark: #131921;
    --amazon-blue: #232f3e;
    --amazon-orange: #ff9900;
    --amazon-orange-hover: #ffac31;
    --amazon-light: #f3f3f3;
    --amazon-yellow: #ffd814;
    --amazon-yellow-hover: #f7ca00;
    --success: #067d62;
    --danger: #cc0c39;
    --white: #ffffff;
    --text-dark: #0f1111;
    --text-light: #565959;
    --shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    --radius: 8px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', Arial, sans-serif;
    background: var(--amazon-light);
    min-height: 100vh;
    color: var(--text-dark);
}

/* ============================================
   📄 PAGES
============================================ */
.page {
    display: none;
}

.page.active {
    display: block;
}

/* ============================================
   🔐 LOGIN PAGE
============================================ */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: linear-gradient(135deg, var(--amazon-dark) 0%, var(--amazon-blue) 100%);
}

.login-box {
    background: var(--white);
    border-radius: 12px;
    padding: 40px;
    width: 100%;
    max-width: 450px;
    text-align: center;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

/* LOGO CONTAINER */
.logo-container {
    margin-bottom: 30px;
}

.logo-image {
    width: 80px;
    height: 80px;
    object-fit: contain;
    margin-bottom: 10px;
}

.logo-text {
    font-size: 36px;
    font-weight: 800;
    color: var(--amazon-dark);
    letter-spacing: 2px;
    margin: 0;
}

.logo-tagline {
    color: var(--amazon-orange);
    font-size: 14px;
    font-weight: 500;
    margin-top: 5px;
}

.subtitle {
    color: var(--text-light);
    margin-bottom: 25px;
    font-size: 14px;
}

/* BOUTON AMAZON */
.btn-amazon {
    width: 100%;
    padding: 15px 30px;
    background: linear-gradient(to bottom, var(--amazon-yellow), var(--amazon-yellow-hover));
    border: 1px solid #f2c200;
    border-radius: var(--radius);
    color: var(--text-dark);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.btn-amazon:hover {
    background: linear-gradient(to bottom, var(--amazon-yellow-hover), #e5b800);
}

.btn-amazon:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-primary {
    width: 100%;
    padding: 15px 30px;
    background: var(--amazon-orange);
    border: none;
    border-radius: var(--radius);
    color: var(--white);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.btn-primary:hover {
    background: var(--amazon-orange-hover);
}

/* ============================================
   🔑 CODE DE LIAISON
============================================ */
#code-box {
    margin-top: 25px;
    animation: slideDown 0.4s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-15px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.code-display {
    background: #f7f7f7;
    border: 2px dashed var(--amazon-orange);
    border-radius: var(--radius);
    padding: 25px;
    text-align: center;
}

.code-label {
    color: var(--text-light);
    font-size: 14px;
    margin-bottom: 15px;
}

.code-value {
    background: var(--amazon-dark);
    border-radius: var(--radius);
    padding: 20px;
    margin: 15px 0;
}

.code-value h2 {
    font-size: 42px;
    font-weight: 800;
    letter-spacing: 8px;
    color: var(--amazon-orange);
    font-family: 'Courier New', monospace;
    user-select: all;
    margin: 0;
}

.code-status {
    color: var(--text-light);
    font-size: 14px;
    margin-top: 15px;
}

.code-status i {
    margin-right: 8px;
    color: var(--amazon-orange);
}

.code-timer {
    margin-top: 12px;
    color: var(--danger);
    font-weight: 600;
    font-size: 14px;
}

.code-timer i {
    margin-right: 5px;
}

/* HELP TEXT */
.help-text {
    margin-top: 25px;
    padding: 20px;
    background: #f7fafa;
    border: 1px solid #d5d9d9;
    border-radius: var(--radius);
    text-align: left;
}

.help-text p {
    color: var(--text-dark);
    font-weight: 600;
    margin-bottom: 10px;
}

.help-text ol {
    padding-left: 20px;
}

.help-text ol li {
    margin: 8px 0;
    color: var(--text-light);
    font-size: 13px;
}

/* LOGIN FOOTER */
.login-footer {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #ddd;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.footer-logo-small {
    width: 24px;
    height: 24px;
}

.login-footer span {
    color: var(--text-light);
    font-size: 12px;
}

/* ============================================
   🔝 HEADER - STYLE AMAZON
============================================ */
.header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 20px;
    background: var(--amazon-dark);
    color: var(--white);
}

.header-left {
    display: flex;
    align-items: center;
}

.logo-link {
    display: flex;
    align-items: center;
    text-decoration: none;
    gap: 10px;
    padding: 8px;
    border: 1px solid transparent;
    border-radius: 3px;
}

.logo-link:hover {
    border-color: var(--white);
}

.header-logo {
    width: 45px;
    height: 45px;
    object-fit: contain;
}

.header-logo-text {
    font-size: 24px;
    font-weight: 800;
    color: var(--white);
    letter-spacing: 1px;
}

/* SEARCH BAR */
.header-center {
    flex: 1;
    max-width: 700px;
    margin: 0 20px;
}

.search-bar {
    display: flex;
    border-radius: 4px;
    overflow: hidden;
    background: var(--white);
}

.search-category {
    padding: 12px;
    border: none;
    background: #e6e6e6;
    color: var(--text-dark);
    font-size: 13px;
    cursor: pointer;
}

.search-bar input {
    flex: 1;
    padding: 12px 15px;
    border: none;
    font-size: 15px;
    color: var(--text-dark);
}

.search-bar input:focus {
    outline: none;
}

.search-btn {
    padding: 12px 18px;
    background: var(--amazon-orange);
    border: none;
    cursor: pointer;
}

.search-btn:hover {
    background: var(--amazon-orange-hover);
}

.search-btn i {
    color: var(--amazon-dark);
    font-size: 18px;
}

/* HEADER RIGHT */
.header-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.header-account,
.header-orders,
.header-cart {
    padding: 8px;
    border: 1px solid transparent;
    border-radius: 3px;
    cursor: pointer;
}

.header-account:hover,
.header-orders:hover,
.header-cart:hover {
    border-color: var(--white);
}

.header-small-text {
    display: block;
    font-size: 11px;
    color: #ccc;
}

.header-bold-text {
    font-weight: 700;
    font-size: 13px;
}

.coins-display {
    display: flex;
    align-items: center;
    gap: 5px;
}

.coins-display i {
    color: var(--amazon-orange);
    font-size: 20px;
}

#coins-amount {
    font-weight: 800;
    font-size: 18px;
    color: var(--amazon-orange);
}

.btn-icon {
    width: 40px;
    height: 40px;
    border-radius: 3px;
    border: 1px solid transparent;
    background: transparent;
    color: var(--white);
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-icon:hover {
    border-color: var(--white);
    background: rgba(255, 255, 255, 0.1);
}

/* ============================================
   📂 SUB-HEADER
============================================ */
.sub-header {
    display: flex;
    align-items: center;
    padding: 8px 20px;
    background: var(--amazon-blue);
    color: var(--white);
}

.menu-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 3px;
    color: var(--white);
    cursor: pointer;
    font-weight: 600;
}

.menu-btn:hover {
    border-color: var(--white);
}

.sub-header-links {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-left: 20px;
}

.category-link {
    padding: 8px 12px;
    color: var(--white);
    text-decoration: none;
    font-size: 13px;
    border: 1px solid transparent;
    border-radius: 3px;
}

.category-link:hover,
.category-link.active {
    border-color: var(--white);
}

.promo-link {
    padding: 8px 12px;
    color: var(--amazon-orange);
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
}

/* ============================================
   🎉 PROMO BANNER
============================================ */
.promo-banner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    padding: 25px;
    background: linear-gradient(90deg, var(--amazon-dark), var(--amazon-blue));
    color: var(--white);
}

.promo-logo {
    width: 60px;
    height: 60px;
    object-fit: contain;
}

.promo-text h2 {
    font-size: 24px;
    margin-bottom: 5px;
}

.promo-text p {
    color: #ccc;
    font-size: 14px;
}

/* ============================================
   📂 CATÉGORIES BOUTONS
============================================ */
.categories-nav {
    display: flex;
    justify-content: center;
    gap: 10px;
    padding: 20px;
    background: var(--white);
    border-bottom: 1px solid #ddd;
    flex-wrap: wrap;
}

.category-btn {
    padding: 10px 20px;
    background: var(--white);
    border: 1px solid #d5d9d9;
    border-radius: 20px;
    color: var(--text-dark);
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.category-btn:hover {
    background: #f7fafa;
}

.category-btn.active {
    background: var(--amazon-dark);
    color: var(--white);
    border-color: var(--amazon-dark);
}

/* ============================================
   🛍️ BOUTIQUE
============================================ */
.shop-container {
    padding: 20px;
    max-width: 1400px;
    margin: 0 auto;
}

.shop-header {
    margin-bottom: 20px;
}

.shop-header h2 {
    font-size: 22px;
    color: var(--text-dark);
}

.shop-header p {
    color: var(--text-light);
    font-size: 14px;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
}

/* ============================================
   🛒 PRODUCT CARD - STYLE AMAZON
============================================ */
.product-card {
    background: var(--white);
    border: 1px solid #ddd;
    border-radius: var(--radius);
    overflow: hidden;
    transition: all 0.2s ease;
}

.product-card:hover {
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

.product-image {
    width: 100%;
    height: 180px;
    background: linear-gradient(135deg, #f7f7f7 0%, #eee 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 60px;
    color: var(--amazon-blue);
}

.product-details {
    padding: 15px;
}

.product-name {
    font-size: 16px;
    font-weight: 500;
    color: #007185;
    margin-bottom: 5px;
    cursor: pointer;
}

.product-name:hover {
    color: var(--amazon-orange);
    text-decoration: underline;
}

.product-description {
    color: var(--text-light);
    font-size: 13px;
    margin-bottom: 10px;
}

.product-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.product-price {
    display: flex;
    align-items: center;
    gap: 5px;
}

.product-price i {
    color: var(--amazon-orange);
    font-size: 14px;
}

.product-price span {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-dark);
}

.buy-btn {
    padding: 10px 20px;
    background: linear-gradient(to bottom, var(--amazon-yellow), var(--amazon-yellow-hover));
    border: 1px solid #f2c200;
    border-radius: 20px;
    color: var(--text-dark);
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.buy-btn:hover {
    background: linear-gradient(to bottom, var(--amazon-yellow-hover), #e5b800);
}

.buy-btn:disabled {
    background: #f7f7f7;
    border-color: #ddd;
    color: #999;
    cursor: not-allowed;
}

/* ============================================
   📦 MODAL
============================================ */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: var(--white);
    border-radius: var(--radius);
    width: 90%;
    max-width: 450px;
    overflow: hidden;
}

.modal-header {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 20px;
    background: var(--amazon-dark);
    color: var(--white);
}

.modal-logo {
    width: 40px;
    height: 40px;
}

.modal-header h2 {
    flex: 1;
    font-size: 18px;
}

.close-modal {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.2);
    color: var(--white);
    font-size: 18px;
    cursor: pointer;
}

.close-modal:hover {
    background: var(--danger);
}

.modal-body {
    padding: 20px;
}

.product-preview {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid #ddd;
}

.modal-product-icon {
    width: 80px;
    height: 80px;
    background: #f7f7f7;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    color: var(--amazon-blue);
}

.product-info h3 {
    color: #007185;
    font-size: 16px;
    margin-bottom: 5px;
}

.product-info p {
    color: var(--text-light);
    font-size: 13px;
}

.prime-badge {
    margin-top: 10px;
    color: var(--amazon-dark);
    font-size: 12px;
    font-weight: 600;
}

.prime-badge i {
    color: var(--amazon-orange);
}

.order-summary {
    background: #f7fafa;
    border: 1px solid #d5d9d9;
    border-radius: var(--radius);
    padding: 15px;
}

.price-summary,
.balance-after {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
}

.price-summary {
    border-bottom: 1px solid #ddd;
}

.price-summary .price {
    color: var(--danger);
    font-weight: 700;
    font-size: 18px;
}

.balance-after span:last-child {
    color: var(--success);
    font-weight: 600;
}

.modal-footer {
    display: flex;
    gap: 10px;
    padding: 20px;
    border-top: 1px solid #ddd;
}

.btn-secondary {
    flex: 1;
    padding: 12px;
    background: var(--white);
    border: 1px solid #d5d9d9;
    border-radius: var(--radius);
    color: var(--text-dark);
    font-size: 14px;
    cursor: pointer;
}

.btn-secondary:hover {
    background: #f7fafa;
}

.modal-footer .btn-amazon {
    flex: 2;
}

/* ============================================
   📢 FOOTER
============================================ */
.footer {
    margin-top: 40px;
}

.footer-top {
    background: #37475a;
    padding: 15px;
    text-align: center;
}

.footer-top a {
    color: var(--white);
    text-decoration: none;
    font-size: 13px;
}

.footer-top a:hover {
    text-decoration: underline;
}

.footer-middle {
    display: flex;
    justify-content: center;
    gap: 80px;
    padding: 40px 20px;
    background: var(--amazon-dark);
}

.footer-column h4 {
    color: var(--white);
    font-size: 14px;
    margin-bottom: 15px;
}

.footer-column a {
    display: block;
    color: #ddd;
    text-decoration: none;
    font-size: 13px;
    margin: 8px 0;
}

.footer-column a:hover {
    text-decoration: underline;
}

.footer-bottom {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    padding: 20px;
    background: var(--amazon-blue);
}

.footer-logo {
    width: 50px;
    height: 50px;
}

.footer-text {
    color: #ddd;
    font-size: 12px;
}

/* ============================================
   🔔 NOTIFICATION
============================================ */
.notification {
    position: fixed;
    bottom: -100px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--success);
    padding: 15px 30px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--white);
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    transition: all 0.4s ease;
    z-index: 1001;
}

.notification.show {
    bottom: 30px;
}

.notification.error {
    background: var(--danger);
}

/* ============================================
   📱 RESPONSIVE
============================================ */
@media (max-width: 768px) {
    .header {
        flex-direction: column;
        gap: 10px;
        padding: 10px;
    }
    
    .header-center {
        width: 100%;
        margin: 0;
    }
    
    .header-right {
        width: 100%;
        justify-content: space-around;
    }
    
    .sub-header {
        flex-direction: column;
        gap: 10px;
    }
    
    .sub-header-links {
        margin-left: 0;
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .promo-banner {
        flex-direction: column;
        text-align: center;
    }
    
    .footer-middle {
        flex-direction: column;
        gap: 30px;
        text-align: center;
    }
    
    .products-grid {
        grid-template-columns: 1fr;
    }
    
    .login-box {
        padding: 25px;
    }
    
    .code-value h2 {
        font-size: 28px;
        letter-spacing: 4px;
    }
}