/**
 * Will Raglan - Foundation Styles
 * Base styles, variables, and utilities
 */

/* CSS Variables */
:root {
    /* Colors */
    --color-primary: #1a1a2e;
    --color-secondary: #d4a574;
    --color-accent: #f5e6e0;
    --color-background: #faf7f2;
    --color-white: #ffffff;
    --color-text: #333333;
    --color-text-light: #666666;
    --color-border: #e5e5e5;
    --color-error: #dc3545;
    --color-success: #28a745;
    
    /* Typography */
    --font-heading: 'DM Serif Display', Georgia, serif;
    --font-body: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    
    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 1.5rem;
    --spacing-lg: 2rem;
    --spacing-xl: 3rem;
    --spacing-xxl: 5rem;
    
    /* Container */
    --container-max: 1400px;
    --container-padding: 2rem;
    
    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
}

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

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    font-size: 1rem;
    line-height: 1.6;
    color: var(--color-text);
    background-color: var(--color-background);
}

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

a {
    color: inherit;
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--color-secondary);
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 400;
    line-height: 1.2;
    margin-bottom: var(--spacing-sm);
}

h1 { font-size: 3rem; }
h2 { font-size: 2.5rem; }
h3 { font-size: 2rem; }
h4 { font-size: 1.5rem; }
h5 { font-size: 1.25rem; }
h6 { font-size: 1rem; }

p {
    margin-bottom: var(--spacing-sm);
}

/* Container */
.container-a7x {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--container-padding);
}

/* Buttons */
.btn-a7x {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.875rem 2rem;
    font-family: var(--font-body);
    font-size: 0.875rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border: none;
    cursor: pointer;
    transition: all var(--transition-fast);
}

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

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

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

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

/* Form Elements */
.input-a7x {
    width: 100%;
    padding: 0.75rem 1rem;
    font-family: var(--font-body);
    font-size: 1rem;
    border: 1px solid var(--color-border);
    background-color: var(--color-white);
    transition: border-color var(--transition-fast);
}

.input-a7x:focus {
    outline: none;
    border-color: var(--color-secondary);
}

.select-a7x {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23333' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 2.5rem;
}

/* Utility Classes */
.text-center-a7x { text-align: center; }
.text-right-a7x { text-align: right; }
.text-uppercase-a7x { text-transform: uppercase; }
.text-small-a7x { font-size: 0.875rem; }
.text-large-a7x { font-size: 1.125rem; }

.mt-a7x { margin-top: var(--spacing-md); }
.mb-a7x { margin-bottom: var(--spacing-md); }
.pt-a7x { padding-top: var(--spacing-md); }
.pb-a7x { padding-bottom: var(--spacing-md); }

.hidden-a7x { display: none !important; }
.sr-only-a7x {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

/* Grid */
.grid-a7x {
    display: grid;
    gap: var(--spacing-md);
}

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

/* Flex */
.flex-a7x { display: flex; }
.flex-column-a7x { flex-direction: column; }
.flex-wrap-a7x { flex-wrap: wrap; }
.items-center-a7x { align-items: center; }
.justify-between-a7x { justify-content: space-between; }
.justify-center-a7x { justify-content: center; }
.gap-a7x { gap: var(--spacing-md); }

/* Cart Toast Notification - Side slide-in */
.cart-toast-a7x {
    position: fixed;
    top: 50%;
    right: 0;
    transform: translate(100%, -50%);
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem 1.5rem;
    background: var(--color-white);
    border-left: 4px solid var(--color-success);
    box-shadow: 0 10px 40px rgba(0,0,0,0.15);
    border-radius: 8px 0 0 8px;
    z-index: 9999;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    min-width: 280px;
}

.cart-toast-a7x.show {
    transform: translate(0, -50%);
}

.cart-toast-a7x svg {
    flex-shrink: 0;
    color: var(--color-success);
}

.cart-toast-a7x span {
    font-family: var(--font-body);
    font-size: 0.95rem;
    color: var(--color-text);
    font-weight: 500;
}

.cart-toast-error-a7x {
    border-left-color: var(--color-error);
}

.cart-toast-error-a7x svg {
    color: var(--color-error);
}

/* Old notification - keep for compatibility */
.notification-a7x {
    position: fixed;
    top: 1rem;
    right: 1rem;
    padding: 1rem 1.5rem;
    background-color: var(--color-success);
    color: var(--color-white);
    border-radius: 4px;
    z-index: 9999;
    animation: slideIn-a7x 0.3s ease;
}

.notification-error-a7x {
    background-color: var(--color-error);
}

@keyframes slideIn-a7x {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Loading */
.loading-a7x {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid var(--color-border);
    border-top-color: var(--color-secondary);
    border-radius: 50%;
    animation: spin-a7x 0.8s linear infinite;
}

@keyframes spin-a7x {
    to { transform: rotate(360deg); }
}

/* Responsive */
@media (max-width: 768px) {
    :root {
        --container-padding: 1rem;
    }
    
    h1 { font-size: 2rem; }
    h2 { font-size: 1.75rem; }
    h3 { font-size: 1.5rem; }
    
    .grid-2-a7x,
    .grid-3-a7x,
    .grid-4-a7x {
        grid-template-columns: 1fr;
    }
}
