/* ============================================================================
   ATACADO KIDS - style.css (Estilos Completos)
   ============================================================================ */

:root {
    --primary: #FF6B6B;
    --secondary: #4ECDC4;
    --dark: #2D3436;
    --light: #F7F7F7;
    --gray: #636E72;
    --success: #00B894;
    --warning: #FDCB6E;
    --danger: #FF6B6B;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    background: var(--light);
    color: var(--dark);
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ============================================================================
   HEADER
   ============================================================================ */

.header {
    background: white;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
}

.logo img {
    height: 50px;
}

.logo h1 {
    font-size: 24px;
    color: var(--primary);
}

.logo h1 span {
    color: var(--secondary);
}

.search-box {
    display: flex;
    flex: 1;
    max-width: 500px;
    margin: 0 20px;
}

.search-box input {
    flex: 1;
    padding: 10px 15px;
    border: 2px solid #ddd;
    border-radius: 25px 0 0 25px;
    outline: none;
}

.search-box button {
    padding: 10px 20px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 0 25px 25px 0;
    cursor: pointer;
}

.btn-cart {
    position: relative;
    background: none;
    border: none;
    font-size: 24px;
    color: var(--dark);
    cursor: pointer;
}

.cart-count {
    position: absolute;
    top: -8px;
    right: -8px;
    background: var(--primary);
    color: white;
    font-size: 12px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ============================================================================
   CATEGORIES NAV
   ============================================================================ */

.categories-nav {
    background: white;
    border-bottom: 1px solid #ddd;
}

.categories-nav ul {
    display: flex;
    list-style: none;
    overflow-x: auto;
    padding: 10px 0;
}

.categories-nav li {
    margin: 0 10px;
    white-space: nowrap;
}

.categories-nav a {
    text-decoration: none;
    color: var(--dark);
    padding: 8px 16px;
    border-radius: 20px;
    transition: all 0.3s ease;
}

.categories-nav a.active,
.categories-nav a:hover {
    background: var(--primary);
    color: white;
}

/* ============================================================================
   HERO SECTION
   ============================================================================ */

.hero {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: white;
    padding: 80px 0;
    text-align: center;
}

.hero h2 {
    font-size: 48px;
    margin-bottom: 20px;
}

.hero h2 span {
    color: #FFEAA7;
}

.hero p {
    font-size: 18px;
    margin-bottom: 30px;
}

.btn-primary {
    background: white;
    color: var(--primary);
    padding: 14px 30px;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.2);
}

/* ============================================================================
   FILTERS
   ============================================================================ */

.filters {
    background: white;
    padding: 20px 0;
    border-bottom: 1px solid #ddd;
}

.filters .container {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    align-items: center;
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.filter-group select,
.filter-group input {
    padding: 10px 15px;
    border: 2px solid #ddd;
    border-radius: 8px;
    outline: none;
}

.filter-group.search {
    margin-left: auto;
}

/* ============================================================================
   PRODUCTS
   ============================================================================ */

.products {
    padding: 60px 0;
}

.products-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.products-header select {
    padding: 10px 15px;
    border: 2px solid #ddd;
    border-radius: 8px;
    outline: none;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
}

.product-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    cursor: pointer;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}

.product-image-wrapper {
    position: relative;
    padding-top: 100%;
    overflow: hidden;
}

.product-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-info {
    padding: 20px;
}

.product-category {
    font-size: 12px;
    color: var(--gray);
    text-transform: uppercase;
    margin-bottom: 5px;
}

.product-name {
    font-size: 16px;
    margin-bottom: 10px;
    color: var(--dark);
}

.product-price {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
}

.price-old {
    text-decoration: line-through;
    color: var(--gray);
    font-size: 14px;
}

.price-new {
    color: var(--primary);
    font-weight: 700;
    font-size: 18px;
}

.btn-add {
    width: 100%;
    padding: 12px;
    background: var(--secondary);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-add:hover {
    background: var(--primary);
}

/* ============================================================================
   MODALS
   ============================================================================ */

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2000;
    overflow-y: auto;
}

.modal.active {
    display: block;
}

.overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 1999;
}

.overlay.active {
    display: block;
}

.modal-content {
    background: white;
    margin: 50px auto;
    padding: 30px;
    border-radius: 16px;
    max-width: 600px;
    position: relative;
}

.modal-cart .modal-content {
    max-width: 700px;
}

.modal-product .modal-content {
    max-width: 900px;
}

.btn-close-modal {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--gray);
}

/* ============================================================================
   CART
   ============================================================================ */

.cart-items {
    max-height: 400px;
    overflow-y: auto;
    margin: 20px 0;
}

.cart-item {
    display: flex;
    gap: 15px;
    padding: 15px 0;
    border-bottom: 1px solid #ddd;
}

.cart-item img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 8px;
}

.cart-item-info {
    flex: 1;
}

.cart-item-name {
    font-weight: 600;
    margin-bottom: 5px;
}

.cart-item-details {
    font-size: 12px;
    color: var(--gray);
    margin-bottom: 5px;
}

.cart-item-price {
    color: var(--primary);
    font-weight: 700;
}

.cart-item-qty {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 10px;
}

.cart-item-qty button {
    width: 30px;
    height: 30px;
    border: 1px solid #ddd;
    background: white;
    border-radius: 5px;
    cursor: pointer;
}

.cart-item-remove {
    background: none;
    border: none;
    font-size: 24px;
    color: var(--danger);
    cursor: pointer;
}

/* ============================================================================
   CHECKOUT FORM
   ============================================================================ */

.customer-form {
    margin: 20px 0;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
}

.form-group input {
    width: 100%;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 8px;
    outline: none;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.cep-input-group {
    display: flex;
    gap: 10px;
}

.cep-input-group input {
    flex: 1;
}

.btn-consult-cep {
    padding: 12px 20px;
    background: var(--secondary);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
}

/* ============================================================================
   PAYMENT
   ============================================================================ */

.payment-section {
    margin: 20px 0;
}

.payment-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.payment-option {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    border: 2px solid #ddd;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.payment-option:hover,
.payment-option input:checked + * {
    border-color: var(--primary);
    background: #FFF5F5;
}

.payment-icon {
    font-size: 24px;
    color: var(--primary);
}

/* ============================================================================
   CART FOOTER
   ============================================================================ */

.cart-footer {
    border-top: 2px solid #ddd;
    padding-top: 20px;
    margin-top: 20px;
}

.cart-total {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    font-size: 16px;
}

.cart-total-final {
    font-size: 20px;
    font-weight: 700;
    color: var(--primary);
}

.btn-continue,
.btn-getnet,
.btn-whatsapp,
.btn-back {
    width: 100%;
    padding: 14px;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    margin-bottom: 10px;
    transition: all 0.3s ease;
}

.btn-continue {
    background: var(--primary);
    color: white;
}

.btn-getnet {
    background: #00B894;
    color: white;
}

.btn-whatsapp {
    background: #25D366;
    color: white;
}

.btn-back {
    background: #ddd;
    color: var(--dark);
}

/* ============================================================================
   SHIPPING
   ============================================================================ */

.shipping-calc-section {
    background: #f9f9f9;
    padding: 20px;
    border-radius: 8px;
    margin: 20px 0;
}

.shipping-input-group {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.shipping-input-group input {
    flex: 1;
    padding: 10px;
    border: 2px solid #ddd;
    border-radius: 8px;
}

.btn-calculate {
    padding: 10px 20px;
    background: var(--secondary);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
}

.shipping-result {
    margin-top: 15px;
    padding: 10px;
    border-radius: 8px;
    display: none;
}

.shipping-result.show {
    display: block;
}

.shipping-result.success {
    background: #d4edda;
    color: #155724;
}

/* ============================================================================
   PRODUCT MODAL
   ============================================================================ */

.modal-product-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

.modal-product-images img {
    width: 100%;
    border-radius: 8px;
}

.modal-product-thumbs {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.modal-product-thumbs img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 8px;
    cursor: pointer;
    border: 2px solid transparent;
}

.modal-product-thumbs img.active {
    border-color: var(--primary);
}

.modal-product-details h2 {
    margin-bottom: 10px;
}

.modal-product-sku {
    color: var(--gray);
    font-size: 14px;
    margin-bottom: 15px;
}

.modal-product-price {
    margin-bottom: 20px;
}

.modal-product-section {
    margin-bottom: 20px;
}

.size-options {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.size-btn {
    padding: 10px 20px;
    border: 2px solid #ddd;
    background: white;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.size-btn.active,
.size-btn:hover {
    border-color: var(--primary);
    background: var(--primary);
    color: white;
}

.btn-add-to-cart {
    width: 100%;
    padding: 14px;
    background: var(--secondary);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
}

/* ============================================================================
   WHATSAPP FLOAT
   ============================================================================ */

.whatsapp-float {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: #25D366;
    color: white;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.3);
    z-index: 3000;
    transition: all 0.3s ease;
}

.whatsapp-float:hover {
    transform: scale(1.1);
}

/* ============================================================================
   FOOTER
   ============================================================================ */

.footer {
    background: var(--dark);
    color: white;
    padding: 60px 0 20px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-bottom: 30px;
}

.footer-col h3 {
    margin-bottom: 15px;
    color: var(--secondary);
}

.footer-col ul {
    list-style: none;
}

.footer-col li {
    margin-bottom: 10px;
}

.payment-icons {
    display: flex;
    gap: 15px;
    font-size: 24px;
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #444;
}

/* ============================================================================
   LOADING
   ============================================================================ */

.loading {
    text-align: center;
    padding: 40px;
    grid-column: 1/-1;
}

.loading i {
    font-size: 48px;
    color: var(--primary);
}

/* ============================================================================
   RESPONSIVE
   ============================================================================ */

@media (max-width: 768px) {
    .header-content {
        flex-wrap: wrap;
    }
    
    .search-box {
        order: 3;
        max-width: 100%;
        margin: 15px 0 0;
    }
    
    .hero h2 {
        font-size: 32px;
    }
    
    .filters .container {
        flex-direction: column;
    }
    
    .filter-group.search {
        margin-left: 0;
        width: 100%;
    }
    
    .modal-product-content {
        grid-template-columns: 1fr;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
}