/* ============================================================
   A&M Hair & Beauty — Shared Stylesheet
   ============================================================ */

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    font-family: 'Poppins', sans-serif;
    overflow-x: hidden;
    background: #fff;
    color: #1a1a1a;
}

/* ---- Dark Mode ---- */
[data-theme="dark"] body { background: #0f0f0f; color: #e0e0e0; }
[data-theme="dark"] .header-scrolled { background: rgba(15,15,15,0.97) !important; }
[data-theme="dark"] .product-card, [data-theme="dark"] .product-info { background: #1a1a1a; }
[data-theme="dark"] .review-card { background: linear-gradient(135deg,#1a1a1a 0%,#1e1318 100%); }
[data-theme="dark"] .footer { background: #0a0a0a; }
[data-theme="dark"] .mobile-menu { background: #111; }
[data-theme="dark"] .mobile-menu nav a { color: #ccc; border-bottom-color: #222; }
[data-theme="dark"] .cart-item { background: #1a1a1a; border-color: #2a2a2a; }
[data-theme="dark"] .cart-summary { background: #1a1a1a; }
[data-theme="dark"] .breadcrumb { color: #888; }
[data-theme="dark"] .page-hero { background: linear-gradient(135deg,#1a1a1a 0%,#1e1318 100%); }
[data-theme="dark"] .filter-btn { background: #1a1a1a; border-color: #333; color: #ccc; }
[data-theme="dark"] .filter-btn.active { background: #d946a6; border-color: #d946a6; color: #fff; }
[data-theme="dark"] .product-name { color: #e0e0e0; }
[data-theme="dark"] .about-stat { background: #1a1a1a; }
[data-theme="dark"] .team-card { background: #1a1a1a; }
[data-theme="dark"] .value-card { background: #1a1a1a; }
[data-theme="dark"] nav a { color: #aaa; }
[data-theme="dark"] .section-header p, [data-theme="dark"] .product-description { color: #aaa; }

/* ---- Animations ---- */
.scroll-reveal { opacity: 0; transform: translateY(50px); transition: all 1.1s cubic-bezier(0.16,1,0.3,1); }
.scroll-reveal.revealed { opacity: 1; transform: translateY(0); }
.scroll-reveal-left { opacity: 0; transform: translateX(-60px); transition: all 1.2s cubic-bezier(0.16,1,0.3,1); }
.scroll-reveal-left.revealed { opacity: 1; transform: translateX(0); }
.scroll-reveal-right { opacity: 0; transform: translateX(60px); transition: all 1.2s cubic-bezier(0.16,1,0.3,1); }
.scroll-reveal-right.revealed { opacity: 1; transform: translateX(0); }
.scale-in { opacity: 0; transform: scale(0.85); transition: all 1.1s cubic-bezier(0.16,1,0.3,1); }
.scale-in.revealed { opacity: 1; transform: scale(1); }

/* ============================================================
   HEADER
   ============================================================ */
.site-header {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 1000;
    background: transparent;
    padding: 1.4rem 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.5s cubic-bezier(0.16,1,0.3,1);
}

.site-header.scrolled {
    background: rgba(255,255,255,0.97);
    backdrop-filter: blur(12px);
    padding: 0.9rem 5%;
    box-shadow: 0 8px 30px rgba(0,0,0,0.07);
}

.logo {
    font-size: 1.4rem;
    font-weight: 800;
    color: #1a1a1a;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: transform 0.4s ease;
}
.logo:hover { transform: scale(1.04); }
.logo img { width: 38px; height: 38px; transition: transform 0.5s ease; }
.logo:hover img { transform: rotate(360deg); }

nav { display: flex; gap: 2.2rem; align-items: center; }
nav a {
    text-decoration: none;
    color: #555;
    font-weight: 500;
    font-size: 0.92rem;
    position: relative;
    transition: color 0.3s ease;
}
nav a::after {
    content: '';
    position: absolute;
    bottom: -4px; left: 50%;
    transform: translateX(-50%) scaleX(0);
    width: 100%; height: 2px;
    background: linear-gradient(90deg,#d946a6,#ec4899);
    transition: transform 0.4s ease;
}
nav a:hover { color: #d946a6; }
nav a:hover::after, nav a.active::after { transform: translateX(-50%) scaleX(1); }
nav a.active { color: #d946a6; }

.header-right { display: flex; align-items: center; gap: 0.9rem; }

.cart-icon-btn {
    position: relative;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    color: #555;
    font-size: 1.3rem;
    transition: color 0.3s ease;
    text-decoration: none;
    display: flex;
    align-items: center;
}
.cart-icon-btn:hover { color: #d946a6; }
.cart-count {
    position: absolute;
    top: 0; right: 0;
    background: #d946a6;
    color: white;
    font-size: 0.65rem;
    font-weight: 700;
    width: 18px; height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease;
}
.cart-count.bump { transform: scale(1.4); }

.user-link {
    display: flex; align-items: center; gap: 0.5rem;
    text-decoration: none; color: #555;
    font-weight: 600; font-size: 0.88rem;
    padding: 0.5rem 1rem;
    border-radius: 50px;
    transition: all 0.3s ease;
}
.user-link:hover { background: rgba(217,70,166,0.1); color: #d946a6; }
#user-display-name { color: #d946a6; }

/* Mobile menu toggle */
.mobile-menu-btn {
    display: none; background: none; border: none;
    cursor: pointer; padding: 0.4rem; z-index: 1001;
}
.mobile-menu-btn span {
    display: block; width: 24px; height: 2.5px;
    background: #d946a6; margin: 5px 0;
    transition: all 0.3s ease; border-radius: 2px;
}

.mobile-menu {
    position: fixed; top: 0; right: -100%; width: 280px; height: 100vh;
    background: white; box-shadow: -5px 0 25px rgba(0,0,0,0.12);
    z-index: 1002; padding: 80px 2rem 2rem;
    transition: right 0.4s cubic-bezier(0.16,1,0.3,1);
}
.mobile-menu.open { right: 0; }
.mobile-menu nav { flex-direction: column; gap: 0; }
.mobile-menu nav a { font-size: 1.05rem; color: #333; border-bottom: 1px solid #f0f0f0; padding: 0.9rem 0; }
.mobile-menu nav a::after { display: none; }

.mobile-overlay {
    position: fixed; inset: 0;
    background: rgba(0,0,0,0.45);
    z-index: 1001; opacity: 0; pointer-events: none;
    transition: opacity 0.3s ease;
}
.mobile-overlay.open { opacity: 1; pointer-events: all; }

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
    padding: 0.85rem 2rem; border-radius: 50px;
    font-family: 'Poppins', sans-serif; font-weight: 600; font-size: 0.92rem;
    cursor: pointer; border: none; text-decoration: none;
    transition: all 0.4s cubic-bezier(0.16,1,0.3,1);
    position: relative; overflow: hidden;
}

.btn-primary {
    background: linear-gradient(135deg,#d946a6 0%,#ec4899 100%);
    color: white;
    box-shadow: 0 4px 18px rgba(217,70,166,0.3);
}
.btn-primary:hover { transform: translateY(-3px) scale(1.02); box-shadow: 0 8px 28px rgba(217,70,166,0.4); }
.btn-primary:active { transform: translateY(-1px); }

.btn-secondary {
    background: white; color: #d946a6;
    border: 2px solid #d946a6;
}
.btn-secondary:hover { background: #d946a6; color: white; transform: translateY(-2px); }

.btn-outline {
    background: transparent; color: #555;
    border: 1.5px solid #ddd;
}
.btn-outline:hover { border-color: #d946a6; color: #d946a6; }

.btn-sm { padding: 0.55rem 1.3rem; font-size: 0.82rem; }
.btn-lg { padding: 1.1rem 2.8rem; font-size: 1rem; }

.btn:disabled { opacity: 0.55; cursor: not-allowed; transform: none !important; }

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
    background: #1a1a1a;
    color: #ccc;
    padding: 4rem 5% 2rem;
}
.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 3rem;
    margin-bottom: 3rem;
}
.footer-brand .logo { color: white; margin-bottom: 1rem; }
.footer-brand p { font-size: 0.88rem; line-height: 1.8; color: #999; max-width: 280px; }
.footer-col h4 { font-size: 0.9rem; font-weight: 700; color: white; margin-bottom: 1.2rem; text-transform: uppercase; letter-spacing: 1px; }
.footer-col a { display: block; color: #999; text-decoration: none; font-size: 0.88rem; margin-bottom: 0.6rem; transition: color 0.3s ease; }
.footer-col a:hover { color: #d946a6; }
.footer-bottom { border-top: 1px solid #2a2a2a; padding-top: 2rem; display: flex; justify-content: space-between; align-items: center; font-size: 0.82rem; color: #666; }
.footer-bottom span { color: #d946a6; }

/* ============================================================
   SECTION COMMONS
   ============================================================ */
.section { padding: 100px 5%; }
.section-header { text-align: center; margin-bottom: 4rem; }
.section-header h2 { font-size: 3rem; font-weight: 800; letter-spacing: -2px; margin-bottom: 1rem; }
.section-header p { font-size: 1.1rem; color: #666; max-width: 600px; margin: 0 auto; }

.page-hero {
    background: linear-gradient(135deg,#fdf2f8 0%,#fce7f3 100%);
    padding: 140px 5% 80px;
    text-align: center;
}
.page-hero h1 { font-size: 3.5rem; font-weight: 900; letter-spacing: -2px; margin-bottom: 1rem; }
.page-hero p { font-size: 1.2rem; color: #666; max-width: 600px; margin: 0 auto 2rem; }

.breadcrumb { font-size: 0.85rem; color: #999; margin-bottom: 1.5rem; }
.breadcrumb a { color: #d946a6; text-decoration: none; }
.breadcrumb a:hover { text-decoration: underline; }

/* ============================================================
   PRODUCT CARDS
   ============================================================ */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2.2rem;
    max-width: 1300px;
    margin: 0 auto;
}

.product-card {
    background: white;
    border-radius: 22px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0,0,0,0.07);
    transition: all 0.6s cubic-bezier(0.16,1,0.3,1);
    cursor: pointer;
    position: relative;
    text-decoration: none;
    display: block;
    color: inherit;
}
.product-card::after {
    content: '';
    position: absolute; inset: -2px;
    background: linear-gradient(135deg,#d946a6,#ec4899);
    border-radius: 22px; z-index: -1;
    opacity: 0; transition: opacity 0.5s ease;
}
.product-card:hover::after { opacity: 1; }
.product-card:hover { transform: translateY(-12px) scale(1.02); box-shadow: 0 22px 60px rgba(217,70,166,0.28); }
.product-card.discontinued { opacity: 0.65; cursor: default; }
.product-card.discontinued:hover { transform: none; box-shadow: 0 10px 40px rgba(0,0,0,0.07); }
.product-card.discontinued::after { display: none; }

.product-image-wrap { position: relative; overflow: hidden; }
.product-image {
    width: 100%; height: 290px; object-fit: cover;
    transition: transform 0.7s cubic-bezier(0.16,1,0.3,1);
    display: block;
}
.product-card:hover .product-image { transform: scale(1.07); }

.product-badge {
    position: absolute; top: 14px; left: 14px;
    background: #d946a6; color: white;
    font-size: 0.72rem; font-weight: 700;
    padding: 0.3rem 0.8rem; border-radius: 50px;
    text-transform: uppercase; letter-spacing: 0.5px;
}
.product-badge.discontinued-badge { background: #999; }

.product-info { padding: 1.6rem; }
.product-price { font-size: 1.8rem; font-weight: 800; color: #d946a6; margin-bottom: 0.3rem; }
.product-price .was { font-size: 1rem; font-weight: 500; color: #bbb; text-decoration: line-through; margin-left: 0.4rem; }
.product-name { font-size: 1.2rem; font-weight: 700; color: #1a1a1a; margin-bottom: 0.5rem; }
.product-description { font-size: 0.88rem; color: #777; line-height: 1.6; margin-bottom: 1.2rem; }

.product-actions { display: flex; gap: 0.6rem; }
.product-actions .btn { flex: 1; }

/* ============================================================
   REVIEW CARDS
   ============================================================ */
.reviews-grid {
    display: flex;
    gap: 2rem;
    overflow-x: auto;
    scroll-behavior: smooth;
    padding: 1rem 0 1.5rem;
    scrollbar-width: none;
}
.reviews-grid::-webkit-scrollbar { display: none; }

.review-card {
    flex: 0 0 360px;
    background: linear-gradient(135deg,#fdf2f8 0%,#fce7f3 100%);
    border-radius: 22px;
    padding: 2.2rem;
    box-shadow: 0 8px 30px rgba(0,0,0,0.06);
    transition: all 0.5s cubic-bezier(0.16,1,0.3,1);
    position: relative;
}
.review-card:hover { transform: translateY(-8px) scale(1.015); box-shadow: 0 18px 50px rgba(217,70,166,0.22); }

.review-header { display: flex; align-items: center; gap: 1rem; margin-bottom: 1.2rem; }
.review-avatar {
    width: 50px; height: 50px; border-radius: 50%;
    background: linear-gradient(135deg,#d946a6,#ec4899);
    display: flex; align-items: center; justify-content: center;
    color: white; font-weight: 700; font-size: 1.2rem;
    flex-shrink: 0; transition: transform 0.5s ease;
}
.review-card:hover .review-avatar { transform: rotate(360deg); }
.review-avatar-img { width: 50px; height: 50px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.review-info h3 { font-size: 1rem; font-weight: 600; }
.review-rating { color: #f59e0b; font-size: 0.9rem; letter-spacing: 1.5px; }
.review-text { color: #666; line-height: 1.75; font-size: 0.92rem; margin-bottom: 0.8rem; }
.review-date { font-size: 0.78rem; color: #aaa; }

/* ============================================================
   CART
   ============================================================ */
.cart-layout { display: grid; grid-template-columns: 1fr 360px; gap: 2.5rem; max-width: 1200px; margin: 0 auto; }
.cart-items-section h2 { font-size: 1.8rem; font-weight: 800; margin-bottom: 2rem; }

.cart-item {
    display: flex; gap: 1.2rem; align-items: center;
    background: white; border-radius: 16px; padding: 1.4rem;
    border: 1.5px solid #f0f0f0; margin-bottom: 1.2rem;
    transition: all 0.3s ease;
}
.cart-item:hover { border-color: #f9a8d4; box-shadow: 0 5px 20px rgba(217,70,166,0.1); }
.cart-item-img { width: 90px; height: 90px; border-radius: 12px; object-fit: cover; flex-shrink: 0; }
.cart-item-info { flex: 1; }
.cart-item-name { font-size: 1rem; font-weight: 700; margin-bottom: 0.2rem; }
.cart-item-price { font-size: 1.1rem; font-weight: 800; color: #d946a6; }

.qty-control { display: flex; align-items: center; gap: 0; border: 1.5px solid #eee; border-radius: 50px; overflow: hidden; }
.qty-btn { background: none; border: none; width: 34px; height: 34px; cursor: pointer; font-size: 1.1rem; display: flex; align-items: center; justify-content: center; transition: background 0.2s ease; }
.qty-btn:hover { background: #fdf2f8; color: #d946a6; }
.qty-num { width: 32px; text-align: center; font-weight: 600; font-size: 0.9rem; }
.cart-item-remove { background: none; border: none; color: #ccc; cursor: pointer; font-size: 1.2rem; padding: 0.3rem; border-radius: 50%; transition: all 0.2s ease; }
.cart-item-remove:hover { color: #e24b4a; background: #fee2e2; }

.cart-summary { background: white; border-radius: 22px; padding: 2rem; box-shadow: 0 10px 40px rgba(0,0,0,0.07); position: sticky; top: 100px; height: fit-content; }
.cart-summary h3 { font-size: 1.4rem; font-weight: 800; margin-bottom: 1.8rem; }
.summary-row { display: flex; justify-content: space-between; margin-bottom: 0.9rem; font-size: 0.95rem; color: #555; }
.summary-row.total { font-size: 1.2rem; font-weight: 800; color: #1a1a1a; border-top: 1.5px solid #f0f0f0; padding-top: 1rem; margin-top: 0.5rem; }
.summary-row.total span:last-child { color: #d946a6; }
.checkout-note { font-size: 0.78rem; color: #aaa; text-align: center; margin-top: 1rem; line-height: 1.5; }
.checkout-note a { color: #d946a6; }
.empty-cart { text-align: center; padding: 4rem 2rem; }
.empty-cart .icon { font-size: 4rem; margin-bottom: 1rem; }
.empty-cart h3 { font-size: 1.5rem; font-weight: 700; margin-bottom: 0.5rem; }
.empty-cart p { color: #777; margin-bottom: 2rem; }

/* Stripe info box */
.stripe-info {
    background: linear-gradient(135deg,#f0fdf4 0%,#dcfce7 100%);
    border: 1.5px solid #bbf7d0;
    border-radius: 14px;
    padding: 1.2rem;
    margin: 1.5rem 0;
    font-size: 0.85rem;
    color: #166534;
}
.stripe-info strong { display: block; margin-bottom: 0.3rem; }

/* ============================================================
   ABOUT PAGE
   ============================================================ */
.about-story { max-width: 800px; margin: 0 auto; }
.about-story p { font-size: 1.1rem; color: #555; line-height: 2; margin-bottom: 1.8rem; }
.about-story .highlight { font-size: 1.3rem; font-weight: 700; color: #d946a6; }

.stats-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 2rem; margin: 4rem 0; }
.about-stat { text-align: center; padding: 2.5rem; background: #fdf2f8; border-radius: 22px; }
.about-stat .num { font-size: 3rem; font-weight: 900; color: #d946a6; letter-spacing: -2px; }
.about-stat p { color: #777; font-size: 0.95rem; }

.values-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(240px,1fr)); gap: 2rem; }
.value-card { background: #fdf2f8; border-radius: 18px; padding: 2rem; }
.value-card .icon { font-size: 2.2rem; margin-bottom: 1rem; }
.value-card h3 { font-size: 1.1rem; font-weight: 700; margin-bottom: 0.6rem; }
.value-card p { font-size: 0.9rem; color: #777; line-height: 1.7; }

/* ============================================================
   PRODUCT DETAIL PAGE
   ============================================================ */
.detail-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; max-width: 1200px; margin: 0 auto; }
.detail-images { position: sticky; top: 100px; }
.detail-main-img { width: 100%; border-radius: 24px; object-fit: cover; height: 500px; }
.detail-info { padding-top: 1rem; }
.detail-price { font-size: 2.8rem; font-weight: 900; color: #d946a6; margin-bottom: 0.5rem; }
.detail-name { font-size: 2rem; font-weight: 800; margin-bottom: 1rem; }
.detail-desc { font-size: 1.05rem; color: #666; line-height: 1.85; margin-bottom: 2rem; }
.detail-qty { display: flex; align-items: center; gap: 1.2rem; margin-bottom: 2rem; }
.detail-qty label { font-weight: 600; }
.detail-actions { display: flex; gap: 1rem; flex-wrap: wrap; }
.detail-features { margin-top: 2.5rem; border-top: 1.5px solid #f0f0f0; padding-top: 2rem; }
.detail-features h4 { font-weight: 700; margin-bottom: 1rem; }
.feature-list { list-style: none; }
.feature-list li { padding: 0.5rem 0; font-size: 0.95rem; color: #555; display: flex; gap: 0.7rem; }
.feature-list li::before { content: '✓'; color: #d946a6; font-weight: 700; }

/* ============================================================
   FILTER BAR
   ============================================================ */
.filter-bar { display: flex; gap: 0.8rem; flex-wrap: wrap; justify-content: center; margin-bottom: 3rem; }
.filter-btn {
    padding: 0.55rem 1.5rem; border-radius: 50px;
    border: 1.5px solid #e0e0e0; background: white;
    font-family: 'Poppins',sans-serif; font-size: 0.88rem; font-weight: 500;
    cursor: pointer; transition: all 0.3s ease; color: #555;
}
.filter-btn.active { background: #d946a6; border-color: #d946a6; color: white; }
.filter-btn:hover:not(.active) { border-color: #d946a6; color: #d946a6; }

/* ============================================================
   TOAST
   ============================================================ */
.toast {
    position: fixed; bottom: 30px; right: 30px;
    background: #1a1a1a; color: white;
    padding: 1rem 1.8rem; border-radius: 14px;
    font-size: 0.9rem; font-weight: 500;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    z-index: 9999; transform: translateY(100px); opacity: 0;
    transition: all 0.5s cubic-bezier(0.16,1,0.3,1);
    display: flex; align-items: center; gap: 0.7rem;
}
.toast.show { transform: translateY(0); opacity: 1; }
.toast .toast-icon { font-size: 1.2rem; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1024px) {
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .cart-layout { grid-template-columns: 1fr; }
    .cart-summary { position: static; }
    .detail-layout { grid-template-columns: 1fr; }
    .detail-images { position: static; }
}

@media (max-width: 768px) {
    nav { display: none; }
    .mobile-menu-btn { display: block; }
    .page-hero h1 { font-size: 2.4rem; }
    .section-header h2 { font-size: 2.2rem; letter-spacing: -1px; }
    .footer-grid { grid-template-columns: 1fr; gap: 2rem; }
    .footer-bottom { flex-direction: column; gap: 0.5rem; text-align: center; }
    .stats-grid { grid-template-columns: 1fr; }
    .products-grid { grid-template-columns: 1fr 1fr; gap: 1.2rem; }
    .product-image { height: 220px; }
    .review-card { flex: 0 0 280px; }
    .user-link span { display: none; }
}

@media (max-width: 480px) {
    .products-grid { grid-template-columns: 1fr; }
    .cart-item { flex-wrap: wrap; }
    .detail-actions { flex-direction: column; }
}
