/* Chief & Honey's Scoops, Sweets & Gifts - Main Stylesheet */

/* Brand Colors */
:root {
    --pink: #D67DB1;
    --teal: #83D0D1;
    --first-light: #F0E3DF;
    --yellow: #F9E07A;
    --blue: #568FA9;
    --dark-text: #333333;
    --light-text: #666666;
    --white: #ffffff;
}

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

img, video { max-width: 100%; height: auto; }

body {
    font-family: 'Poppins', sans-serif;
    color: var(--dark-text);
    line-height: 1.6;
    background-color: var(--first-light);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header Styles */
.main-header {
    background: linear-gradient(135deg, var(--pink) 0%, var(--teal) 100%);
    padding: 1rem 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo h1 {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 0;
}

.logo h1 a {
    color: var(--white);
    text-decoration: none;
}

.logo .tagline {
    font-size: 0.9rem;
    color: var(--first-light);
    font-weight: 300;
}

.site-logo {
    height: 60px;
    width: auto;
    display: block;
}

/* Navigation – desktop only; mobile overrides hide this */
.main-nav ul {
    list-style: none;
}

.nav-menu {
    gap: 2rem;
}

@media (min-width: 769px) {
    .nav-menu {
        display: flex;
    }
}

.main-nav a {
    color: var(--white);
    text-decoration: none;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 25px;
    transition: all 0.3s ease;
}

.main-nav a:hover,
.main-nav a.active {
    background-color: rgba(255,255,255,0.2);
}

.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}

.mobile-menu-toggle span {
    width: 25px;
    height: 3px;
    background-color: var(--white);
    margin: 3px 0;
    transition: 0.3s;
    border-radius: 3px;
}

/* ── Dropdown Navigation ── */
.nav-menu li {
    position: relative;
}

.dropdown-toggle::after {
    content: ' ▾';
    font-size: 0.72em;
    opacity: 0.85;
}

/* Hidden by default — JS adds .open to show */
.dropdown-menu {
    display: none !important;
    position: absolute;
    top: calc(100% + 6px);
    left: 50%;
    transform: translateX(-50%);
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 28px rgba(0,0,0,0.15);
    min-width: 180px;
    padding: 0.5rem 0;
    z-index: 1100;
    list-style: none;
}

.has-dropdown.open > .dropdown-menu {
    display: block !important;
}

.dropdown-menu::before {
    content: '';
    position: absolute;
    top: -6px;
    left: 50%;
    transform: translateX(-50%);
    border-width: 0 7px 7px 7px;
    border-style: solid;
    border-color: transparent transparent white transparent;
}

.dropdown-menu li {
    display: block;
}

.dropdown-menu a {
    display: block;
    color: var(--dark-text) !important;
    padding: 0.6rem 1.1rem;
    font-size: 0.9rem;
    font-weight: 500;
    white-space: nowrap;
    transition: background 0.15s, color 0.15s;
}

.dropdown-menu a:hover,
.dropdown-menu a.active {
    background: var(--first-light);
    color: var(--pink) !important;
}

/* Mobile: inline expansion */
@media (max-width: 768px) {
    .dropdown-menu {
        position: static;
        transform: none;
        box-shadow: none;
        background: rgba(255,255,255,0.12);
        border-radius: 8px;
        margin: 0.2rem 0 0.2rem 1rem;
        padding: 0.25rem 0;
        min-width: 0;
    }
    .dropdown-menu::before { display: none; }
    .dropdown-menu a {
        color: white !important;
        font-size: 0.88rem;
        padding: 0.55rem 1rem;
    }
    .dropdown-menu a:hover,
    .dropdown-menu a.active {
        background: rgba(255,255,255,0.2);
        color: white !important;
    }
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, var(--teal) 0%, var(--blue) 100%);
    color: var(--white);
    padding: 4rem 0;
    text-align: center;
}

.hero h2 {
    font-size: 3rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

.hero p {
    font-size: 1.3rem;
    margin-bottom: 2rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.btn {
    display: inline-block;
    padding: 1rem 2rem;
    background-color: var(--yellow);
    color: var(--dark-text);
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    font-size: 1rem;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.btn-secondary {
    background-color: var(--pink);
    color: var(--white);
}

/* Content Sections */
.section {
    padding: 4rem 0;
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    color: var(--pink);
    margin-bottom: 3rem;
    font-weight: 700;
}

/* Features Grid */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.feature-card {
    background-color: var(--white);
    padding: 2rem;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-5px);
}

.feature-card h3 {
    color: var(--blue);
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

/* Menu/Flavors Grid */
.flavors-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.flavor-card {
    background-color: var(--white);
    border-radius: 15px;
    padding: 1.5rem;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    border-top: 4px solid var(--pink);
}

.flavor-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.flavor-card h3 {
    color: var(--blue);
    margin-bottom: 0.5rem;
    font-size: 1.5rem;
}

.flavor-card p {
    color: var(--light-text);
    margin-bottom: 1rem;
}

.flavor-price {
    font-size: 1.5rem;
    color: var(--pink);
    font-weight: 700;
}

/* About Section */
.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
}

.about-text h3 {
    color: var(--pink);
    margin-bottom: 1rem;
    font-size: 2rem;
}

.about-text p {
    margin-bottom: 1rem;
    color: var(--light-text);
    font-size: 1.1rem;
}

.about-image {
    background: linear-gradient(135deg, var(--teal) 0%, var(--pink) 100%);
    height: 400px;
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 3rem;
}

/* Contact Form */
.contact-container {
    max-width: 800px;
    margin: 0 auto;
}

.contact-info {
    background-color: var(--white);
    padding: 2rem;
    border-radius: 15px;
    margin-bottom: 2rem;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

.contact-info h3 {
    color: var(--pink);
    margin-bottom: 1rem;
}

.contact-info p {
    margin-bottom: 0.5rem;
    color: var(--light-text);
}

.contact-info a {
    color: var(--blue);
    text-decoration: none;
}

.contact-form {
    background-color: var(--white);
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--dark-text);
    font-weight: 500;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.8rem;
    border: 2px solid var(--first-light);
    border-radius: 8px;
    font-family: 'Poppins', sans-serif;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--pink);
}

.form-group textarea {
    resize: vertical;
    min-height: 150px;
}

/* Footer */
.main-footer {
    background: linear-gradient(135deg, var(--blue) 0%, var(--pink) 100%);
    color: var(--white);
    padding: 3rem 0 1rem;
    margin-top: 4rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3,
.footer-section h4 {
    margin-bottom: 1rem;
    color: var(--yellow);
}

.footer-section p {
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.footer-section a {
    color: var(--white);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-section a:hover {
    color: var(--yellow);
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 0.5rem;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255,255,255,0.2);
}

.footer-bottom p {
    margin: 0.5rem 0;
}

.admin-link {
    font-size: 0.9rem;
    opacity: 0.7;
}

.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 50%;
    color: var(--white);
    transition: background 0.3s ease, transform 0.3s ease;
}

.social-links a:hover {
    background: rgba(255, 255, 255, 0.35);
    transform: translateY(-3px);
    color: var(--white);
}

/* Admin Panel Styles */
.admin-container {
    max-width: 900px;
    margin: 2rem auto;
}

.admin-header {
    background: linear-gradient(135deg, var(--pink) 0%, var(--blue) 100%);
    color: var(--white);
    padding: 2rem;
    border-radius: 15px 15px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.admin-content {
    background-color: var(--white);
    padding: 2rem;
    border-radius: 0 0 15px 15px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

.login-box {
    max-width: 400px;
    margin: 4rem auto;
    background-color: var(--white);
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

.login-box h2 {
    color: var(--pink);
    text-align: center;
    margin-bottom: 2rem;
}

.alert {
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
}

.alert-success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

.table th,
.table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--first-light);
}

.table th {
    background-color: var(--pink);
    color: var(--white);
    font-weight: 600;
    border-right: 1px solid rgba(255,255,255,0.2);
}

.table th:last-child {
    border-right: none;
}

.table td {
    border-right: 1px solid var(--first-light);
}

.table td:last-child {
    border-right: none;
}

.table tbody tr:nth-child(even) {
    background-color: #fafafa;
}

.table tbody tr:nth-child(odd) {
    background-color: var(--white);
}

.table tr:hover {
    background-color: var(--first-light) !important;
}

.btn-small {
    padding: 0.4rem 0.8rem;
    font-size: 1rem;
    margin: 0 0.2rem;
    border-radius: 5px;
    display: inline-block;
    min-width: 35px;
    text-align: center;
    text-decoration: none;
}

.btn-edit {
    background-color: var(--blue);
    color: var(--white);
}

.btn-edit:hover {
    background-color: #4a7a94;
    transform: translateY(-1px);
}

.btn-delete {
    background-color: #dc3545;
    color: var(--white);
}

.btn-delete:hover {
    background-color: #c82333;
    transform: translateY(-1px);
}

/* ── Hamburger → X animation ── */
.mobile-menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}
.mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
    transform: translateX(-10px);
}
.mobile-menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

/* ── Tablet (≤ 900px) – admin container padding ── */
@media (max-width: 900px) {
    .admin-container {
        margin: 1rem;
    }
}

/* ── Tablet (≤ 768px) ── */
@media (max-width: 768px) {
    /* Navigation */
    .mobile-menu-toggle {
        display: flex;
    }

    .nav-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        flex-direction: column;
        gap: 0.15rem;
        padding: 0.5rem 1rem 1.25rem;
        background: linear-gradient(135deg, var(--pink) 0%, var(--teal) 100%);
        box-shadow: 0 6px 16px rgba(0,0,0,0.18);
        z-index: 999;
    }

    .nav-menu.active {
        display: flex;
    }

    .main-nav a {
        display: block;
        padding: 0.75rem 1rem;
        min-height: 44px;
        display: flex;
        align-items: center;
    }

    /* Hero */
    .hero {
        padding: 2.5rem 0;
    }

    .hero h2 {
        font-size: 2rem;
    }

    .hero p {
        font-size: 1rem;
        padding: 0 0.5rem;
    }

    /* Sections */
    .section {
        padding: 2.5rem 0;
    }

    .section-title {
        font-size: 1.9rem;
        margin-bottom: 2rem;
    }

    /* About */
    .about-content {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .about-image {
        height: 220px;
        font-size: 2rem;
    }

    .about-text h3 {
        font-size: 1.5rem;
    }

    /* Features */
    .features-grid {
        gap: 1.25rem;
        margin-top: 1.5rem;
    }

    /* Flavors */
    .flavors-grid {
        grid-template-columns: 1fr;
    }

    /* Footer */
    .footer-content {
        grid-template-columns: 1fr 1fr;
        gap: 1.5rem;
    }

    .main-footer {
        padding: 2rem 0 1rem;
        margin-top: 2rem;
    }

    /* Buttons – minimum 44px touch target */
    .btn {
        padding: 0.75rem 1.5rem;
        font-size: 0.95rem;
        min-height: 44px;
    }

    /* Forms – 16px prevents iOS auto-zoom */
    .form-group input,
    .form-group textarea,
    .form-group select {
        font-size: 16px;
    }

    /* Admin */
    .admin-header {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
        padding: 1.25rem;
    }

    .admin-header > div:last-child {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.5rem;
    }

    .admin-content {
        padding: 1rem;
    }

    .table {
        font-size: 0.85rem;
    }

    .table th,
    .table td {
        padding: 0.6rem 0.5rem;
    }

    .login-box {
        margin: 1.5rem;
    }
}

/* ── Mobile (≤ 480px) ── */
@media (max-width: 480px) {
    /* Typography */
    .hero h2 {
        font-size: 1.6rem;
    }

    .hero p {
        font-size: 0.95rem;
    }

    .section-title {
        font-size: 1.5rem;
        margin-bottom: 1.5rem;
    }

    /* Layout */
    .container {
        padding: 0 15px;
    }

    .section {
        padding: 1.75rem 0;
    }

    /* Logo / nav */
    .logo h1 {
        font-size: 1.3rem;
    }

    .logo .tagline {
        font-size: 0.8rem;
    }

    .site-logo {
        height: 50px;
    }

    /* Hero */
    .hero {
        padding: 1.75rem 0;
    }

    /* Footer – single column */
    .footer-content {
        grid-template-columns: 1fr;
        gap: 1.25rem;
    }

    /* Feature cards */
    .feature-card {
        padding: 1.5rem;
    }

    .feature-card h3 {
        font-size: 1.2rem;
    }

    /* Flavors */
    .flavor-card h3 {
        font-size: 1.2rem;
    }

    /* Buttons */
    .btn {
        padding: 0.7rem 1.25rem;
        font-size: 0.9rem;
    }

    /* Admin */
    .admin-header h2 {
        font-size: 1.3rem;
    }

    .admin-header p {
        font-size: 0.85rem;
    }

    .login-box {
        margin: 1rem;
        padding: 1.5rem;
    }
}
