@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;600;700;800&display=swap");

:root {
    /* New Pastel Theme inspired by MH Studios Shop */
    --primary-start: #ffbfac;
    /* Soft Peach */
    --primary-end: #ff9ab7;
    /* Soft Pink */
    --navy: #4a4a4a;
    /* Softer Dark Grey instead of harsh Navy */
    --ink: #2d3436;
    /* Main text color */
    --bg: #fff5f8;
    /* Very light pinkish background */
    --card: #ffffff;
    --coral: #ffadad;
    /* Pastel Red/Coral */
    --mint: #caffbf;
    /* Pastel Mint */
    --sky: #9bf6ff;
    /* Pastel Blue */

    /* Mapping old variables to new palette to maintain compatibility */
    --yellow-start: var(--primary-start);
    --yellow-end: var(--primary-end);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: "Poppins", "Segoe UI", Tahoma, Arial, sans-serif;
    color: var(--ink);
    background:
        radial-gradient(circle at top left, rgba(255, 191, 172, 0.4), transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(202, 255, 191, 0.3), transparent 45%),
        radial-gradient(circle at bottom right, rgba(155, 246, 255, 0.3), transparent 50%),
        linear-gradient(180deg, #fff5f8 0%, #fff0f5 100%);
}

.container {
    width: min(1120px, 92%);
    margin: 24px auto 64px;
}

.site-header {
    background: #ffffff;
    /* Clean white header like the reference */
    color: var(--navy);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
    position: sticky;
    top: 0;
    z-index: 50;
}

.navbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 28px;
    backdrop-filter: blur(8px);
    animation: slideDown 0.5s ease;
}

.nav-brand a {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--primary-end);
    text-decoration: none;
    display: flex;
    align-items: center;
}

.nav-brand img {
    height: 54px;
    width: auto;
    object-fit: contain;
}

.brand-text {
    display: flex;
    flex-direction: column;
    margin-left: 12px;
    line-height: 1.2;
}

.brand-title {
    font-size: 1.25rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary-end), var(--coral));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.brand-subtitle {
    font-size: 0.75rem;
    font-weight: 600;
    color: #636e72;
    letter-spacing: 0.2px;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 8px;
    /* Use gap instead of margin-left on children */
}

.nav-links a {
    /* margin-left removed in favor of gap */
    font-weight: 600;
    color: #636e72;
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 20px;
    transition: all 0.2s ease;
    white-space: nowrap;
    /* Prevent link wrapping */
}

.nav-links a:hover {
    background: rgba(255, 154, 183, 0.1);
    color: var(--primary-end);
}

.button,
button,
input[type="submit"] {
    background: linear-gradient(135deg, #ff9a9e, #fad0c4);
    /* Stronger pink/peach */
    color: #fff;
    border: none;
    padding: 12px 24px;
    border-radius: 25px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(255, 154, 158, 0.4);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.button:hover,
button:hover,
input[type="submit"]:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 24px rgba(255, 154, 183, 0.45);
}

.site-footer {
    text-align: center;
    padding: 40px 12px 60px;
    color: #636e72;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.5), rgba(255, 240, 245, 0.8));
    border-top: 1px solid rgba(255, 191, 172, 0.15);
    position: relative;
    overflow: hidden;
}

.footer-wrap {
    width: min(1120px, 92%);
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 24px;
    text-align: left;
    padding: 16px 0 24px;
}

.footer-brand h4 {
    margin: 0 0 8px;
    color: var(--primary-end);
    font-weight: 800;
}

.footer-links h6,
.footer-contact h6 {
    margin: 0 0 12px;
    font-weight: 700;
    color: var(--ink);
}

.footer-links a {
    display: block;
    color: #636e72;
    text-decoration: none;
    margin-bottom: 8px;
    font-weight: 500;
}

.footer-links a:hover {
    color: var(--primary-end);
}

.footer-bottom {
    border-top: 1px dashed rgba(0, 0, 0, 0.08);
    padding-top: 20px;
    font-weight: 500;
    font-size: 0.9rem;
}

.site-footer::before {
    content: "";
    position: absolute;
    inset: -30px 0 auto 0;
    height: 80px;
    background: radial-gradient(circle at 20% 20%, rgba(202, 255, 191, 0.2), transparent 60%);
    animation: floatGlow 6s ease-in-out infinite;
    pointer-events: none;
}

.site-footer::after {
    content: "";
    position: absolute;
    inset: auto 0 -20px 0;
    height: 70px;
    background: radial-gradient(circle at 80% 80%, rgba(255, 173, 173, 0.2), transparent 60%);
    animation: floatGlow 7s ease-in-out infinite reverse;
    pointer-events: none;
}

.hero {
    background:
        radial-gradient(circle at top right, rgba(255, 255, 255, 0.8), transparent 40%),
        linear-gradient(135deg, #fff0f5 0%, #ffdde1 100%);
    border-radius: 30px;
    padding: 60px 48px;
    color: var(--ink);
    box-shadow: 0 20px 60px rgba(255, 154, 183, 0.15);
    transition: transform 0.3s ease;
}

.hero:hover {
    transform: translateY(-2px);
}

.hero .btn {
    background: linear-gradient(135deg, var(--primary-start), var(--primary-end));
    border: none;
    color: white;
    font-weight: 700;
    padding: 12px 28px;
    border-radius: 50px;
    box-shadow: 0 10px 20px rgba(255, 154, 183, 0.3);
}

.hero-modern {
    position: relative;
    overflow: hidden;
    padding: 48px;
}

.hero-modern::after {
    content: "";
    position: absolute;
    inset: -10% -10% auto auto;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(202, 255, 191, 0.4), transparent 70%);
    filter: blur(40px);
    pointer-events: none;
}

.hero-modern::before {
    content: "";
    position: absolute;
    inset: auto -5% -10% auto;
    width: 250px;
    height: 250px;
    background: radial-gradient(circle, rgba(155, 246, 255, 0.4), transparent 70%);
    filter: blur(40px);
    pointer-events: none;
}

/* Feature card with Glassmorphism */
.feature-card {
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 20px;
    padding: 24px;
    height: 100%;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-5px);
}

.section-title {
    display: flex;
    align-items: center;
    gap: 10px;
}

.section-title span {
    width: 22px;
    height: 6px;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--coral), var(--mint));
}

.highlight-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    /* 2 Columns for better mobile layout */
    gap: 16px;
}

.highlight-item {
    background: white;
    border-radius: 16px;
    padding: 16px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.04);
    font-weight: 600;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
    border: 1px solid rgba(0, 0, 0, 0.02);
}

.highlight-item:hover {
    transform: scale(1.02);
    box-shadow: 0 12px 24px rgba(255, 154, 183, 0.15);
    color: var(--primary-end);
    border-color: rgba(255, 154, 183, 0.3);
}

.category-chip {
    display: inline-block;
    padding: 8px 14px;
    border-radius: 999px;
    background: #fff0f5;
    color: var(--primary-end);
    font-weight: 600;
    margin: 6px 8px 0 0;
    box-shadow: 0 6px 14px rgba(255, 154, 183, 0.15);
}

.product-card {
    background: var(--card);
    border-radius: 20px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    height: 100%;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    border: 1px solid rgba(0, 0, 0, 0.02);
    position: relative;
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(255, 154, 183, 0.2);
}

/* Product Card Interactions */
.product-image-wrapper {
    position: relative;
    overflow: hidden;
    height: 220px;
}

.product-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.product-card:hover img {
    transform: scale(1.1);
}

.card-actions {
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s ease;
}

.product-card:hover .card-actions {
    opacity: 1;
    transform: translateY(0);
}

.action-btn {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: var(--navy);
    /* Dark background for visibility */
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    transition: all 0.2s ease;
}

.action-btn:hover {
    background: var(--primary-end);
    color: white;
    transform: scale(1.15) rotate(5deg);
    box-shadow: 0 8px 16px rgba(255, 154, 183, 0.4);
}

.product-thumb {
    height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #fff0f5, #ffccd5);
    color: #d63384;
    font-weight: 700;
}

.price-tag {
    font-weight: 700;
    color: var(--navy);
}

.table thead th {
    background: #ffe6ea;
    color: var(--ink);
}

.auth-card {
    background: rgba(255, 255, 255, 0.85);
    /* Glassmorphism base */
    backdrop-filter: blur(12px);
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 20px 50px rgba(255, 154, 183, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.6);
    max-width: 480px;
    margin: 60px auto;
    text-align: center;
}

.auth-card h2 {
    margin-top: 0;
    margin-bottom: 24px;
    color: var(--ink);
    font-size: 1.8rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary-end), var(--coral));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

form {
    display: flex;
    flex-direction: column;
    gap: 20px;
    text-align: left;
}

form label {
    display: block;
    margin: 0 0 8px;
    /* Reset margin and use gap */
    font-weight: 700;
    color: var(--navy);
    font-size: 0.95rem;
}

form input,
form textarea,
form select {
    width: 100%;
    padding: 14px 18px;
    border-radius: 12px;
    border: 2px solid #f0edf0;
    font-size: 1rem;
    transition: all 0.2s ease;
    background: #fff;
}

form input:focus,
form textarea:focus,
form select:focus {
    outline: none;
    border-color: var(--primary-end);
    box-shadow: 0 0 0 4px rgba(255, 154, 183, 0.15);
}

.auth-card button {
    width: 100%;
    margin-top: 12px;
    padding: 14px;
    font-size: 1.05rem;
}

.auth-card p {
    margin-top: 24px;
    font-size: 0.95rem;
    color: #636e72;
}

.auth-card a {
    color: var(--primary-end);
    font-weight: 700;
    text-decoration: none;
}

.auth-card a:hover {
    text-decoration: underline;
}

.alert {
    padding: 10px 12px;
    border-radius: 8px;
    margin-bottom: 12px;
    font-weight: 600;
}

.alert.success {
    background: #e8f6dd;
    color: #245b2a;
}

.alert.error {
    background: #fde2df;
    color: #7a1c16;
}

.error {
    color: #b10000;
    display: block;
    margin-top: 6px;
}

.admin .site-header {
    background: linear-gradient(135deg, var(--primary-start), var(--primary-end));
}

.admin-layout {
    display: flex;
    min-height: 100vh;
    background: #fff5f8;
}

.admin-sidebar {
    width: 240px;
    background: linear-gradient(180deg, var(--primary-start), var(--primary-end));
    color: white;
    padding: 24px 18px;
}

/* Profile Dropdown */
.profile-menu {
    position: relative;
    margin-left: 10px;
}

.profile-btn {
    background: white;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 50px;
    padding: 8px 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.95rem;
    color: var(--navy);
    transition: all 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
    font-weight: 600;
    max-width: 200px;
    /* Limit width */
}

.profile-btn span {
    display: block;
    max-width: 120px;
    /* Limit text width */
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.profile-btn:hover,
.profile-btn:focus {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    border-color: rgba(0, 0, 0, 0.05);
    transform: translateY(-1px);
}

.profile-dropdown {
    display: none;
    position: absolute;
    right: 0;
    top: calc(100% + 12px);
    background-color: white;
    min-width: 260px;
    box-shadow: 0 16px 40px -5px rgba(0, 0, 0, 0.1);
    border-radius: 16px;
    z-index: 1000;
    overflow: visible;
    /* changed from hidden to allow triangle if needed, but keeping simple for now */
    border: 1px solid rgba(0, 0, 0, 0.04);
    animation: slideUpFade 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
    transform-origin: top right;
}

.profile-dropdown.show {
    display: block;
}

.profile-dropdown::before {
    content: '';
    position: absolute;
    top: -6px;
    right: 24px;
    width: 12px;
    height: 12px;
    background: white;
    transform: rotate(45deg);
    border-left: 1px solid rgba(0, 0, 0, 0.04);
    border-top: 1px solid rgba(0, 0, 0, 0.04);
}

.profile-dropdown .dropdown-header {
    padding: 24px;
    text-align: center;
    border-bottom: 1px solid #f5f5f5;
    background: linear-gradient(to bottom, #fffbfc, #fff);
    border-radius: 16px 16px 0 0;
}

.profile-dropdown .dropdown-header strong {
    display: block;
    font-size: 1.1rem;
    color: var(--navy);
    margin-bottom: 4px;
}

.profile-dropdown .dropdown-header small {
    color: #9aa8b5;
    font-size: 0.85rem;
}

.profile-dropdown .dropdown-divider {
    height: 1px;
    margin: 8px 0;
    background-color: #f5f5f5;
}

.profile-dropdown .dropdown-item {
    padding: 14px 24px;
    text-decoration: none;
    display: flex;
    align-items: center;
    color: #57606f;
    transition: all 0.2s;
    font-size: 0.95rem;
    font-weight: 500;
}

.profile-dropdown .dropdown-item i {
    font-size: 1.1em;
    width: 24px;
    margin-right: 12px;
    color: #a4b0be;
    transition: color 0.2s;
}

.profile-dropdown .dropdown-item:hover {
    background-color: #fdf2f2;
    /* Very soft red/pink tint */
    color: var(--primary-end);
    padding-left: 28px;
    /* Subtle slide effect */
}

.profile-dropdown .dropdown-item:hover i {
    color: var(--primary-end);
}

.profile-dropdown .dropdown-item.text-danger {
    color: #ef5777;
    margin-top: 8px;
    border-top: 1px solid #f5f5f5;
}

.profile-dropdown .dropdown-item.text-danger:hover {
    background-color: #fff0f3;
    color: #e62e55;
}

.nav-links .profile-dropdown a {
    margin: 0;
    /* Reset header link margins */
}

@keyframes slideUpFade {
    from {
        opacity: 0;
        transform: translateY(10px) scale(0.98);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.admin-brand {
    font-weight: 800;
    font-size: 1.1rem;
    margin-bottom: 18px;
}

.admin-nav a {
    display: block;
    color: var(--navy);
    text-decoration: none;
    font-weight: 600;
    padding: 10px 12px;
    border-radius: 8px;
    margin-bottom: 6px;
    background: rgba(255, 255, 255, 0.35);
}

.admin-nav a:hover {
    background: rgba(255, 255, 255, 0.6);
}

.admin-main {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.admin-topbar {
    padding: 16px 24px;
    background: #fff;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.06);
    display: flex;
    justify-content: space-between;
    align-items: center;
    animation: slideDown 0.5s ease;
}

.admin-content {
    padding: 24px;
}

@media (max-width: 992px) {
    .navbar {
        flex-direction: column;
        gap: 10px;
    }

    .nav-links a {
        margin-left: 0;
        margin-right: 12px;
    }

    .admin-layout {
        flex-direction: column;
    }

    .admin-sidebar {
        width: 100%;
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
    }

    .admin-nav a {
        display: inline-block;
    }
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-12px);
    }

    to {
        opacity: 1;
    }
}

@keyframes floatGlow {

    0%,
    100% {
        transform: translateY(0);
        opacity: 0.7;
    }

    50% {
        transform: translateY(-8px);
        opacity: 1;
    }
}

/* Product Detail Page Styles */
.detail-card {
    background: white;
    border-radius: 24px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0, 0, 0, 0.02);
}

.detail-image-wrapper {
    position: relative;
    overflow: hidden;
    border-radius: 20px;
}

.detail-image-wrapper img {
    transition: transform 0.3s ease;
}

.detail-image-wrapper:hover img {
    transform: scale(1.02);
}

.ls-1 {
    letter-spacing: 1px;
}

.add-to-cart-form input[type="number"] {
    font-size: 1.25rem;
    padding: 12px;
}

.add-to-cart-form .btn {
    font-size: 1.1rem;
    font-weight: 700;
    border-radius: 12px;
    background: linear-gradient(135deg, #ff9a9e, #ff6b6b);
    /* Vivid pink/red gradient */
    color: white;
    box-shadow: 0 10px 20px rgba(255, 107, 107, 0.3);
    border: none;
}

.add-to-cart-form .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 30px rgba(255, 107, 107, 0.45);
    background: linear-gradient(135deg, #ff6b6b, #ff4757);
}

/* Custom Outline Button for Product Cards */
.btn-outline-primary {
    border: 2px solid var(--primary-end);
    color: var(--primary-end);
    background: transparent;
    font-weight: 700;
    border-radius: 50px;
    transition: all 0.2s ease;
}

.btn-outline-primary:hover {
    background: var(--primary-end);
    color: white;
    box-shadow: 0 4px 12px rgba(255, 154, 183, 0.3);
}