/* --- VARIABLES & RESET --- */
:root {
    --bg-color: #f5f5f7;
    --card-bg: #ffffff;
    --text-main: #1d1d1f;
    --text-secondary: #86868b;
    --accent: #0071e3;
    --radius: 18px;
    --shadow: 0 4px 20px rgba(0,0,0,0.08);
    --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; }

html { scroll-behavior: smooth; }
body { background-color: var(--bg-color); color: var(--text-main); padding-bottom: 120px; }

/* --- TYPOGRAPHY --- */
h1 { font-size: 3rem; font-weight: 700; letter-spacing: -0.02em; margin-bottom: 10px; }
h2 { font-size: 2rem; font-weight: 600; margin-bottom: 20px; }
p { color: var(--text-secondary); line-height: 1.5; }

/* --- HERO --- */
.hero {
    height: 80vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    background: #fff;
    padding: 20px;

    /* Background image with subtle overlay */
    background: url('../_static/hero.jpg') center/cover no-repeat;
}

.hero h1, .hero p {
    color: white; /* Makes sure the text is visible on dark/light backgrounds */
    text-shadow: 0 2px 6px rgba(0,0,0,0.5); /* subtle shadow for contrast */
}

.hero {
    position: relative; /* Needed to position the logo absolutely inside */
}

.hero-brand {
    position: absolute;
    top: 20px;
    left: 20px;
    display: flex;
    align-items: center;
    gap: 10px; /* Space between logo and name */
}

.hero-logo {
    height: 50px;
    width: auto;
}

.hero-name {
    font-size: 1.3rem;
    font-weight: 600;
    color: black;
}


.btn-primary {
    background-color: var(--accent); color: white; padding: 12px 24px; border-radius: 99px;
    text-decoration: none; font-size: 1rem; font-weight: 500; transition: var(--transition); border: none; cursor: pointer;
}
.btn-primary:hover { transform: scale(1.05); background-color: #005bb5; }

/* --- GRID --- */
.container { max-width: 1000px; margin: 0 auto; padding: 60px 20px; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 20px; }

/* --- CARDS --- */
.card {
    background: var(--card-bg); border-radius: var(--radius); padding: 25px;
    text-align: center; cursor: pointer; border: 2px solid transparent;
    box-shadow: var(--shadow); transition: var(--transition);
}
.card:hover { transform: translateY(-5px); }
.card.selected { border-color: var(--accent); transform: scale(1.02); }

/* Image styling for generated cards */
.card img { 
    width: 100%; 
    height: 180px; 
    object-fit: contain; 
    margin-bottom: 15px;
    background-color: #f9f9f9; /* Subtle background for transparency */
    border-radius: 12px;
}

.card h3 { text-transform: capitalize; margin-bottom: 5px; }

/* --- PRESCRIPTION TABLE --- */
.rx-container {
    background: #fff; padding: 25px; border-radius: var(--radius);
    box-shadow: var(--shadow); margin-top: 20px;
}

.rx-row {
    display: grid; grid-template-columns: 1fr 1fr 1fr 1fr; gap: 10px; margin-bottom: 15px;
}

.rx-header { font-size: 0.8rem; font-weight: 700; color: var(--text-secondary); text-align: center; }

.eye-label { 
    grid-column: span 4; font-weight: 600; color: var(--accent); margin-top: 10px; margin-bottom: 5px; 
}

.form-input {
    width: 100%; padding: 12px; border: 1px solid #d2d2d7;
    border-radius: 8px; font-size: 0.9rem; text-align: center;
}
.form-input::placeholder { color: #ccc; }

/* --- STICKY FOOTER --- */
.sticky-footer {
    position: fixed; bottom: 0; left: 0; width: 100%;
    background: rgba(255,255,255,0.9); backdrop-filter: blur(20px);
    border-top: 1px solid #d2d2d7; padding: 20px;
    display: flex; justify-content: space-between; align-items: center; z-index: 100;
}
.total-price { font-size: 1.5rem; font-weight: 700; }

@media (max-width: 600px) {
    .rx-row { grid-template-columns: 1fr 1fr; } /* Stack inputs on mobile */
    .sticky-footer { flex-direction: column; gap: 10px; }
    .btn-primary { width: 100%; }
}