/* ===========================
   Winsurf eMarket - Base CSS
   =========================== */

/* Reset */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

ul {
    list-style: none;
}

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

img {
    max-width: 100%;
    display: block;
}

button {
    cursor: pointer;
    font-family: inherit;
}

/* Design Tokens */
:root {
    --primary: #e74c3c;
    --primary-dark: #c0392b;
    --secondary: #2c3e50;
    --accent: #f39c12;
    --success: #27ae60;
    --info: #3498db;

    --bg: #f5f5f5;
    --surface: #ffffff;
    --surface-2: #f9f9f9;
    --border: #e0e0e0;

    --text: #333333;
    --text-muted: #777777;
    --text-light: #aaaaaa;

    --font: 'Inter', -apple-system, sans-serif;
    --font-heading: 'Poppins', -apple-system, sans-serif;

    --radius: 4px;
    --radius-lg: 8px;
    --shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.12);
    --transition: 0.25s ease;
}

body {
    font-family: var(--font);
    font-size: 14px;
    color: var(--text);
    background: var(--bg);
    line-height: 1.6;
    overflow-x: hidden;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.3;
}

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

/* Body content shell: slightly wider than header container */
.body-shell {
    max-width: 1280px;
    margin: 0 auto;
    padding-left: 10px;
    padding-right: 10px;
}

/* Grid */
.legacy-row {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -10px;
}

[class^="legacy-col-"] {
    padding: 0 10px;
}

.legacy-col-2 {
    width: 16.6667%;
}

.legacy-col-3 {
    width: 25%;
}

.legacy-col-4 {
    width: 33.3333%;
}

.legacy-col-6 {
    width: 50%;
}

.legacy-col-8 {
    width: 66.6667%;
}

.legacy-col-9 {
    width: 75%;
}

.legacy-col-12 {
    width: 100%;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 20px;
    border-radius: var(--radius);
    font-size: 13px;
    font-weight: 600;
    border: none;
    transition: var(--transition);
    white-space: nowrap;
}

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

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(231, 76, 60, 0.3);
}

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

.btn-secondary:hover {
    background: #34495e;
}

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

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

.btn-icon {
    background: #f5f5f5;
    color: #333;
    padding: 8px 10px;
}

.btn-icon:hover {
    background: var(--primary);
    color: #fff;
}

.btn-sm {
    padding: 7px 14px;
    font-size: 12px;
}

/* Badges */
.badge {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 3px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
}

.badge-sale {
    background: var(--primary);
    color: #fff;
}

.badge-new {
    background: var(--success);
    color: #fff;
}

.badge-hot {
    background: var(--accent);
    color: #fff;
}

/* Section Titles */
.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--primary);
}

.section-header h2 {
    font-size: 18px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    position: relative;
}

.section-header h2::before {
    content: '';
    position: absolute;
    left: 0;
    bottom: -14px;
    width: 40px;
    height: 2px;
    background: var(--primary);
}

.section-header a {
    font-size: 12px;
    color: var(--primary);
}

.section-header a:hover {
    text-decoration: underline;
}

/* Tabs */
.tab-nav {
    display: flex;
    gap: 0;
    border-bottom: 2px solid var(--primary);
    margin-bottom: 20px;
}

.tab-btn {
    padding: 10px 20px;
    font-size: 13px;
    font-weight: 600;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-muted);
    transition: var(--transition);
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
}

.tab-btn.active,
.tab-btn:hover {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* Cards */
.card {
    background: var(--surface);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    overflow: hidden;
    transition: var(--transition);
}

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

/* Utility */
.text-center {
    text-align: center;
}

.text-primary {
    color: var(--primary);
}

.text-muted {
    color: var(--text-muted);
}

.mt-20 {
    margin-top: 20px;
}

.mb-20 {
    margin-bottom: 20px;
}

.section-gap {
    padding: 40px 0;
}

.divider {
    border: none;
    border-top: 1px solid var(--border);
    margin: 0;
}

/* Star Rating */
.rating {
    display: flex;
    gap: 2px;
    color: var(--accent);
    font-size: 12px;
}

/* Responsive */
@media (max-width: 992px) {

    .legacy-col-3,
    .legacy-col-4 {
        width: 50%;
    }
}

@media (max-width: 600px) {

    .legacy-col-2,
    .legacy-col-3,
    .legacy-col-4,
    .legacy-col-6,
    .legacy-col-8,
    .legacy-col-9 {
        width: 100%;
    }
}

/* Toast Notification */
.toast {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: #333;
    color: #fff;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    transform: translateY(100px);
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.22, 1, 0.36, 1);
    z-index: 9999;
}

.toast.show {
    transform: translateY(0);
    opacity: 1;
}

/* Loader */
.loader {
    width: 48px;
    height: 48px;
    border: 5px solid var(--border);
    border-bottom-color: var(--primary);
    border-radius: 50%;
    display: inline-block;
    box-sizing: border-box;
    animation: rotation 1s linear infinite;
}

@keyframes rotation {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}
