/* MySpaPerks - Modern Stylesheet */

:root {
    --primary: #7c3aed;
    --primary-dark: #6d28d9;
    --primary-light: #a78bfa;
    --secondary: #ec4899;
    --secondary-dark: #db2777;
    --accent: #f97316;
    --accent-dark: #ea580c;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --gray-50: #fafafa;
    --gray-100: #f4f4f5;
    --gray-200: #e4e4e7;
    --gray-300: #d4d4d8;
    --gray-400: #a1a1aa;
    --gray-500: #71717a;
    --gray-600: #52525b;
    --gray-700: #3f3f46;
    --gray-800: #27272a;
    --gray-900: #18181b;
    /* Squared, premium look: small radius for buttons/inputs, slightly more for cards */
    --radius-btn: 4px;
    --radius: 6px;
    --radius-lg: 8px;
    --shadow: 0 1px 3px rgba(0,0,0,0.08);
    --shadow-lg: 0 4px 20px rgba(0,0,0,0.1);
    --touch-min: 44px;
}

/* Accessibility */
.skip-link {
    position: absolute;
    top: -3.5rem;
    left: 0.5rem;
    z-index: 9999;
    padding: 0.75rem 1rem;
    background: var(--primary);
    color: white;
    font-weight: 600;
    text-decoration: none;
    border-radius: var(--radius-btn);
    transition: top 0.2s;
}
.skip-link:focus {
    top: 0.5rem;
    outline: 3px solid var(--accent);
    outline-offset: 2px;
}
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    white-space: nowrap;
    border: 0;
}
*:focus {
    outline: none;
}
*:focus-visible {
    outline: 3px solid var(--primary);
    outline-offset: 2px;
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--gray-800);
    background-color: var(--gray-50);
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
}

h1 { font-size: 3rem; }
h2 { font-size: 2.25rem; }
h3 { font-size: 1.875rem; }
h4 { font-size: 1.5rem; }
h5 { font-size: 1.25rem; }
h6 { font-size: 1.125rem; }

p {
    margin-bottom: 1rem;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: color 0.3s;
}

a:hover {
    color: var(--primary-dark);
}

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

/* Buttons - squared, touch-friendly (Step 1: modern look) */
.btn {
    display: inline-block;
    padding: 0.75rem 1.25rem;
    min-height: var(--touch-min);
    min-width: var(--touch-min);
    font-size: 1rem;
    font-weight: 600;
    text-align: center;
    border: none;
    border-radius: var(--radius-btn);
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    text-decoration: none;
}

.btn-primary {
    background: #1c94c4;
    color: white;
}

.btn-primary:hover {
    background: #1678a3;
    transform: translateY(-1px);
    box-shadow: var(--shadow-lg);
}

.btn-secondary {
    background-color: var(--gray-200);
    color: var(--gray-800);
}

.btn-secondary:hover {
    background-color: var(--gray-300);
}

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

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

/* Cards - slight round for softness, squared feel */
.card {
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    transition: box-shadow 0.3s;
}

.card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Grid */
.grid {
    display: grid;
    gap: 1.5rem;
}

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

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

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

@media (max-width: 768px) {
    .grid-2, .grid-3, .grid-4 {
        grid-template-columns: 1fr;
    }
}

/* Badges - squared to match buttons */
.badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    font-size: 0.875rem;
    font-weight: 600;
    border-radius: var(--radius-btn);
}

.badge-success {
    background-color: #d1fae5;
    color: #065f46;
}

.badge-warning {
    background-color: #fef3c7;
    color: #92400e;
}

.badge-danger {
    background-color: #fee2e2;
    color: #991b1b;
}

.badge-secondary {
    background-color: var(--gray-200);
    color: var(--gray-700);
}

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

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--gray-700);
}

.form-control {
    width: 100%;
    padding: 0.75rem;
    font-size: 1rem;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius-btn);
    transition: border-color 0.3s, box-shadow 0.3s;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(147, 51, 234, 0.1);
}

textarea.form-control {
    resize: vertical;
    min-height: 120px;
}

select.form-control {
    appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 0.5rem center;
    background-repeat: no-repeat;
    background-size: 1.5em 1.5em;
    padding-right: 2.5rem;
}

/* Site header & nav (for-spas + reusable) */
.site-header {
    background: white;
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 100;
}
.site-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 0;
    gap: 1rem;
}
.site-logo {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--gray-900);
    text-decoration: none;
}
.site-logo:hover { color: var(--primary); }
.nav-menu {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.25rem;
    list-style: none;
    margin: 0;
    padding: 0;
}
.nav-menu a {
    display: block;
    padding: 0.5rem 0.75rem;
    color: var(--gray-700);
    text-decoration: none;
    border-radius: var(--radius-btn);
    min-height: var(--touch-min);
    min-width: var(--touch-min);
    box-sizing: border-box;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.nav-menu a:hover, .nav-menu .nav-current { color: var(--primary); font-weight: 600; }
.nav-toggle {
    display: none;
    width: var(--touch-min);
    height: var(--touch-min);
    padding: 0;
    border: none;
    background: var(--gray-100);
    border-radius: var(--radius-btn);
    cursor: pointer;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
}
.nav-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--gray-700);
}
@media (max-width: 768px) {
    .nav-toggle { display: flex; }
    .nav-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: white;
        box-shadow: var(--shadow-lg);
        padding: 1rem;
        flex-direction: column;
    }
    .nav-menu.is-open { display: flex; }
}

/* Hero Section */
.hero {
    background: #000000;
    color: white;
    padding: 4rem 0 5rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: transparent;
}

.hero-content {
    position: relative;
    z-index: 1;
}

.hero-tagline {
    font-size: 1rem;
    max-width: 42ch;
    margin: 0 auto 1.5rem;
    opacity: 0.95;
}

.hero-search {
    max-width: 600px;
    margin: 0 auto;
}
.hero-search .search-wrap {
    display: flex;
    gap: 0.5rem;
    align-items: stretch;
    position: relative;
}
.hero-search .search-input {
    flex: 1;
    padding-left: 2.75rem;
    padding-right: 1rem;
    min-height: var(--touch-min);
}
.hero-search .search-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    color: var(--gray-400);
    pointer-events: none;
}

/* Hero actions: Deals, Login, Admin – centered below search, mobile-friendly */
.hero-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 0.75rem;
    margin-top: 1.5rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}
.hero-actions .btn {
    min-height: var(--touch-min);
    min-width: var(--touch-min);
    padding: 0.75rem 1.25rem;
}

.hero h1 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    animation: fadeInDown 0.6s;
}

.hero p {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

/* Animations */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in {
    animation: fadeInDown 0.6s ease-out;
}

/* Utilities */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

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

.p-1 { padding: 0.5rem; }
.p-2 { padding: 1rem; }
.p-3 { padding: 1.5rem; }
.p-4 { padding: 2rem; }

.shadow { box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1); }
.shadow-lg { box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15); }

.rounded { border-radius: var(--radius); }
.rounded-lg { border-radius: var(--radius-lg); }
.rounded-full { border-radius: 9999px; }

/* Admin Styles */
.admin-header {
    background: white;
    border-bottom: 1px solid var(--gray-200);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.admin-sidebar {
    background: white;
    border-right: 1px solid var(--gray-200);
    min-height: calc(100vh - 60px);
    padding: 1.5rem;
    width: 250px;
}

.admin-nav a {
    display: block;
    padding: 0.75rem 1rem;
    color: var(--gray-700);
    border-radius: var(--radius-btn);
    margin-bottom: 0.5rem;
    transition: all 0.3s;
}

.admin-nav a:hover,
.admin-nav a.active {
    background-color: var(--primary);
    color: white;
}

/* For-spas page */
.section-pad { padding: 3rem 0; }
.section-title { text-align: center; margin-bottom: 2rem; }
/* For-spas page - match site look and feel */
.page-for-spas { background: #f1f5f9; }

.for-spas-hero {
    background: #1c94c4;
    color: white;
    padding: 4rem 0;
    text-align: center;
}
.for-spas-hero h1 { color: white; margin-bottom: 1rem; }
.for-spas-hero p { opacity: 0.95; max-width: 42ch; margin-left: auto; margin-right: auto; }
.cta-buttons { display: flex; flex-wrap: wrap; gap: 1rem; justify-content: center; margin-top: 2rem; }
.benefits-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}
.benefit-card h3 { display: flex; align-items: center; gap: 0.5rem; }
.benefit-icon { font-size: 1.25rem; }
.ux-guide-heading { text-align: center; margin-bottom: 1rem; }
.ux-guide-intro { text-align: center; max-width: 40rem; margin: 0 auto 2rem; color: var(--gray-600); }
.ux-guide-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.5rem;
}
.ux-guide-block {
    padding: 1.5rem;
    background: #ffffff;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
}
.ux-guide-block h3 { margin-bottom: 0.75rem; font-size: 1.125rem; }
.ux-guide-block ul { margin: 0; padding-left: 1.25rem; }
.ux-guide-block li { margin-bottom: 0.5rem; }
.cta-section {
    text-align: center;
    background: #e0f2fe;
    border: 1px solid #bae6fd;
}
.cta-section h2 { margin-bottom: 0.5rem; }
.cta-section p { margin-bottom: 1.5rem; color: var(--gray-600); }
.site-footer {
    background: var(--gray-900);
    color: white;
    padding: 3rem 0 1.5rem;
}
.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}
.footer-section h3 { font-size: 1rem; margin-bottom: 0.75rem; color: white; }
.footer-section ul { list-style: none; margin: 0; padding: 0; }
.footer-section a { color: var(--gray-300); text-decoration: none; }
.footer-section a:hover { color: white; }
.footer-bottom { text-align: center; padding-top: 1.5rem; border-top: 1px solid var(--gray-700); color: var(--gray-400); font-size: 0.875rem; }

/* Homepage footer (centered CTA + stats) */
.site-footer .footer-heading { margin-bottom: 0.5rem; text-align: center; }
.site-footer .footer-tagline { color: var(--gray-300); margin-bottom: 2rem; text-align: center; }
.site-footer .footer-stats { display: flex; flex-wrap: wrap; justify-content: center; gap: 2rem; }
.site-footer .footer-stat { text-align: center; }
.site-footer .footer-stat-num { display: block; font-size: 2rem; font-weight: 700; }
.site-footer .footer-stat-label { font-size: 0.875rem; color: var(--gray-300); }

/* Modal */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}
.modal-overlay[hidden] { display: none !important; }
.modal-card {
    max-width: 500px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
}
.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}
.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
    padding: 0.25rem;
    min-width: var(--touch-min);
    min-height: var(--touch-min);
    color: var(--gray-600);
}
.modal-close:hover { color: var(--gray-900); }

/* Deals banner (homepage) */
.deals-banner {
    background: linear-gradient(145deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
}
.deals-banner-title { text-align: center; margin-bottom: 0.5rem; color: white; }
.deals-banner-subtitle { text-align: center; margin-bottom: 2rem; opacity: 0.95; }
.deals-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}
.deal-card { background: white; color: var(--gray-800); }
.deal-card-img { width: 100%; height: 200px; object-fit: cover; border-radius: var(--radius); margin-bottom: 1rem; }
.deal-card-title { margin-bottom: 0.5rem; font-size: 1.25rem; }
.deal-card-business { color: var(--gray-600); font-size: 0.875rem; margin-bottom: 0.5rem; }
.deal-card-price { display: flex; align-items: center; flex-wrap: wrap; gap: 0.75rem; margin-bottom: 1rem; }
.deal-price-now { font-size: 1.5rem; color: var(--primary); }
.deal-price-was { text-decoration: line-through; color: var(--gray-400); }
.deals-cta-wrap { text-align: center; margin-top: 2rem; }
.btn-block { width: 100%; display: block; text-align: center; }

/* Responsive */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 2.5rem;
    }
    
    .admin-sidebar {
        width: 100%;
        min-height: auto;
    }
}

