/*
 * ============================================================
 * Ahmadiyad - Premium Women's Undergarments E-Commerce
 * Developed by: Etarnity Global Innovation
 * Website: https://etarnity.com
 * ============================================================
 */

/* ============================================================
 * CUSTOM FONTS
 * ============================================================ */
@font-face {
    font-family: 'AllisDemo';
    src: url('../fonts/AllisDemo-V4a8e.otf') format('opentype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

/* ============================================================
 * CSS VARIABLES — Feminine Blush & Rose Palette
 * ============================================================
 *
 * Palette Source: User-provided color swatch
 *   Light Periwinkle  #D0D8E6  — Footer, subtle sections
 *   Light Blush Pink  #F2D3D3  — Accent, highlights, badges
 *   Dusty Rose        #EDB0B1  — Hover states, soft accents, sidebar active
 *   Pastel Red        #E67E7F  — Buttons, CTAs, active states, floating cart
 *   Cocoa Brown       #915E56  — Secondary text, descriptions, icons
 *   Onyx              #020202  — Primary text, headings
 *   White             #FFFFFF  — Pure white backgrounds (no pink tint)
 */
:root {
    --primary: #FCE4EC;
    --secondary: #D5006D;
    --tertiary: #FF4081;
    --accent: #FF4081;
    --cocoa: #4A1F27;
    --text: #4A1F27;
    --white: #FFFFFF;
    --font: 'Poppins', sans-serif;
    --brand-font: 'AllisDemo', cursive;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 8px 30px rgba(0, 0, 0, 0.12);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --radius-sm: 8px;
    --radius: 12px;
    --radius-lg: 16px;
    --radius-full: 50px;
    --navbar-height: 70px;
    --bottom-nav-height: 65px;
}

/* ============================================================
 * RESET & BASE
 * ============================================================ */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font);
    background: var(--white);
    color: var(--text);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

button {
    border: none;
    background: none;
    cursor: pointer;
    font-family: var(--font);
    transition: var(--transition);
}

input {
    font-family: var(--font);
    border: none;
    outline: none;
    background: none;
}

ul, ol {
    list-style: none;
}

img {
    max-width: 100%;
    display: block;
}

/* ============================================================
 * NAVBAR
 * ============================================================ */
.navbar {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: var(--white);
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    transition: var(--transition);
}

.navbar.scrolled {
    box-shadow: var(--shadow-md);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    background: rgba(255, 255, 255, 0.95);
}

.navbar-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 24px;
    height: var(--navbar-height);
    display: flex;
    align-items: center;
    gap: 16px;
}

/* --- Brand --- */
.brand-name {
    font-family: var(--brand-font);
    font-size: 26px;
    font-weight: normal;
    color: var(--text);
    letter-spacing: 0;
    white-space: nowrap;
    flex-shrink: 0;
}

.brand-name:hover {
    opacity: 0.8;
}

/* --- Navbar Left --- */
.navbar-left {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-shrink: 0;
}

/* --- Page Back Button --- */
.page-back-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 15px;
    font-weight: 500;
    color: var(--onyx);
    background: none;
    border: none;
    cursor: pointer;
    margin-bottom: 20px;
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    transition: var(--transition);
    background-color: rgba(0,0,0,0.03);
    border: 1px solid rgba(0,0,0,0.05);
}

.page-back-btn i {
    font-size: 18px;
    transition: var(--transition);
}

.page-back-btn:hover {
    color: var(--secondary);
    background-color: var(--white);
    border-color: var(--secondary);
    box-shadow: 0 4px 12px rgba(213, 0, 109, 0.2);
}

.page-back-btn:hover i {
    transform: translateX(-4px);
}

/* --- Hamburger (hidden desktop) --- */
.hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 40px;
    height: 40px;
    cursor: pointer;
    gap: 5px;
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

.hamburger:hover {
    background: rgba(0, 0, 0, 0.04);
}

.hamburger span {
    display: block;
    width: 20px;
    height: 2px;
    background: var(--text);
    border-radius: 2px;
    transition: var(--transition);
}

.hamburger.active span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}
.hamburger.active span:nth-child(2) {
    opacity: 0;
}
.hamburger.active span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* --- Navbar Center --- */
.navbar-center {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    min-width: 0;
}

/* --- Search Bar (Pure white / neutral grey - no pink) --- */
.search-bar {
    flex: 1;
    max-width: 620px;
    display: flex;
    align-items: center;
    background: #F5F5F5;
    border: 2px solid transparent;
    border-radius: var(--radius-full);
    padding: 0 4px 0 16px;
    height: 44px;
    transition: var(--transition);
}

.search-bar:focus-within {
    background: var(--white);
    border-color: var(--secondary);
    box-shadow: 0 0 0 4px rgba(213, 0, 109, 0.15);
}

.search-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    color: #888;
    font-size: 16px;
    flex-shrink: 0;
    transition: var(--transition);
}

.search-btn:hover {
    color: var(--secondary);
    background: rgba(213, 0, 109, 0.1);
}

.search-input {
    flex: 1;
    height: 100%;
    font-size: 14px;
    font-weight: 400;
    color: var(--text);
    background: transparent;
}

.search-input::placeholder {
    color: #999;
}

/* --- All Products Button --- */
.all-products-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 18px;
    background: var(--secondary);
    color: var(--white);
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
    flex-shrink: 0;
    transition: var(--transition);
}

.all-products-btn:hover {
    background: #FF4081;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(213, 0, 109, 0.4);
}

.all-products-btn i {
    font-size: 14px;
}

/* --- Navbar Right --- */
.navbar-right {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
}

/* --- Nav Icon (Wishlist + Cart) --- */
.nav-icon {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    font-size: 20px;
    color: var(--text);
    transition: var(--transition);
}

.nav-icon:hover {
    background: rgba(213, 0, 109, 0.1);
}

/* --- Wishlist Icon --- */
.wishlist-icon:hover {
    color: var(--secondary);
}

.wishlist-count {
    position: absolute;
    top: 2px;
    right: 2px;
    min-width: 18px;
    height: 18px;
    display: none;
    align-items: center;
    justify-content: center;
    background: #0f0f0f;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    border-radius: 50px;
    padding: 0 4px;
}

.wishlist-count.visible {
    display: flex;
}

/* --- Cart Count Badge --- */
.cart-count {
    position: absolute;
    top: 2px;
    right: 2px;
    min-width: 18px;
    height: 18px;
    display: none;
    align-items: center;
    justify-content: center;
    background: #0f0f0f;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    border-radius: 50px;
    padding: 0 4px;
}

.cart-count.visible {
    display: flex;
}

/* --- Auth Buttons --- */
.nav-btn {
    padding: 9px 20px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
    transition: var(--transition);
}

.login-btn {
    border: 1.5px solid var(--cocoa);
    color: var(--cocoa);
    background: transparent;
}

.login-btn:hover {
    background: var(--cocoa);
    color: var(--white);
    transform: translateY(-1px);
}

.signup-btn {
    background: var(--secondary);
    color: var(--white);
    border: 1.5px solid var(--secondary);
}

.signup-btn:hover {
    background: #FF4081;
    border-color: #FF4081;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(213, 0, 109, 0.4);
}

/* --- Mobile Only / Desktop Only --- */
.mobile-only {
    display: none !important;
}

.desktop-only {
    display: flex !important;
}

.mobile-search-toggle {
    display: none !important;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    font-size: 20px;
    color: var(--text);
    transition: var(--transition);
}

.mobile-search-toggle:active {
    background: rgba(213, 0, 109, 0.1);
}

/* ============================================================
 * MOBILE SEARCH BAR
 * ============================================================ */
.mobile-search-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1001;
    background: var(--white);
    padding: 12px 16px;
    transform: translateY(-100%);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--shadow-lg);
}

.mobile-search-bar.active {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.mobile-search-container form {
    display: flex;
    align-items: center;
    background: #F5F5F5;
    border: 2px solid var(--secondary);
    border-radius: var(--radius-full);
    padding: 0 4px 0 16px;
    height: 48px;
}

.mobile-search-container i {
    font-size: 18px;
    color: #999;
    margin-right: 10px;
}

.mobile-search-container input {
    flex: 1;
    height: 100%;
    font-size: 15px;
    color: var(--text);
}

.mobile-search-container input::placeholder {
    color: #999;
}

.mobile-search-close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    font-size: 16px;
    color: #888;
    transition: var(--transition);
}

.mobile-search-close:hover {
    background: rgba(0, 0, 0, 0.06);
    color: var(--text);
}

/* ============================================================
 * SIDEBAR OVERLAY
 * ============================================================ */
.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1100;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: all 0.3s ease;
}

.sidebar-overlay.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

/* ============================================================
 * SIDEBAR
 * ============================================================ */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 1101;
    width: 300px;
    max-width: 85vw;
    background: var(--white);
    transform: translateX(-100%);
    visibility: hidden;
    pointer-events: none;
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.35s ease;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.sidebar.active {
    transform: translateX(0);
    visibility: visible;
    pointer-events: auto;
}

/* --- Sidebar Header --- */
.sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    flex-shrink: 0;
}

.sidebar-brand {
    font-family: var(--brand-font);
    font-size: 24px;
    font-weight: normal;
    color: var(--text);
    letter-spacing: 0;
}

.sidebar-close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    font-size: 18px;
    color: #888;
    transition: var(--transition);
}

.sidebar-close:hover {
    background: rgba(0, 0, 0, 0.06);
    color: var(--text);
}

/* --- Sidebar Footer (FIXED AT BOTTOM) --- */
.sidebar-footer {
    flex-shrink: 0;
    padding: 16px 20px;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
    background: var(--white);
}

.sidebar-footer p {
    font-size: 13px;
    color: #888;
    margin-bottom: 12px;
}

.sidebar-auth-btns {
    display: flex;
    gap: 8px;
}

.sidebar-auth-btn {
    flex: 1;
    text-align: center;
    padding: 10px 16px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 600;
    transition: var(--transition);
}

.sidebar-auth-btn.login {
    border: 1.5px solid var(--cocoa);
    color: var(--cocoa);
}

.sidebar-auth-btn.login:hover {
    background: var(--cocoa);
    color: var(--white);
}

.sidebar-auth-btn.signup {
    background: var(--secondary);
    color: var(--white);
}

.sidebar-auth-btn.signup:hover {
    background: #FF4081;
}

.sidebar-user-info {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    cursor: pointer;
    transition: opacity 0.2s ease;
    width: 100%;
}

.sidebar-user-info:hover {
    opacity: 0.85;
}

.sidebar-avatar {
    font-size: 36px;
    color: var(--secondary);
    flex-shrink: 0;
}

.sidebar-user-name {
    font-size: 15px;
    font-weight: 600;
    color: var(--text);
    margin: 0;
}

/* --- Sidebar Menu --- */
.sidebar-menu {
    flex: 1;
    overflow-y: auto;
    padding: 8px 0;
    -webkit-overflow-scrolling: touch;
}

.sidebar-menu::-webkit-scrollbar {
    width: 3px;
}
.sidebar-menu::-webkit-scrollbar-track {
    background: transparent;
}
.sidebar-menu::-webkit-scrollbar-thumb {
    background: #ddd;
    border-radius: 10px;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text);
    transition: var(--transition);
}

.sidebar-link:hover {
    background: rgba(213, 0, 109, 0.08);
    color: var(--cocoa);
}

.sidebar-link i {
    font-size: 18px;
    color: #888;
    width: 22px;
    text-align: center;
    transition: var(--transition);
}

.sidebar-link:hover i {
    color: var(--secondary);
}

/* --- Sidebar Link Badge (Wishlist count in sidebar) --- */
.sidebar-link-badge {
    margin-left: auto;
    min-width: 20px;
    height: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--secondary);
    color: var(--white);
    font-size: 10px;
    font-weight: 700;
    border-radius: 50px;
    padding: 0 5px;
}

.sidebar-logout {
    color: var(--secondary);
}
.sidebar-logout i {
    color: var(--secondary);
}
.sidebar-logout:hover {
    background: rgba(213, 0, 109, 0.08);
}

.sidebar-divider {
    height: 1px;
    background: rgba(0, 0, 0, 0.06);
    margin: 6px 20px;
}

.sidebar-section-title {
    padding: 10px 20px 6px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    color: #999;
}

/* --- Sidebar Category (Accordion) --- */
.sidebar-category {
    overflow: hidden;
}

.category-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 11px 20px;
    cursor: pointer;
    transition: var(--transition);
}

.category-header:hover {
    background: rgba(213, 0, 109, 0.06);
}

.category-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.category-left i {
    font-size: 18px;
    color: #888;
    width: 22px;
    text-align: center;
    transition: var(--transition);
}

.category-header:hover .category-left i {
    color: var(--secondary);
}

.category-left span {
    font-size: 14px;
    font-weight: 500;
    color: var(--text);
}

.category-arrow {
    font-size: 14px;
    color: #999;
    transition: transform 0.3s ease;
}

.sidebar-category.open .category-arrow {
    transform: rotate(180deg);
}

.subcategory-list {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.sidebar-category.open .subcategory-list {
    max-height: 400px;
}

.subcategory-list a {
    display: block;
    padding: 9px 20px 9px 54px;
    font-size: 13px;
    font-weight: 400;
    color: #666;
    transition: var(--transition);
    position: relative;
}

.subcategory-list a::before {
    content: '';
    position: absolute;
    left: 36px;
    top: 50%;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: #ccc;
    transform: translateY(-50%);
    transition: var(--transition);
}

.subcategory-list a:hover {
    color: var(--text);
    background: rgba(213, 0, 109, 0.06);
}

.subcategory-list a:hover::before {
    background: var(--secondary);
}

/* ============================================================
 * BOTTOM NAV (Mobile)
 * ============================================================ */
.bottom-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1060;
    background: var(--white);
    border-top: 1px solid rgba(0, 0, 0, 0.06);
    height: var(--bottom-nav-height);
    padding: 0 8px;
    padding-bottom: env(safe-area-inset-bottom, 0);
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
}

.bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 1;
    height: 100%;
    gap: 3px;
    color: #999;
    font-size: 10px;
    font-weight: 500;
    transition: var(--transition);
    position: relative;
}

.bottom-nav-item i {
    font-size: 20px;
    transition: var(--transition);
}

.bottom-nav-item.active,
.bottom-nav-item:hover {
    color: var(--secondary);
}

.bottom-nav-item.active i,
.bottom-nav-item:hover i {
    transform: scale(1.1);
}

.bottom-nav-item.active::before,
.bottom-nav-item:hover::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 24px;
    height: 3px;
    background: var(--secondary);
    border-radius: 0 0 3px 3px;
}

.bottom-nav-item:active {
    transform: scale(0.92);
}

/* --- Bottom Nav Cart Badge --- */
.bottom-nav-cart-count {
    position: absolute;
    top: 4px;
    right: 50%;
    transform: translateX(calc(50% + 8px));
    min-width: 16px;
    height: 16px;
    display: none;
    align-items: center;
    justify-content: center;
    background: #0f0f0f;
    color: #fff;
    font-size: 9px;
    font-weight: 700;
    border-radius: 50px;
    padding: 0 4px;
    font-family: var(--font);
}

.bottom-nav-cart-count.visible {
    display: flex;
}

/* ============================================================
 * MAIN CONTENT
 * ============================================================ */
.main-content {
    min-height: calc(100vh - var(--navbar-height) - 200px);
}

/* ============================================================
* FLOATING CART WIDGET (PC Only)
* Original Design: Onyx (#020202) bg, white cart icon, blush pink count badge
* 62x62px, all corners rounded (18px), bottom-right corner
* Hidden on mobile — bottom nav cart badge used instead.
* ============================================================ */
.floating-cart {
    display: flex;
    position: fixed;
    bottom: 32px;
    right: 32px;
    z-index: 998;
    width: 62px;
    height: 62px;
    background: var(--text);
    border-radius: 18px;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 24px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    transition: var(--transition);
    text-decoration: none;
}

.floating-cart:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
}

.floating-cart:active {
    transform: scale(0.95);
}

/* --- Count Badge (Blush Pink, always visible) --- */
.floating-cart .floating-cart-count {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary);
    color: var(--text);
    font-size: 11px;
    font-weight: 700;
    font-family: var(--font);
    border-radius: 50px;
    padding: 0 5px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

/* ============================================================
 * UNIVERSAL PAGINATION
 * ============================================================ */
.ahm-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    margin: 24px 0 10px;
    flex-wrap: wrap;
    width: 100%;
}

.ahm-page-btn {
    width: 38px;
    height: 38px;
    border-radius: 8px;
    border: 1px solid #E2E8F0;
    background: #FFFFFF;
    color: #475569;
    font-size: 13px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: all 0.2s ease;
    cursor: pointer;
    box-sizing: border-box;
}

.ahm-page-btn:hover:not(.disabled):not(.active) {
    background: #F8FAFC;
    border-color: #CBD5E1;
    color: #0F172A;
    transform: translateY(-1px);
}

.ahm-page-btn.active {
    background: var(--secondary, #D5006D) !important;
    border-color: var(--secondary, #D5006D) !important;
    color: #FFFFFF !important;
    box-shadow: 0 4px 12px rgba(213, 0, 109, 0.35);
}

.ahm-page-btn.disabled, .ahm-page-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
    pointer-events: none;
    background: #F8FAFC;
    color: #94A3B8;
}

.ahm-page-dots {
    padding: 0 6px;
    color: #94A3B8;
    font-weight: 700;
    font-size: 14px;
}


