/* Reset e Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #2563eb;
    --primary-dark: #1d4ed8;
    --secondary-color: #10b981;
    --accent-color: #f59e0b;
    --danger-color: #ef4444;
    --text-dark: #1f2937;
    --text-light: #6b7280;
    --bg-light: #f3f4f6;
    --bg-white: #ffffff;
    --border-color: #e5e7eb;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--bg-light);
    color: var(--text-dark);
    line-height: 1.6;
}

a {
    text-decoration: none;
    color: inherit;
}

/* Header */
.header {
    background: var(--bg-white);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-top {
    background: var(--primary-color);
    color: white;
    padding: 8px 0;
    font-size: 14px;
}

.header-top .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-main {
    padding: 15px 0;
}

.header-main .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 24px;
    font-weight: 700;
    color: var(--primary-color);
}

.logo-icon {
    font-size: 32px;
}

/* Busca */
.search-box {
    flex: 1;
    max-width: 500px;
    position: relative;
}

.search-box input {
    width: 100%;
    padding: 12px 50px 12px 20px;
    border: 2px solid var(--border-color);
    border-radius: 25px;
    font-size: 16px;
    transition: border-color 0.3s;
}

.search-box input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.search-box button {
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    background: var(--primary-color);
    border: none;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    transition: background 0.3s;
}

.search-box button:hover {
    background: var(--primary-dark);
}

/* Header Actions */
.header-actions {
    display: flex;
    align-items: center;
    gap: 20px;
}

.header-action {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 15px;
    border-radius: 8px;
    transition: background 0.3s;
    cursor: pointer;
}

.header-action:hover {
    background: var(--bg-light);
}

.header-action-icon {
    font-size: 24px;
}

.header-action-text {
    font-size: 14px;
}

.header-action-text span {
    display: block;
    font-weight: 600;
}

/* Cart Badge */
.cart-wrapper {
    position: relative;
}

#cart-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background: var(--danger-color);
    color: white;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
}

/* Navigation */
.nav-bar {
    background: var(--text-dark);
    padding: 0;
}

.nav-bar .container {
    display: flex;
    justify-content: center;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 5px;
}

.nav-menu a {
    display: block;
    padding: 15px 25px;
    color: white;
    font-weight: 500;
    transition: background 0.3s;
}

.nav-menu a:hover,
.nav-menu a.active {
    background: var(--primary-color);
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
    padding: 60px 0;
    margin-bottom: 40px;
}

.hero-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
}

.hero-text {
    flex: 1;
}

.hero-text h1 {
    font-size: 42px;
    margin-bottom: 20px;
    line-height: 1.2;
}

.hero-text p {
    font-size: 18px;
    margin-bottom: 30px;
    opacity: 0.9;
}

.hero-image {
    flex: 1;
    text-align: center;
}

.hero-image img {
    max-width: 100%;
    border-radius: 10px;
    box-shadow: var(--shadow-lg);
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 30px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    border: none;
    text-align: center;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
}

.btn-secondary {
    background: var(--secondary-color);
    color: white;
}

.btn-secondary:hover {
    background: #059669;
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
}

.btn-outline:hover {
    background: var(--primary-color);
    color: white;
}

.btn-white {
    background: white;
    color: var(--primary-color);
}

.btn-white:hover {
    background: var(--bg-light);
}

.btn-danger {
    background: var(--danger-color);
    color: white;
}

.btn-danger:hover {
    background: #dc2626;
}

.btn-sm {
    padding: 8px 16px;
    font-size: 14px;
}

.btn-lg {
    padding: 16px 40px;
    font-size: 18px;
}

.btn-block {
    display: block;
    width: 100%;
}

/* Section Titles */
.section-title {
    text-align: center;
    margin-bottom: 40px;
}

.section-title h2 {
    font-size: 32px;
    margin-bottom: 10px;
}

.section-title p {
    color: var(--text-light);
}

/* Categories Grid */
.categories-section {
    padding: 40px 0;
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 20px;
}

.category-card {
    background: var(--bg-white);
    padding: 25px 15px;
    border-radius: 12px;
    text-align: center;
    box-shadow: var(--shadow);
    transition: all 0.3s;
    cursor: pointer;
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.category-icon {
    font-size: 40px;
    margin-bottom: 10px;
}

.category-name {
    font-weight: 600;
    color: var(--text-dark);
}

/* Products Grid */
.products-section {
    padding: 40px 0;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
}

/* Product Card */
.product-card {
    background: var(--bg-white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: all 0.3s;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.product-image {
    position: relative;
    height: 200px;
    overflow: hidden;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.product-card:hover .product-image img {
    transform: scale(1.05);
}

.product-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: var(--danger-color);
    color: white;
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 12px;
    font-weight: 600;
}

.product-info {
    padding: 20px;
}

.product-category {
    font-size: 12px;
    color: var(--primary-color);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 8px;
}

.product-name {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 10px;
    line-height: 1.4;
    height: 45px;
    overflow: hidden;
}

.product-rating {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-bottom: 10px;
}

.stars {
    color: var(--accent-color);
}

.rating-value {
    font-size: 14px;
    color: var(--text-light);
}

.product-price {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
}

.price-current {
    font-size: 22px;
    font-weight: 700;
    color: var(--secondary-color);
}

.price-original {
    font-size: 14px;
    color: var(--text-light);
    text-decoration: line-through;
}

.product-actions {
    display: flex;
    gap: 10px;
}

.product-actions .btn {
    flex: 1;
}

/* Product Page */
.product-page {
    padding: 40px 0;
}

.product-detail {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    background: var(--bg-white);
    padding: 40px;
    border-radius: 12px;
    box-shadow: var(--shadow);
}

.product-gallery img {
    width: 100%;
    border-radius: 12px;
}

.product-detail-info h1 {
    font-size: 28px;
    margin-bottom: 15px;
}

.product-detail-info .product-rating {
    font-size: 18px;
    margin-bottom: 20px;
}

.product-detail-price {
    font-size: 36px;
    font-weight: 700;
    color: var(--secondary-color);
    margin-bottom: 20px;
}

.product-detail-price .original {
    font-size: 20px;
    color: var(--text-light);
    text-decoration: line-through;
    margin-left: 15px;
}

.product-description {
    color: var(--text-light);
    margin-bottom: 30px;
    line-height: 1.8;
}

.quantity-selector {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 25px;
}

.quantity-selector label {
    font-weight: 600;
}

.quantity-input {
    display: flex;
    align-items: center;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
}

.quantity-input button {
    width: 40px;
    height: 40px;
    border: none;
    background: var(--bg-light);
    cursor: pointer;
    font-size: 18px;
    transition: background 0.3s;
}

.quantity-input button:hover {
    background: var(--border-color);
}

.quantity-input input {
    width: 60px;
    height: 40px;
    border: none;
    text-align: center;
    font-size: 16px;
    font-weight: 600;
}

.product-meta {
    border-top: 1px solid var(--border-color);
    padding-top: 20px;
    margin-top: 20px;
}

.product-meta p {
    margin-bottom: 10px;
    color: var(--text-light);
}

.product-meta strong {
    color: var(--text-dark);
}

/* Category Page */
.category-page {
    padding: 40px 0;
}

.category-header {
    background: var(--bg-white);
    padding: 30px;
    border-radius: 12px;
    margin-bottom: 30px;
    box-shadow: var(--shadow);
}

.category-header h1 {
    font-size: 28px;
    margin-bottom: 10px;
}

.category-header p {
    color: var(--text-light);
}

/* Cart Page */
.cart-page {
    padding: 40px 0;
}

.cart-container {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 30px;
}

.cart-items {
    background: var(--bg-white);
    border-radius: 12px;
    padding: 25px;
    box-shadow: var(--shadow);
}

.cart-item {
    display: flex;
    gap: 20px;
    padding: 20px 0;
    border-bottom: 1px solid var(--border-color);
}

.cart-item:last-child {
    border-bottom: none;
}

.cart-item-image {
    width: 120px;
    height: 120px;
    border-radius: 8px;
    overflow: hidden;
}

.cart-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cart-item-details {
    flex: 1;
}

.cart-item-name {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
}

.cart-item-category {
    font-size: 14px;
    color: var(--text-light);
    margin-bottom: 10px;
}

.cart-item-price {
    font-size: 20px;
    font-weight: 700;
    color: var(--secondary-color);
}

.cart-item-actions {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: flex-end;
}

.cart-item-remove {
    background: none;
    border: none;
    color: var(--danger-color);
    cursor: pointer;
    font-size: 14px;
    padding: 5px;
}

.cart-item-remove:hover {
    text-decoration: underline;
}

/* Cart Summary */
.cart-summary {
    background: var(--bg-white);
    border-radius: 12px;
    padding: 25px;
    box-shadow: var(--shadow);
    height: fit-content;
    position: sticky;
    top: 200px;
}

.cart-summary h3 {
    font-size: 20px;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border-color);
}

.summary-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
}

.summary-row.total {
    font-size: 22px;
    font-weight: 700;
    padding-top: 15px;
    border-top: 2px solid var(--border-color);
    margin-top: 15px;
}

.summary-row.discount {
    color: var(--secondary-color);
}

/* Checkout Page */
.checkout-page {
    padding: 40px 0;
}

.checkout-container {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 30px;
}

.checkout-steps {
    display: flex;
    margin-bottom: 30px;
    background: var(--bg-white);
    border-radius: 12px;
    padding: 20px;
    box-shadow: var(--shadow);
}

.checkout-step {
    flex: 1;
    text-align: center;
    padding: 15px;
    position: relative;
}

.checkout-step::after {
    content: '';
    position: absolute;
    top: 50%;
    right: 0;
    width: 50px;
    height: 2px;
    background: var(--border-color);
    transform: translateY(-50%);
}

.checkout-step:last-child::after {
    display: none;
}

.checkout-step.active .step-number {
    background: var(--primary-color);
    color: white;
}

.checkout-step.completed .step-number {
    background: var(--secondary-color);
    color: white;
}

.step-number {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--bg-light);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 10px;
    font-weight: 600;
}

.step-label {
    font-size: 14px;
    color: var(--text-light);
}

.checkout-step.active .step-label {
    color: var(--text-dark);
    font-weight: 600;
}

.checkout-form {
    background: var(--bg-white);
    border-radius: 12px;
    padding: 30px;
    box-shadow: var(--shadow);
}

.checkout-form h2 {
    margin-bottom: 25px;
    font-size: 24px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary-color);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

/* Shipping Options */
.shipping-options,
.payment-options {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.shipping-option,
.payment-option {
    border: 2px solid var(--border-color);
    border-radius: 12px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 15px;
}

.shipping-option:hover,
.payment-option:hover {
    border-color: var(--primary-color);
}

.shipping-option.selected,
.payment-option.selected {
    border-color: var(--primary-color);
    background: rgba(37, 99, 235, 0.05);
}

.shipping-option input,
.payment-option input {
    display: none;
}

.option-radio {
    width: 24px;
    height: 24px;
    border: 2px solid var(--border-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.shipping-option.selected .option-radio,
.payment-option.selected .option-radio {
    border-color: var(--primary-color);
}

.shipping-option.selected .option-radio::after,
.payment-option.selected .option-radio::after {
    content: '';
    width: 12px;
    height: 12px;
    background: var(--primary-color);
    border-radius: 50%;
}

.option-details {
    flex: 1;
}

.option-name {
    font-weight: 600;
    margin-bottom: 5px;
}

.option-description {
    font-size: 14px;
    color: var(--text-light);
}

.option-price {
    font-size: 18px;
    font-weight: 700;
    color: var(--secondary-color);
}

.option-icon {
    font-size: 28px;
}

/* Order Summary Sidebar */
.order-summary {
    background: var(--bg-white);
    border-radius: 12px;
    padding: 25px;
    box-shadow: var(--shadow);
    height: fit-content;
    position: sticky;
    top: 200px;
}

.order-summary h3 {
    font-size: 20px;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border-color);
}

.order-items {
    max-height: 300px;
    overflow-y: auto;
    margin-bottom: 20px;
}

.order-item {
    display: flex;
    gap: 15px;
    padding: 10px 0;
    border-bottom: 1px solid var(--border-color);
}

.order-item:last-child {
    border-bottom: none;
}

.order-item-image {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    overflow: hidden;
}

.order-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.order-item-info {
    flex: 1;
}

.order-item-name {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 5px;
}

.order-item-qty {
    font-size: 12px;
    color: var(--text-light);
}

.order-item-price {
    font-weight: 600;
}

/* Success Page */
.success-page {
    padding: 60px 0;
    text-align: center;
}

.success-content {
    background: var(--bg-white);
    max-width: 600px;
    margin: 0 auto;
    padding: 50px;
    border-radius: 12px;
    box-shadow: var(--shadow);
}

.success-icon {
    font-size: 80px;
    margin-bottom: 20px;
}

.success-content h1 {
    font-size: 32px;
    margin-bottom: 15px;
    color: var(--secondary-color);
}

.success-content p {
    color: var(--text-light);
    margin-bottom: 30px;
}

.order-number {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary-color);
    background: var(--bg-light);
    padding: 15px 30px;
    border-radius: 8px;
    display: inline-block;
    margin-bottom: 30px;
}

.order-details {
    text-align: left;
    border-top: 1px solid var(--border-color);
    padding-top: 30px;
    margin-top: 20px;
}

.order-details h3 {
    margin-bottom: 20px;
}

/* Login Modal/Page */
.login-page {
    padding: 60px 0;
    min-height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-container {
    background: var(--bg-white);
    padding: 50px;
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    width: 100%;
    max-width: 450px;
}

.login-container h1 {
    text-align: center;
    margin-bottom: 10px;
}

.login-container .subtitle {
    text-align: center;
    color: var(--text-light);
    margin-bottom: 30px;
}

.login-container .form-group {
    margin-bottom: 25px;
}

.login-divider {
    text-align: center;
    margin: 25px 0;
    position: relative;
}

.login-divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--border-color);
}

.login-divider span {
    background: var(--bg-white);
    padding: 0 15px;
    position: relative;
    color: var(--text-light);
}

/* Empty States */
.empty-state {
    text-align: center;
    padding: 60px 20px;
}

.empty-state-icon {
    font-size: 80px;
    margin-bottom: 20px;
    opacity: 0.5;
}

.empty-state h2 {
    margin-bottom: 10px;
}

.empty-state p {
    color: var(--text-light);
    margin-bottom: 30px;
}

/* Search Results */
.search-results {
    padding: 40px 0;
}

.search-results h1 {
    margin-bottom: 30px;
}

.search-results h1 span {
    color: var(--primary-color);
}

/* Cart Notification */
.cart-notification {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: var(--text-dark);
    color: white;
    padding: 15px 25px;
    border-radius: 8px;
    box-shadow: var(--shadow-lg);
    transform: translateY(100px);
    opacity: 0;
    transition: all 0.3s;
    z-index: 10000;
}

.cart-notification.show {
    transform: translateY(0);
    opacity: 1;
}

/* Footer */
.footer {
    background: var(--text-dark);
    color: white;
    padding: 60px 0 30px;
    margin-top: 60px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 40px;
    margin-bottom: 40px;
}

.footer-section h4 {
    font-size: 18px;
    margin-bottom: 20px;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 12px;
}

.footer-section ul a {
    color: rgba(255, 255, 255, 0.7);
    transition: color 0.3s;
}

.footer-section ul a:hover {
    color: white;
}

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.5);
}

/* User Menu */
.user-menu {
    position: relative;
}

.user-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background: var(--bg-white);
    border-radius: 8px;
    box-shadow: var(--shadow-lg);
    min-width: 200px;
    display: none;
    z-index: 1000;
}

.user-menu:hover .user-dropdown {
    display: block;
}

.user-dropdown a {
    display: block;
    padding: 12px 20px;
    transition: background 0.3s;
}

.user-dropdown a:hover {
    background: var(--bg-light);
}

/* Responsive */
@media (max-width: 992px) {
    .header-main .container {
        flex-wrap: wrap;
    }

    .search-box {
        order: 3;
        max-width: 100%;
        margin-top: 15px;
    }

    .cart-container,
    .checkout-container {
        grid-template-columns: 1fr;
    }

    .product-detail {
        grid-template-columns: 1fr;
    }

    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .hero-content {
        flex-direction: column;
        text-align: center;
    }

    .hero-text h1 {
        font-size: 32px;
    }

    .nav-menu {
        flex-wrap: wrap;
        justify-content: center;
    }

    .footer-grid {
        grid-template-columns: 1fr;
    }

    .checkout-steps {
        flex-direction: column;
    }

    .checkout-step::after {
        display: none;
    }
}
