:root {
    --primary-color: #0b4a99;
    --primary-light: #0d6efd;
    --bg-color: #f4f7f6;
    --card-bg: #ffffff;
    --text-dark: #333333;
    --text-light: #777777;
    --white: #ffffff;
    --border-radius: 12px;
    --transition: 0.3s ease;
    --shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    --shadow-hover: 0 8px 25px rgba(0, 0, 0, 0.15);
}

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

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-dark);
    padding-bottom: 50px;
}

/* Header */
header {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    color: var(--white);
    padding: 20px 15px 0 15px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding-bottom: 20px;
}

header h1 {
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: 1px;
}

.cart-icon {
    font-size: 1.5rem;
    cursor: pointer;
    position: relative;
    transition: transform var(--transition);
}

.cart-icon:hover {
    transform: scale(1.1);
}

#cart-count {
    position: absolute;
    top: -8px;
    right: -10px;
    background-color: #ff4757;
    color: white;
    font-size: 0.75rem;
    font-weight: bold;
    padding: 2px 6px;
    border-radius: 50%;
    border: 2px solid var(--primary-light);
}

/* Tabs */
#tabs-container {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    max-width: 1200px;
    margin: 0 auto;
    scrollbar-width: none; /* Firefox */
}
#tabs-container::-webkit-scrollbar {
    display: none; /* Chrome */
}

.tab {
    padding: 10px 20px;
    background: rgba(255,255,255,0.2);
    border: none;
    color: var(--white);
    font-weight: 600;
    border-radius: 8px 8px 0 0;
    cursor: pointer;
    white-space: nowrap;
    transition: var(--transition);
}

.tab.active {
    background: var(--bg-color);
    color: var(--primary-color);
}

/* Catalog Grid */
#catalog-container {
    max-width: 1200px;
    margin: 30px auto;
    padding: 0 15px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 15px;
}

@media (min-width: 768px) {
    #catalog-container {
        grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
        gap: 25px;
    }
}

.card {
    background: var(--card-bg);
    border-radius: var(--border-radius);
    padding: 10px;
    box-shadow: var(--shadow);
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    align-items: center;
}

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

.card img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    object-fit: contain;
}

.card .codigo {
    margin-top: 12px;
    font-size: 1rem;
    font-weight: 800;
    color: var(--primary-color);
    text-transform: uppercase;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: var(--white);
    width: 90%;
    max-width: 600px;
    border-radius: var(--border-radius);
    box-shadow: 0 15px 35px rgba(0,0,0,0.3);
    position: relative;
    overflow: hidden;
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from { transform: translateY(50px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.close-btn {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 28px;
    font-weight: bold;
    color: var(--text-dark);
    cursor: pointer;
    z-index: 10;
    transition: var(--transition);
}

.close-btn:hover {
    color: #ff4757;
}

.modal-body {
    display: flex;
    flex-direction: column;
}

@media (min-width: 768px) {
    .modal-body {
        flex-direction: row;
    }
    .image-wrapper {
        flex: 1;
        background: #f8f8f8;
        display: flex;
        align-items: center;
        padding: 20px;
    }
    .product-info {
        flex: 1;
    }
}

.image-wrapper {
    width: 100%;
    max-height: 300px;
    overflow: hidden;
    display: flex;
    justify-content: center;
    background: #f8f8f8;
    padding: 15px;
}

.image-wrapper img, .image-wrapper video {
    height: 100%;
    max-height: 270px;
    object-fit: contain;
}

.product-info {
    padding: 20px;
    display: flex;
    flex-direction: column;
}

#modal-title {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.size-selector h3 {
    font-size: 1rem;
    color: var(--text-light);
    margin-bottom: 10px;
}

.sizes-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 25px;
}

.size-input-group {
    display: flex;
    flex-direction: column;
}

.size-input-group label {
    font-weight: 600;
    margin-bottom: 5px;
    color: var(--text-dark);
}

.number-control {
    display: flex;
    align-items: center;
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
}

.number-control button {
    background: #f0f0f0;
    border: none;
    width: 35px;
    height: 35px;
    font-size: 1.2rem;
    cursor: pointer;
    transition: 0.2s;
}

.number-control button:hover {
    background: #e0e0e0;
}

.number-control input {
    width: 100%;
    height: 35px;
    text-align: center;
    border: none;
    font-weight: 600;
    -moz-appearance: textfield;
}

.number-control input::-webkit-outer-spin-button,
.number-control input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.add-to-cart-btn {
    background: var(--primary-color);
    color: var(--white);
    border: none;
    padding: 15px;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    transition: var(--transition);
    width: 100%;
    margin-top: auto;
}

.add-to-cart-btn:hover {
    background: var(--primary-light);
    transform: translateY(-2px);
}

/* Variant Selector (Strass) */
.variant-selector {
    margin-bottom: 20px;
}
.variant-selector h3 {
    font-size: 1rem;
    color: var(--text-light);
    margin-bottom: 10px;
}
.variant-options {
    display: flex;
    gap: 10px;
}
.variant-option {
    cursor: pointer;
}
.variant-option input {
    display: none;
}
.variant-btn {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 10px 15px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-weight: 600;
    transition: 0.2s;
    color: var(--text-dark);
}
.variant-option input:checked + .variant-btn {
    border-color: var(--primary-color);
    background: #eef5ff;
    color: var(--primary-color);
}
.strass-icon {
    width: 20px;
    height: 20px;
    object-fit: contain;
}

/* Color Selector */
.color-options {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}
.color-option {
    cursor: pointer;
}
.color-option input {
    display: none;
}
.color-btn {
    display: inline-block;
    padding: 8px 12px;
    border: 3px solid transparent;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.9rem;
    transition: 0.2s;
    text-shadow: 0 1px 2px rgba(0,0,0,0.2);
}
.color-option input[value="Branco"] + .color-btn {
    color: var(--text-dark);
    text-shadow: none;
}
.color-option input:checked + .color-btn {
    transform: scale(1.05);
    border-color: var(--primary-color);
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}

.color-square {
    display: inline-block;
    width: 35px;
    height: 35px;
    border: 3px solid transparent;
    border-radius: 8px; /* Slightly rounded for premium feel, but still square-ish */
    transition: 0.2s;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}
.color-option input:checked + .color-square {
    transform: scale(1.15);
    border-color: var(--primary-color);
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}

/* Print Color Selector (Estampa) */
.print-color-options {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}
.print-color-option {
    cursor: pointer;
    text-align: center;
}
.print-color-option input {
    display: none;
}
.print-color-img {
    width: 60px;
    height: 60px;
    object-fit: contain;
    border: 3px solid transparent;
    border-radius: 50%;
    transition: 0.2s;
    padding: 2px;
}
.print-color-option input:checked + .print-color-img {
    border-color: var(--primary-color);
    transform: scale(1.1);
    background: #eef5ff;
}

/* Cart Drawer */
.cart-drawer {
    position: fixed;
    top: 0;
    right: -100%;
    width: 100%;
    max-width: 400px;
    height: 100vh;
    background: var(--white);
    box-shadow: -5px 0 15px rgba(0,0,0,0.1);
    z-index: 1002;
    transition: 0.4s ease;
    display: flex;
    flex-direction: column;
}

.cart-drawer.open {
    right: 0;
}

.cart-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 1001;
    backdrop-filter: blur(2px);
}

.cart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #eee;
}

.cart-header h2 {
    font-size: 1.5rem;
    color: var(--primary-color);
}

.close-cart {
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: var(--text-light);
}

.cart-items {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

.empty-cart-message {
    text-align: center;
    color: var(--text-light);
    margin-top: 50px;
    font-size: 1.1rem;
}

.cart-item {
    display: flex;
    align-items: center;
    border-bottom: 1px solid #eee;
    padding-bottom: 15px;
    margin-bottom: 15px;
}

.cart-item img {
    width: 60px;
    height: 60px;
    object-fit: contain;
    border-radius: 8px;
    margin-right: 15px;
    background: #f8f8f8;
}

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

.cart-item-title {
    font-weight: bold;
    color: var(--text-dark);
    margin-bottom: 5px;
}

.cart-item-sizes {
    font-size: 0.9rem;
    color: var(--text-light);
}

.remove-item {
    color: #ff4757;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.2rem;
    padding: 5px;
}

.cart-footer {
    padding: 20px;
    border-top: 1px solid #eee;
}

.checkout-btn {
    width: 100%;
    background: #25D366; /* WhatsApp Green */
    color: var(--white);
    border: none;
    padding: 15px;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
}

.checkout-btn:hover:not(:disabled) {
    background: #20b858;
}

.checkout-btn:disabled {
    background: #a5d6b4;
    cursor: not-allowed;
}
