:root {
    /* Color palette */
    --primary: #f5a7a1;
    --primary-light: #ffd8cc;
    --primary-dark: #e48d71;
    --secondary: #355c7d;
    --secondary-light: #5d829f;
    --secondary-dark: #1a3c5c;
    --accent: #f67280;
    --accent-light: #f9a1ac;
    --accent-dark: #d3515e;
    --success: #66bb6a;
    --warning: #ffa726;
    --error: #ef5350;
    --background: #fffaf7;
    --surface: #ffffff;
    --text: #2c3e50;
    --text-light: #546e7a;
    --border: #e0e0e0;

    /* Spacing system */
    --space-xs: 4px;
    --space-sm: 8px;
    --space-md: 16px;
    --space-lg: 24px;
    --space-xl: 32px;
    --space-xxl: 48px;

    /* Border radius */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 16px;

    /* Shadows */
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 8px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 8px 16px rgba(0, 0, 0, 0.1);
    --shadow-3d: 0 10px 20px rgba(0, 0, 0, 0.08), 0 6px 6px rgba(0, 0, 0, 0.1);

    /* Typography */
    --font-heading: 'Poppins', sans-serif;
    --font-body: 'Open Sans', sans-serif;

    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
}

/* Dark mode variables */
.dark-mode {
    --primary: #f5a7a1;
    --primary-light: #8a5d57;
    --primary-dark: #ff9c96;
    --secondary: #5d829f;
    --secondary-light: #82a5c2;
    --secondary-dark: #355c7d;
    --accent: #f67280;
    --accent-light: #f9a1ac;
    --accent-dark: #d3515e;
    --success: #4caf50;
    --warning: #ff9800;
    --error: #f44336;
    --background: #121212;
    --surface: #1e1e1e;
    --text: #e0e0e0;
    --text-light: #b0b0b0;
    --border: #333333;

    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.2);
    --shadow-md: 0 4px 8px rgba(0, 0, 0, 0.25);
    --shadow-lg: 0 8px 16px rgba(0, 0, 0, 0.3);
    --shadow-3d: 0 10px 20px rgba(0, 0, 0, 0.4), 0 6px 6px rgba(0, 0, 0, 0.3);
}

/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    line-height: 1.5;
    color: var(--text);
    background-color: var(--background);
    overflow-x: hidden;
    transition: background-color var(--transition-normal), color var(--transition-normal);
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: var(--space-md);
}

p {
    margin-bottom: var(--space-md);
}

a {
    color: var(--secondary);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--secondary-dark);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

button {
    cursor: pointer;
    font-family: var(--font-body);
    border: none;
    background: none;
    outline: none;
    transition: all var(--transition-normal);
}

.container {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 var(--space-md);
}

/* Header styles */
.header {
    background-color: var(--surface);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 100;
    transition: all var(--transition-normal);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-md) 0;
}

.logo {
    display: flex;
    align-items: center;
}

.logo h1 {
    font-size: 1.5rem;
    margin-bottom: 0;
    color: var(--text);
}

.logo span {
    color: var(--accent);
}

.nav-links {
    display: flex;
    gap: var(--space-lg);
    list-style: none;
}

.nav-link {
    font-weight: 500;
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--accent);
    transition: width var(--transition-normal);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

.theme-toggle {
    font-size: 1.2rem;
    color: var(--text);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color var(--transition-fast);
}

.theme-toggle:hover {
    color: var(--accent);
}

.cart-icon {
    position: relative;
    font-size: 1.2rem;
    cursor: pointer;
    color: var(--text);
    transition: color var(--transition-fast);
}

.cart-icon:hover {
    color: var(--accent);
}

.cart-count {
    position: absolute;
    top: -8px;
    right: -8px;
    background-color: var(--accent);
    color: white;
    font-size: 0.7rem;
    font-weight: 600;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mobile-menu-btn {
    display: none;
    flex-direction: column;
    gap: 6px;
    width: 30px;
    height: 24px;
}

.mobile-menu-btn span {
    display: block;
    width: 100%;
    height: 2px;
    background-color: var(--text);
    transition: transform var(--transition-normal), opacity var(--transition-normal);
}

/* Hero section */
.hero {
    background: linear-gradient(to right, var(--primary-light), var(--background));
    padding: var(--space-xxl) 0;
    margin-bottom: var(--space-xl);
}

.hero-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-xl);
}

.hero-text {
    flex: 1;
}

.hero-text h2 {
    font-size: 2.5rem;
    color: var(--secondary-dark);
    margin-bottom: var(--space-md);
}

.hero-text p {
    font-size: 1.1rem;
    color: var(--text-light);
    margin-bottom: var(--space-lg);
}

.hero-img {
    flex: 1;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-3d);
    transform: perspective(1000px) rotateY(-5deg);
    transition: transform var(--transition-normal);
}

.hero-img:hover {
    transform: perspective(1000px) rotateY(0deg);
}

.hero-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-slow);
}

.hero-img:hover img {
    transform: scale(1.05);
}

/* Button styles */
.btn {
    display: inline-block;
    padding: var(--space-sm) var(--space-lg);
    border-radius: var(--radius-md);
    font-weight: 500;
    text-align: center;
    transition: all var(--transition-normal);
}

.btn-primary {
    background-color: var(--secondary);
    color: white;
    box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
    background-color: var(--secondary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-accent {
    background-color: var(--accent);
    color: white;
    box-shadow: var(--shadow-sm);
}

.btn-accent:hover {
    background-color: var(--accent-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-outline {
    border: 2px solid var(--secondary);
    color: var(--secondary);
}

.btn-outline:hover {
    background-color: var(--secondary);
    color: white;
    transform: translateY(-2px);
}

.btn-sm {
    padding: var(--space-xs) var(--space-md);
    font-size: 0.9rem;
}

.btn-lg {
    padding: var(--space-md) var(--space-xl);
    font-size: 1.1rem;
}

/* Products section */
.products {
    padding: var(--space-xl) 0;
}

.section-title {
    text-align: center;
    margin-bottom: var(--space-xl);
}

.section-title h2 {
    font-size: 2rem;
    color: var(--text);
    display: inline-block;
    position: relative;
}

.section-title h2::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background-color: var(--accent);
}

.section-title p {
    color: var(--text-light);
    font-size: 1.1rem;
    margin-top: var(--space-md);
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: var(--space-lg);
    margin-bottom: var(--space-xxl);
}

.product-card {
    background-color: var(--surface);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: all var(--transition-normal);
    transform: perspective(1000px) rotateX(0deg);
}

.product-card:hover {
    transform: perspective(1000px) rotateX(5deg) translateY(-8px);
    box-shadow: var(--shadow-3d);
}

.product-img {
    height: 200px;
    overflow: hidden;
    position: relative;
}

.product-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-normal);
}

.product-card:hover .product-img img {
    transform: scale(1.05);
}

.product-info {
    padding: var(--space-md);
}

.product-title {
    font-size: 1.2rem;
    margin-bottom: var(--space-sm);
    color: var(--text);
}

.product-price {
    font-weight: 600;
    color: var(--accent-dark);
    margin-bottom: var(--space-sm);
    font-size: 1.1rem;
}

.product-description {
    color: var(--text-light);
    font-size: 0.9rem;
    margin-bottom: var(--space-md);
    line-height: 1.4;
}

.product-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.quantity-control {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    overflow: hidden;
}

.quantity-btn {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--background);
    transition: all var(--transition-fast);
}

.quantity-btn:hover {
    background-color: var(--primary-light);
}

.quantity-input {
    width: 32px;
    text-align: center;
    border: none;
    background-color: transparent;
    color: var(--text);
    font-weight: 500;
}

.add-to-cart {
    padding: var(--space-xs) var(--space-md);
    background-color: var(--secondary);
    color: white;
    border-radius: var(--radius-md);
    font-weight: 500;
    transition: all var(--transition-normal);
}

.add-to-cart:hover {
    background-color: var(--secondary-dark);
    transform: translateY(-2px);
}

/* Features Section */
.features {
    padding: var(--space-xl) 0;
    background-color: var(--primary-light);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--space-lg);
}

.feature-card {
    background-color: var(--surface);
    padding: var(--space-lg);
    border-radius: var(--radius-md);
    text-align: center;
    box-shadow: var(--shadow-md);
    transition: transform var(--transition-normal), box-shadow var(--transition-normal);
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.feature-icon {
    font-size: 2rem;
    color: var(--accent);
    margin-bottom: var(--space-md);
}

.feature-card h3 {
    font-size: 1.2rem;
    margin-bottom: var(--space-sm);
    color: var(--text);
}

.feature-card p {
    color: var(--text-light);
    font-size: 0.9rem;
    margin-bottom: 0;
}

/* Footer styles */
.footer {
    background-color: var(--secondary-dark);
    color: white;
    padding: var(--space-xl) 0 var(--space-md);
}

.footer-content {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-xl);
    margin-bottom: var(--space-xl);
}

.footer-logo {
    flex: 1;
    min-width: 250px;
}

.footer-logo h2 {
    font-size: 1.5rem;
    margin-bottom: var(--space-sm);
    color: white;
}

.footer-logo span {
    color: var(--accent-light);
}

.footer-logo p {
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 0;
}

.footer-links {
    flex: 2;
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-xl);
}

.footer-column {
    flex: 1;
    min-width: 160px;
}

.footer-column h3 {
    font-size: 1.1rem;
    margin-bottom: var(--space-md);
    color: white;
}

.footer-column ul {
    list-style: none;
}

.footer-column ul li {
    margin-bottom: var(--space-sm);
}

.footer-column ul li a {
    color: rgba(255, 255, 255, 0.7);
    transition: color var(--transition-fast);
}

.footer-column ul li a:hover {
    color: white;
}

.footer-column ul li i {
    margin-right: var(--space-sm);
    color: var(--accent-light);
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: var(--space-md);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.social-icons {
    display: flex;
    gap: var(--space-md);
}

.social-icons a {
    color: rgba(255, 255, 255, 0.7);
    font-size: 1.2rem;
    transition: color var(--transition-fast);
}

.social-icons a:hover {
    color: white;
}

/* Cart sidebar */
.cart-sidebar {
    position: fixed;
    top: 0;
    right: -400px;
    width: 380px;
    height: 100vh;
    background-color: var(--surface);
    box-shadow: var(--shadow-lg);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    transition: right var(--transition-normal);
}

.cart-sidebar.active {
    right: 0;
}

.cart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-md);
    border-bottom: 1px solid var(--border);
}

.cart-header h3 {
    margin-bottom: 0;
    font-size: 1.3rem;
}

.close-cart {
    font-size: 1.2rem;
    color: var(--text);
}

.close-cart:hover {
    color: var(--accent);
}

.cart-items {
    flex: 1;
    overflow-y: auto;
    padding: var(--space-md);
}

.cart-item {
    display: flex;
    gap: var(--space-md);
    padding: var(--space-md) 0;
    border-bottom: 1px solid var(--border);
}

.cart-item-img {
    width: 80px;
    height: 80px;
    border-radius: var(--radius-sm);
    overflow: hidden;
}

.cart-item-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cart-item-details {
    flex: 1;
}

.cart-item-title {
    font-weight: 500;
    margin-bottom: var(--space-xs);
    color: var(--text);
}

.cart-item-price {
    color: var(--accent-dark);
    font-weight: 600;
    margin-bottom: var(--space-xs);
}

.cart-item-controls {
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

.cart-quantity {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
}

.cart-quantity-btn {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--background);
    border-radius: var(--radius-sm);
}

.cart-quantity-value {
    width: 20px;
    text-align: center;
}

.cart-item-remove {
    color: var(--error);
    font-size: 0.9rem;
}

.cart-footer {
    padding: var(--space-md);
    border-top: 1px solid var(--border);
}

.cart-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-md);
    font-size: 1.1rem;
    font-weight: 600;
}

.btn-checkout {
    width: 100%;
}

.empty-cart {
    text-align: center;
    padding: var(--space-xl) 0;
    color: var(--text-light);
}

.empty-cart i {
    font-size: 3rem;
    margin-bottom: var(--space-md);
    color: var(--border);
}

.empty-cart p {
    margin-bottom: var(--space-sm);
}

/* Overlay */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--transition-normal), visibility var(--transition-normal);
}

.overlay.active {
    opacity: 1;
    visibility: visible;
}