/* ==================== COMMON.CSS ==================== */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
    --primary-color: #4F46E5; /* Indigo 600 */
    --primary-hover: #4338CA;
    --secondary-color: #10B981; /* Emerald 500 */
    --bg-color: #F3F4F6; /* Gray 100 */
    --surface-color: #FFFFFF;
    --text-main: #111827; /* Gray 900 */
    --text-muted: #6B7280; /* Gray 500 */
    --border-color: #E5E7EB;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
}

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    line-height: 1.5;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* Forms */
.form-group {
    margin-bottom: 1.25rem;
}

.form-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: #374151;
}

.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    font-size: 0.875rem;
    transition: all 0.2s;
    background-color: #F9FAFB;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
    background-color: #FFFFFF;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 500;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    text-decoration: none;
}

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

.btn-primary:hover {
    background-color: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.form-footer {
    margin-top: 1.5rem;
    text-align: center;
    font-size: 0.875rem;
}

.form-footer a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
}

.form-footer a:hover {
    text-decoration: underline;
}

/* Generic Cards */
.card {
    background: var(--surface-color);
    border-radius: 1rem;
    box-shadow: var(--shadow-md);
    padding: 1.5rem;
}

.card-header {
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 1rem;
    margin-bottom: 1.5rem;
}

.card-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-main);
}

/* Form layout utils */
.form-row {
    display: flex;
    gap: 1rem;
}

.form-row .half {
    flex: 1;
}

.form-hint {
    display: block;
    margin-top: 0.25rem;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

.badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 500;
}

.badge-platform {
    background-color: #E0E7FF;
    color: #4338CA;
}

/* Alerts */
.alert {
    padding: 1rem;
    border-radius: 0.5rem;
    margin-bottom: 1.5rem;
    font-size: 0.875rem;
}

.alert-error {
    background-color: #FEF2F2;
    color: #991B1B;
    border: 1px solid #F87171;
}

.alert-success {
    background-color: #ECFDF5;
    color: #065F46;
    border: 1px solid #34D399;
}

/* Products Grid (Used in Dashboard and Index) */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
}

.product-card {
    background: #FFFFFF;
    border: 1px solid var(--border-color);
    border-radius: 0.75rem;
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex;
    flex-direction: column;
}

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

.product-img {
    height: 180px;
    background-color: #F9FAFB;
    position: relative;
    border-bottom: 1px solid var(--border-color);
}

.product-img img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 0.5rem;
}

.img-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 0.875rem;
    font-weight: 500;
}

.badge-float {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background-color: rgba(255, 255, 255, 0.9);
    box-shadow: var(--shadow-sm);
}

.product-info {
    padding: 1.25rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.product-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-main);
    margin-bottom: 0.75rem;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-pricing {
    margin-bottom: 1.25rem;
    flex: 1;
}

.price-old {
    font-size: 0.875rem;
    color: var(--text-muted);
    text-decoration: line-through;
    margin-right: 0.5rem;
}

.price-new {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--secondary-color);
}

@media (max-width: 768px) {
    .form-row { flex-direction: column; gap: 0; }
    .products-grid { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
}
@media (max-width: 480px) {
    .container { padding: 0 .75rem; }
    .btn { padding: .65rem 1rem; font-size: .85rem; }
    .form-control { font-size: 1rem; }
    .products-grid { grid-template-columns: 1fr; gap: 1rem; }
    .product-img { height: 150px; }
}

/* Badges e Destaques de Produtos */
.coupon-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.78rem;
    font-weight: 700;
    color: #1E3A8A;
    background: #DBEAFE;
    border: 1px dashed #3B82F6;
    border-radius: 0.5rem;
    padding: 0.25rem 0.6rem;
    margin-bottom: 0.75rem;
    width: fit-content;
}

.additional-text {
    font-size: 0.8rem;
    font-weight: 600;
    color: #DC2626;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.shipping-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.78rem;
    font-weight: 600;
    color: #065F46;
    background: #D1FAE5;
    border: 1px solid #6EE7B7;
    border-radius: 0.5rem;
    padding: 0.25rem 0.6rem;
    margin-bottom: 0.75rem;
    width: fit-content;
}

/* ==================== UTILITY CLASSES ==================== */
.text-center { text-align: center !important; }
.text-left { text-align: left !important; }
.text-right { text-align: right !important; }

.d-flex { display: flex !important; }
.flex-column { flex-direction: column !important; }
.flex-wrap { flex-wrap: wrap !important; }
.align-items-center { align-items: center !important; }
.justify-content-center { justify-content: center !important; }
.justify-content-between { justify-content: space-between !important; }
.justify-content-end { justify-content: flex-end !important; }

.gap-1 { gap: 0.25rem !important; }
.gap-2 { gap: 0.5rem !important; }
.gap-3 { gap: 1rem !important; }
.gap-4 { gap: 1.5rem !important; }

.w-100 { width: 100% !important; }
.w-auto { width: auto !important; }
.h-100 { height: 100% !important; }
.flex-1 { flex: 1 1 0% !important; }

.m-0 { margin: 0 !important; }
.mt-1 { margin-top: 0.25rem !important; }
.mt-2 { margin-top: 0.5rem !important; }
.mt-3 { margin-top: 1rem !important; }
.mt-4 { margin-top: 1.5rem !important; }
.mt-5 { margin-top: 2rem !important; }

.mb-1 { margin-bottom: 0.25rem !important; }
.mb-2 { margin-bottom: 0.5rem !important; }
.mb-3 { margin-bottom: 1rem !important; }
.mb-4 { margin-bottom: 1.5rem !important; }
.mb-5 { margin-bottom: 2rem !important; }

.ml-auto { margin-left: auto !important; }
.mr-auto { margin-right: auto !important; }
.mx-auto { margin-left: auto !important; margin-right: auto !important; }

.p-0 { padding: 0 !important; }
.p-1 { padding: 0.25rem !important; }
.p-2 { padding: 0.5rem !important; }
.p-3 { padding: 1rem !important; }
.p-4 { padding: 1.5rem !important; }
.px-2 { padding-left: 0.5rem !important; padding-right: 0.5rem !important; }
.py-2 { padding-top: 0.5rem !important; padding-bottom: 0.5rem !important; }
.px-3 { padding-left: 1rem !important; padding-right: 1rem !important; }
.py-3 { padding-top: 1rem !important; padding-bottom: 1rem !important; }

.font-bold { font-weight: 700 !important; }
.font-semibold { font-weight: 600 !important; }
.font-medium { font-weight: 500 !important; }
.font-normal { font-weight: 400 !important; }

.text-muted { color: var(--text-muted) !important; }
.text-main { color: var(--text-main) !important; }
.text-primary { color: var(--primary-color) !important; }
.text-danger { color: #DC2626 !important; }
.text-success { color: #059669 !important; }

.bg-white { background-color: #FFFFFF !important; }
.bg-light { background-color: #F9FAFB !important; }
.bg-danger-light { background-color: #FEF2F2 !important; }
.bg-success-light { background-color: #ECFDF5 !important; }

.rounded-md { border-radius: 0.375rem !important; }
.rounded-lg { border-radius: 0.5rem !important; }
.rounded-xl { border-radius: 0.75rem !important; }

.border { border: 1px solid var(--border-color) !important; }
.border-b { border-bottom: 1px solid var(--border-color) !important; }
.border-collapse { border-collapse: collapse !important; }
.border-danger { border-color: #FCA5A5 !important; }

.cursor-pointer { cursor: pointer !important; }
.text-decoration-none { text-decoration: none !important; }
.d-none { display: none !important; }
.d-block { display: block !important; }
.d-inline-block { display: inline-block !important; }

