/* Google Fonts are loaded via <link> in header.php for better performance */

:root {
    /* Warm & Playful Palette */
    --primary: #FF6B6B;
    /* Soft Coral */
    --charcoal: #2d3748;
    --primary-light: #FF8787;
    --primary-dark: #FA5252;
    --primary-hover: #FA5252;
    --secondary: #4DABF7;
    /* Soft Blue */
    --accent: #FFD43B;
    /* Sunshine Yellow */
    --forest: #2B8A3E;
    /* Forest Green */
    --teal: #08979C;
    --teal-light: #e0f2fe;
    --teal-dark: #0369a1;

    /* Semantic Colors */
    --success: #38a169;
    --error: #e53e3e;
    --warning: #d69e2e;

    /* Layout Colors */
    --bg-body: #FFF9F6;
    /* Very light warm tint */
    --bg-warm: #FFF0E6;
    --text-main: #2D3436;
    --text-muted: #636E72;
    --border-color: #F1F2F6;

    /* Gradients */
    --primary-gradient: linear-gradient(135deg, #FF6B6B 0%, #FF8E53 100%);
    --surface-gradient: linear-gradient(180deg, rgba(255, 255, 255, 0.8) 0%, rgba(255, 255, 255, 0.4) 100%);

    /* Effects */
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 20px 25px -5px rgba(255, 107, 107, 0.15);

    /* Radius */
    --radius-sm: 12px;
    --radius-md: 18px;
    --radius-lg: 28px;
    --radius-xl: 32px;
    --radius-full: 9999px;

    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --bounce: cubic-bezier(0.68, -0.55, 0.265, 1.55);

    /* Safe Areas */
    --safe-top: env(safe-area-inset-top, 0px);
    --safe-bottom: env(safe-area-inset-bottom, 0px);
    --safe-left: env(safe-area-inset-left, 0px);
    --safe-right: env(safe-area-inset-right, 0px);
}

/* ===== RESET & BASE ===== */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    overflow-x: hidden !important;
    max-width: 100%;
}

body {
    background-color: var(--bg-body);
    color: var(--text-main);
    font-family: 'Nunito', sans-serif;
    line-height: 1.6;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    padding-top: 0;
    padding-bottom: calc(var(--safe-bottom) + 80px); /* Increased for bottom nav */
    padding-left: var(--safe-left);
    padding-right: var(--safe-right);
    overflow-x: hidden !important;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: 'Fredoka', sans-serif;
    color: var(--text-main);
    line-height: 1.2;
    margin-bottom: 0.5em;
    font-weight: 700;
}

h1 {
    font-size: clamp(1.75rem, 8vw, 2.5rem);
}

h2 {
    font-size: clamp(1.5rem, 6vw, 2rem);
}

h3 {
    font-size: clamp(1.2rem, 5vw, 1.5rem);
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: color var(--transition);
}

a:hover {
    color: var(--primary-hover);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* ===== UTILITIES ===== */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

.text-left {
    text-align: left;
}

.d-flex {
    display: flex;
}

.align-center {
    align-items: center;
}

.justify-between {
    justify-content: space-between;
}

.justify-center {
    justify-content: center;
}

.flex-wrap {
    flex-wrap: wrap;
}

.flex-column {
    flex-direction: column;
}

.gap-1 {
    gap: 1rem;
}

.gap-2 {
    gap: 2rem;
}

.mb-1 {
    margin-bottom: 1rem;
}

.mb-2 {
    margin-bottom: 2rem;
}

.mb-3 {
    margin-bottom: 3rem;
}

.mt-1 {
    margin-top: 1rem;
}

.mt-2 {
    margin-top: 2rem;
}

.mt-3 {
    margin-top: 3rem;
}

.mt-4 {
    margin-top: 4rem;
}

.mt-05 {
    margin-top: 0.5rem;
}

.pt-1 {
    padding-top: 1rem;
}

.pt-2 {
    padding-top: 2rem;
}

.p-1 {
    padding: 1rem;
}

.gap-0-5 {
    gap: 0.5rem;
}

.w-100 {
    width: 100%;
}

.text-muted {
    color: var(--text-muted);
}

.text-success {
    color: var(--success);
}

.text-error {
    color: var(--error);
}

.text-main {
    color: var(--text-main);
}

.font-weight-bold {
    font-weight: 700;
}

.font-weight-600 {
    font-weight: 600;
}

.bg-warm {
    background: var(--bg-warm);
}

.hidden {
    display: none !important;
}

/* Responsive Display Utilities */
.d-none {
    display: none !important;
}

.d-block {
    display: block !important;
}

.d-inline {
    display: inline !important;
}

.d-inline-block {
    display: inline-block !important;
}

/* Show/Hide on Mobile */
.d-md-none {
    display: none !important;
}

.d-md-block {
    display: block !important;
}

.d-md-inline {
    display: inline !important;
}

.d-md-inline-flex {
    display: inline-flex !important;
}

@media (max-width: 768px) {
    .d-md-none {
        display: block !important;
    }

    .d-md-block {
        display: none !important;
    }

    .d-md-inline {
        display: none !important;
    }

    .d-md-inline-flex {
        display: none !important;
    }

    .mobile-only {
        display: block !important;
    }

    .desktop-only {
        display: none !important;
    }
}

@media (min-width: 769px) {
    .mobile-only {
        display: none !important;
    }

    .desktop-only {
        display: block !important;
    }
}

/* ===== COMPONENTS ===== */

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.8rem 1.5rem;
    min-height: 44px;
    /* Minimum touch target */
    min-width: 44px;
    font-family: 'Nunito', sans-serif;
    font-weight: 800;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition);
    border: none;
    font-size: 1rem;
    gap: 0.5rem;
    background: transparent;
    text-decoration: none;
    color: var(--text-main);
}

.btn:hover {
    transform: translateY(-2px);
}

.btn:active {
    transform: translateY(0);
}

.btn-primary {
    background: var(--primary-gradient);
    color: white;
    box-shadow: var(--shadow-lg);
}

.btn-primary:hover {
    box-shadow: 0 12px 30px rgba(255, 107, 107, 0.4);
    color: white;
}

.btn-secondary {
    background: var(--secondary);
    color: white;
}

.btn-secondary:hover {
    opacity: 0.9;
    color: white;
}

.btn-outline {
    border: 2px solid var(--border-color);
    color: var(--text-main);
    background: white;
}

.btn-outline:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.btn-ghost {
    background: transparent;
    color: var(--text-muted);
}

.btn-ghost:hover {
    background: rgba(0, 0, 0, 0.05);
    color: var(--text-main);
}

/* Glass / Cards */
.glass {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.5);
}

.card {
    background: white;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    padding: 1rem;
    transition: all var(--transition);
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
    position: relative;
}

.card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary-light);
}

/* Specific image containers for cards */
.pet-image-box,
.shop-image-box {
    width: 100%;
    border-radius: var(--radius-sm);
    overflow: hidden;
    background: #f8fafc;
    margin-bottom: 1rem;
    position: relative;
}

.pet-image-box img,
.shop-image-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.card:hover .pet-image-box img,
.card:hover .shop-image-box img {
    transform: scale(1.05);
}

.lazy-image-4-3,
.lazy-image-content,
.gallery-fit {
    width: 100%;
    height: 100%;
    object-fit: cover;
}


/* Select2 Custom Styling */
.select2-container--default .select2-selection--single {
    border: 1px solid var(--border-color);
    border-radius: 12px;
    height: 48px;
    background-color: #f8fafc;
    display: flex;
    align-items: center;
    transition: all 0.2s ease;
}

.select2-container--default .select2-selection--single .select2-selection__rendered {
    color: var(--text-main);
    font-weight: 600;
    padding-left: 1rem;
}

.select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 46px;
    right: 10px;
}

.select2-dropdown {
    border: 1px solid var(--border-color);
    border-radius: 12px;
    box-shadow: var(--shadow-md);
    overflow: hidden;
}

.select2-results__option--highlighted[aria-selected] {
    background-color: var(--primary) !important;
}

.select2-container--default .select2-search--dropdown .select2-search__field {
    border-radius: 8px;
    margin: 4px;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="tel"],
textarea,
select {
    width: 100%;
    padding: 1rem;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    font-family: inherit;
    font-size: 1rem;
    background: white;
    transition: all var(--transition);
    outline: none;
}

input:focus,
textarea:focus,
select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(255, 107, 107, 0.1);
}

/* Badges */
.badge {
    display: inline-block;
    padding: 0.4rem 0.8rem;
    border-radius: var(--radius-full);
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
}

.badge-primary {
    background: var(--primary-gradient);
    color: white;
}

.badge-secondary {
    background: var(--teal-light);
    color: var(--teal-dark);
}

.badge-success {
    background: #E6FFFA;
    color: var(--success);
}

.badge-warning {
    background: #FFFBEB;
    color: var(--warning);
}

.badge-error {
    background: #FFF5F5;
    color: var(--error);
}

/* Alerts */
.alert {
    padding: 1rem;
    border-radius: var(--radius-md);
    margin-bottom: 1rem;
    font-weight: 600;
}

.alert-success {
    background: #E6FFFA;
    color: #276749;
    border: 1px solid #C6F6D5;
}

.alert-error {
    background: #FFF5F5;
    color: #C53030;
    border: 1px solid #FED7D7;
}

/* ===== NAVBAR ===== */
.navbar {
    position: sticky;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 1rem 5%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: transform 0.3s ease, padding 0.3s ease, background 0.3s ease, box-shadow 0.3s ease;
}



.navbar.scrolled {
    padding: 0.5rem 5%;
    box-shadow: var(--shadow-sm);
}

.nav-brand {
    font-size: 1.5rem;
    font-weight: 900;
    font-family: 'Fredoka', sans-serif;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
}

.nav-brand i {
    color: var(--primary);
    filter: drop-shadow(0 2px 4px rgba(255, 107, 107, 0.2));
}

.nav-brand span {
    color: var(--primary);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-item {
    font-weight: 700;
    color: var(--text-muted);
    font-size: 1rem;
    position: relative;
    cursor: pointer;
}

.nav-item.active,
.nav-item:hover {
    color: var(--primary);
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* Mobile Menu */
.mobile-toggle,
.mobile-menu-btn {
    display: none;
    font-size: 1.5rem;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-main);
}

/* Mobile Drawer */
.mobile-drawer-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.mobile-drawer {
    position: fixed;
    top: 0;
    right: -320px;
    width: 320px;
    height: 100vh;
    background: white;
    z-index: 2001;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    padding: 2.5rem 1.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    box-shadow: -15px 0 40px rgba(0, 0, 0, 0.1);
    overflow-y: auto;
}

@media (max-width: 480px) {
    .mobile-drawer {
        width: 85%;
        right: -85%;
    }
}

.mobile-drawer .nav-item {
    font-size: 1.15rem;
    padding: 1rem 1.25rem;
    border-radius: 12px;
    background: #f8fafc;
    margin-bottom: 0.25rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    color: var(--text-main);
    transition: all 0.2s ease;
}

.mobile-drawer .nav-item i {
    width: 24px;
    text-align: center;
    font-size: 1.1rem;
    color: var(--primary);
}

.mobile-drawer .nav-item:active,
.mobile-drawer .nav-item:hover {
    background: var(--bg-warm);
    color: var(--primary);
    transform: translateX(5px);
}


.mobile-drawer-links {
    display: flex;
    flex-direction: column;
}

.mobile-drawer.active {
    right: 0;
}

.mobile-drawer-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Profile Dropdown */
.profile-dropdown {
    position: relative;
}

.profile-menu {
    position: absolute;
    top: calc(100% + 15px);
    bottom: auto;
    right: 0;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    min-width: 220px;
    max-width: 280px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s ease;
    z-index: 1100;
    padding: 0.5rem 0;
    max-height: 400px;
    overflow-y: auto;
}

/* Alternative positioning when dropdown would clip at bottom */
.profile-menu.position-top {
    top: auto;
    bottom: calc(100% + 15px);
    transform: translateY(10px);
}

.profile-menu.position-top.active {
    transform: translateY(0);
}

.profile-menu.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.profile-item {
    display: block;
    padding: 0.8rem 1.2rem;
    color: var(--text-main);
    font-weight: 600;
    transition: background 0.2s;
    cursor: pointer;
    width: 100%;
    text-align: left;
    background: none;
    border: none;
}

.profile-item:hover {
    background: var(--bg-warm);
    color: var(--primary);
}

.profile-divider {
    height: 1px;
    background: var(--border-color);
    margin: 0.5rem 0;
}

/* ===== CART DRAWER ===== */
.cart-drawer-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0);
    backdrop-filter: blur(4px);
    z-index: 3000;
    visibility: hidden;
    transition: all 0.3s ease;
}

.cart-drawer {
    position: fixed;
    top: 0;
    right: -400px;
    width: 85%;
    max-width: 400px;
    height: 100%;
    background: white;
    z-index: 3001;
    transition: all 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.1);
}

.cart-drawer.active {
    right: 0;
}

.cart-drawer-overlay.active {
    background: rgba(0, 0, 0, 0.6);
    visibility: visible;
}

.cart-drawer-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cart-drawer-header h2 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 800;
}

.cart-close {
    background: none;
    border: none;
    font-size: 1.25rem;
    cursor: pointer;
    color: var(--text-muted);
}

.cart-drawer-body {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem;
}

.cart-empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text-muted);
}

.cart-empty-state i {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.3;
}

.cart-drawer-footer {
    padding: 1.5rem;
    border-top: 1px solid var(--border-color);
    background: var(--bg-warm);
}

.cart-total-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 1.5rem;
    font-weight: 800;
    font-size: 1.1rem;
}

.cart-item-mini {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    align-items: center;
}

.cart-item-mini img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: var(--radius-sm);
}

.cart-item-mini-info {
    flex: 1;
}

.cart-item-mini-title {
    font-weight: 700;
    font-size: 0.95rem;
    margin-bottom: 0.25rem;
}

.cart-item-mini-price {
    color: var(--primary);
    font-weight: 800;
    font-size: 0.9rem;
}

.cart-item-mini-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-top: 0.5rem;
}

.qty-btn-mini {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 1px solid var(--border-color);
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s;
}

.qty-btn-mini:hover {
    border-color: var(--primary);
    color: var(--primary);
}

/* ===== BOTTOM NAVIGATION (MOBILE) ===== */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 65px;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(15px);
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    display: none;
    justify-content: space-around;
    align-items: center;
    z-index: 2500;
    padding-bottom: env(safe-area-inset-bottom);
    box-shadow: 0 -5px 20px rgba(0, 0, 0, 0.03);
}

.bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.7rem;
    font-weight: 700;
    transition: all 0.3s;
    padding: 8px 0;
    flex: 1;
}

.bottom-nav-item i {
    font-size: 1.2rem;
    transition: transform 0.3s;
}

.bottom-nav-item.active {
    color: var(--primary);
}

.bottom-nav-item:active i {
    transform: scale(0.8);
}

@media (max-width: 768px) {
    .bottom-nav {
        display: flex;
        width: 100%;
        left: 0;
        right: 0;
        justify-content: space-evenly;
    }

    body {
        padding-bottom: 90px !important;
    }

    .container {
        padding-bottom: 40px;
    }
}


/* ===== HERO SECTION ===== */
.hero {
    padding: 4rem 0;
    text-align: center;
    background: linear-gradient(180deg, var(--bg-warm) 0%, var(--bg-body) 100%);
    border-radius: 0 0 var(--radius-xl) var(--radius-xl);
    margin-bottom: 3rem;
}

.hero h1 {
    font-family: 'Fredoka', sans-serif;
    font-weight: 950;
    font-size: clamp(2.5rem, 8vw, 4.5rem);
    margin-bottom: 1rem;
    line-height: 1.1;
    color: var(--text-main);
}

.hero p {
    font-family: 'Nunito', sans-serif;
    font-size: clamp(1.1rem, 2vw, 1.4rem);
    font-weight: 600;
    color: var(--text-muted);
    max-width: 700px;
    margin: 0 auto 2.5rem;
    opacity: 0.95;
}

/* ===== GRID SYSTEM & CARDS ===== */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 2rem;
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

@media (max-width: 768px) {
    .form-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
}

.shop-card {
    border: 2px solid transparent;
    background: linear-gradient(white, white) padding-box,
        linear-gradient(135deg, var(--sunshine), var(--sunshine-dark)) border-box;
}

.verified-card {
    border: 2px solid var(--success);
}

/* ====== TYPE SELECTOR ====== */
.type-selector {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding: 1.5rem 0.5rem;
    gap: 1.25rem;
    background: transparent;
    border: none;
    scrollbar-width: none;
    /* Firefox */
}

.type-selector::-webkit-scrollbar {
    display: none;
    /* Chrome/Safari */
}

.type-option {
    cursor: pointer;
    text-align: center;
    transition: transform var(--transition);
}

.type-option:hover {
    transform: translateY(-5px);
}

.type-option.active .type-bubble {
    border-color: var(--primary);
    transform: scale(1.1);
    box-shadow: 0 10px 20px rgba(255, 107, 107, 0.2);
}

.type-bubble {
    width: 70px;
    height: 70px;
    border-radius: 22px;
    overflow: hidden;
    margin: 0 auto 10px;
    border: 2px solid transparent;
    transition: all var(--transition);
}

.type-bubble img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ====== IMAGE UPLOAD ====== */
.image-upload-box {
    width: 160px;
    height: 160px;
    border: 2px dashed var(--border-color);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-warm);
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.image-upload-box:hover {
    border-color: var(--primary);
}

.removeBtn {
    position: absolute;
    top: 8px;
    right: 8px;
    background: var(--error);
    color: white;
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ====== FILTERS ====== */
.filter-section {
    background: white;
    padding: 2rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    margin-bottom: 2rem;
}

.filter-form {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
}

/* ====== TABLES ====== */
.premium-table-container {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
}

.premium-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 600px;
}

.premium-table th {
    background: var(--bg-warm);
    padding: 1rem;
    text-align: left;
    font-weight: 700;
    color: var(--text-muted);
}

.premium-table td {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
}

/* Table wrapper for horizontal scroll on mobile */
.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin-bottom: 1rem;
}

@media (max-width: 768px) {

    .premium-table th,
    .premium-table td {
        padding: 0.75rem 0.5rem;
        font-size: 0.9rem;
    }

    /* Add data labels for mobile card-style tables */
    .premium-table.mobile-cards thead {
        display: none;
    }

    .premium-table.mobile-cards tbody tr {
        display: block;
        margin-bottom: 1rem;
        border: 1px solid var(--border-color);
        border-radius: var(--radius-md);
        background: white;
    }

    .premium-table.mobile-cards td {
        display: block;
        text-align: right;
        padding: 0.75rem 1rem;
        border-bottom: 1px dashed var(--border-color);
    }

    .premium-table.mobile-cards td:last-child {
        border-bottom: none;
    }

    .premium-table.mobile-cards td::before {
        content: attr(data-label);
        float: left;
        font-weight: 700;
        color: var(--text-muted);
    }
}

/* ====== STICKY ACTION BAR ====== */
/* ====== HOME PAGE SPECIFIC ====== */
.promo-banner {
    background: var(--primary-gradient);
    color: white;
    padding: 0.75rem 1rem;
    text-align: center;
    font-weight: 700;
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-md);
    position: relative;
    z-index: 100;
}

.premium-banner {
    background: linear-gradient(135deg, #FF6B6B 0%, #FF8E53 50%, #FF6B6B 100%);
    background-size: 200% auto;
    animation: gradientShift 5s ease infinite;
}

.banner-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    flex-wrap: wrap;
    max-width: 1200px;
    margin: 0 auto;
}

.banner-icon {
    font-size: 1.25rem;
    background: rgba(255, 255, 255, 0.2);
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.banner-text {
    font-size: 1.1rem;
    font-weight: 800;
    letter-spacing: 0.5px;
}

.banner-offer {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(0, 0, 0, 0.1);
    padding: 4px 12px;
    border-radius: 30px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.special-badge {
    background: #FFD43B;
    color: #856404;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 900;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.banner-expiry {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    opacity: 0.9;
}

@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

.pulse {
    animation: pulseIcon 2s infinite;
}

@keyframes pulseIcon {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.1);
    }

    100% {
        transform: scale(1);
    }
}

@media (max-width: 768px) {
    .banner-content {
        gap: 0.75rem;
        flex-direction: column;
        padding: 0.5rem 0;
    }

    .banner-text {
        font-size: 0.95rem;
    }

    .banner-icon {
        display: none;
    }
}

.search-bar {
    display: flex;
    align-items: center;
    background: white;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-full);
    padding: 0.5rem;
    box-shadow: var(--shadow-lg);
    max-width: 600px;
    margin: 0 auto;
}

.search-bar input {
    border: none;
    box-shadow: none;
    background: transparent;
}

.search-bar input:focus {
    box-shadow: none;
    border: none;
}

.action-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem;
    text-decoration: none;
    color: var(--text-main);
    background: white;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    transition: all var(--transition);
}

.action-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary);
}

.action-icon {
    width: 60px;
    height: 60px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
}

.pride-section {
    background: linear-gradient(135deg, var(--teal), var(--teal-dark));
    color: white;
    padding: 4rem 2rem;
    border-radius: var(--radius-xl);
    text-align: center;
    position: relative;
    overflow: hidden;
}

/* ====== FOOTER ====== */
footer {
    background: white;
    color: var(--text-main);
    padding: 5rem 5% 3rem;
    margin-top: 5rem;
    border-top: 1px solid var(--border-color);
    position: relative;
}

footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--primary-gradient);
}

footer a {
    color: var(--text-muted);
    font-weight: 500;
    transition: all var(--transition);
}

footer a:hover {
    color: var(--primary);
    padding-left: 5px;
}

footer h3 {
    color: var(--text-main);
    font-family: 'Fredoka', sans-serif;
    font-weight: 700;
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    position: relative;
}

footer h3::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 30px;
    height: 3px;
    background: var(--primary);
    border-radius: 10px;
}

footer p {
    line-height: 1.8;
}

/* ===== ANIMATIONS ===== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes bounce {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }

    100% {
        transform: scale(1);
    }
}

/* ===== RESPONSIVE ===== */

/* Tablet Landscape (1024px and below) */
@media (max-width: 1024px) {
    .container {
        width: 92%;
        padding: 1.5rem 0;
    }

    .grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 1.5rem;
    }

    .filter-form {
        grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    }
}

/* Tablet Portrait (768px and below) */
@media (max-width: 768px) {

    /* Navigation */
    .nav-links {
        display: none;
    }

    .mobile-toggle,
    .mobile-menu-btn {
        display: block;
    }

    .navbar {
        padding: 0.8rem 1rem;
    }

    .nav-brand {
        font-size: 1.3rem;
    }

    .nav-actions {
        gap: 0.5rem;
    }

    .container {
        width: 100%;
        padding: 1.5rem 1rem;
    }

    .grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }

    /* Ensure action cards are full width on mobile */
    .action-card {
        padding: 1rem;
        gap: 0.75rem;
    }

    .action-icon {
        width: 44px;
        height: 44px;
        font-size: 1.1rem;
    }

    /* Typography */
    body {
        font-size: 15px;
    }

    h1 {
        font-size: 1.8rem;
    }

    h2 {
        font-size: 1.5rem;
    }

    h3 {
        font-size: 1.3rem;
    }

    /* Buttons - Ensure minimum touch target size */
    .btn {
        padding: 0.75rem 1.25rem;
        min-height: 44px;
        font-size: 0.95rem;
    }

    /* Cards */
    .card {
        padding: 1rem;
    }

    .warm-card:hover {
        transform: translateY(-3px) rotate(0deg);
    }

    /* Hero */
    .hero {
        padding: 2rem 0;
        margin-bottom: 2rem;
        border-radius: 0 0 var(--radius-md) var(--radius-md);
    }

    .hero h1 {
        font-size: 2rem;
        margin-bottom: 0.75rem;
    }

    .hero p {
        font-size: 1rem;
        margin-bottom: 1.5rem;
    }

    /* Forms */
    .filter-form {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    input,
    textarea,
    select {
        font-size: 16px;
        /* Prevents zoom on iOS */
        padding: 0.875rem;
    }


    /* High-Quality Top Dropdown for Mobile */
    .profile-menu {
        position: fixed !important;
        top: 75px !important;
        /* Positioned right under the header */
        right: 15px !important;
        left: 15px !important;
        bottom: auto !important;
        width: auto !important;
        max-width: 350px !important;
        margin-left: auto;
        /* Aligns to right on wider mobile screens */
        border-radius: var(--radius-lg) !important;
        transform: translateY(-20px) scale(0.95) !important;
        opacity: 0 !important;
        visibility: hidden !important;
        max-height: calc(100vh - 100px) !important;
        overflow-y: auto !important;
        z-index: 10000 !important;
        box-shadow: var(--shadow-lg) !important;
        border: 1px solid var(--border-color) !important;
        transition: all 0.3s cubic-bezier(0.165, 0.84, 0.44, 1) !important;
        display: block !important;
    }

    .profile-menu.active {
        transform: translateY(0) scale(1) !important;
        visibility: visible !important;
        opacity: 1 !important;
    }

    /* Overlay to emphasize the dropdown and handle dismiss */
    .profile-dropdown::before {
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.4);
        backdrop-filter: blur(2px);
        z-index: 9999;
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
        pointer-events: none;
    }

    .profile-dropdown.menu-open::before {
        opacity: 1;
        visibility: visible;
        pointer-events: all;
    }

    /* Handle is not needed for top dropdown */
    .mobile-sheet-handle {
        display: none !important;
    }

    /* Sticky Action Bar */
    .sticky-action-bar {
        display: flex;
        padding: 0.875rem;
        padding-bottom: calc(0.875rem + var(--safe-bottom));
    }

    /* Type Selector */
    .type-selector {
        grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
        gap: 1rem;
        padding: 1.5rem 1rem;
    }

    .type-bubble {
        width: 60px;
        height: 60px;
    }

    /* Search Bar */
    .search-bar {
        flex-direction: column;
        padding: 0.75rem;
        border-radius: var(--radius-md);
    }

    .search-bar input {
        margin-bottom: 0.5rem;
    }

    /* Action Cards */
    .action-card {
        padding: 1.25rem;
        flex-direction: column;
        text-align: center;
    }

    .action-icon {
        margin: 0 auto 0.75rem;
    }

    /* Footer */
    footer {
        padding: 3rem 5% 1.5rem;
        border-radius: var(--radius-md) var(--radius-md) 0 0;
    }

    /* Filter Section */
    .filter-section {
        padding: 1.5rem;
        margin-bottom: 1.5rem;
    }
}

/* Large Phones (600px and below) */
@media (max-width: 600px) {

    /* Product Grid - Compact 2 columns for mobile */
    .product-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 0.75rem;
    }

    @media (max-width: 380px) {
        .product-grid {
            grid-template-columns: 1fr;
        }

        .grid {
            grid-template-columns: 1fr;
        }
    }

    /* Reduce card padding further */
    .card,
    .warm-card {
        padding: 0.875rem;
    }

    /* Image Upload */
    .image-upload-box {
        width: 120px;
        height: 120px;
    }

    /* Carousel */
    .carousel-nav {
        width: 32px;
        height: 32px;
        font-size: 0.9rem;
    }

    .carousel-nav.prev {
        left: 0.5rem;
    }

    .carousel-nav.next {
        right: 0.5rem;
    }

    .thumb-nav-item {
        min-width: 60px;
        width: 60px;
    }

    /* Modal */
    .modal-content {
        width: 95%;
        padding: 1.5rem;
        max-height: 85vh;
    }
}

/* Small Phones (480px and below) */
@media (max-width: 480px) {

    /* Ultra-compact layout */
    .container {
        width: 96%;
    }

    .navbar {
        padding: 0.7rem 3%;
        gap: 0.5rem;
    }

    .nav-brand {
        font-size: 1rem;
        gap: 0.25rem;
        flex-shrink: 1;
        overflow: hidden;
    }

    .nav-brand span:last-child {
        white-space: nowrap;
    }

    .nav-actions {
        gap: 0.25rem;
    }

    /* Hide login/join on mobile header */
    .nav-actions .btn-guest {
        display: none !important;
    }

    .nav-actions {
        gap: 0.5rem;
    }

    .nav-brand {
        font-size: 1rem;
        gap: 0.25rem;
        flex-shrink: 1;
        overflow: hidden;
    }

    .nav-brand span:last-child {
        white-space: nowrap;
    }

    /* Typography */
    body {
        font-size: 14px;
    }

    h1 {
        font-size: 1.6rem;
    }

    h2 {
        font-size: 1.3rem;
    }

    h3 {
        font-size: 1.1rem;
    }

    /* Product Grid - Tighter gap for small screens */
    /* Product Grid - Force 1 column on mobile */
    .product-grid {
        grid-template-columns: 1fr !important;
        gap: 1rem;
    }

    .grid {
        grid-template-columns: 1fr !important;
        gap: 1rem;
    }

    /* Buttons */
    .btn {
        padding: 0.7rem 1rem;
        font-size: 0.9rem;
    }

    /* Cards */
    .card,
    .warm-card {
        padding: 0.75rem;
        border-radius: var(--radius-md);
    }

    /* Hero */
    .hero {
        padding: 1.5rem 0;
    }

    .hero h1 {
        font-size: 1.75rem;
    }

    .hero p {
        font-size: 0.95rem;
    }

    /* Type Selector - Smaller bubbles */
    .type-selector {
        grid-template-columns: repeat(auto-fill, minmax(70px, 1fr));
        gap: 0.75rem;
        padding: 1rem;
    }

    .type-bubble {
        width: 50px;
        height: 50px;
        border-radius: 15px;
    }

    .type-option label {
        font-size: 0.8rem;
    }

    /* Footer */
    footer {
        padding: 2rem 1rem 1rem;
        margin-bottom: 0;
    }

    footer h3 {
        font-size: 0.85rem;
    }

    /* Reduce spacing */
    .mb-1 {
        margin-bottom: 0.75rem;
    }

    .mb-2 {
        margin-bottom: 1.5rem;
    }

    .mb-3 {
        margin-bottom: 2rem;
    }

    .gap-1 {
        gap: 0.75rem;
    }

    .gap-2 {
        gap: 1.25rem;
    }

    /* Grids */
    .quick-stats-grid {
        grid-template-columns: 1fr !important;
        gap: 0.5rem !important;
    }

    .spec-grid {
        grid-template-columns: 1fr !important;
    }
}

/* Landscape Mode for Phones */
@media (max-width: 768px) and (orientation: landscape) {
    .hero {
        padding: 1.5rem 0;
    }

    .modal-content {
        max-height: 90vh;
    }

    .profile-menu {
        max-height: 80vh;
    }
}

/* ===== CAROUSEL ===== */
.carousel-wrapper {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    background: var(--bg-warm);
    aspect-ratio: 4/3;
}

.carousel-inner {
    display: flex;
    transition: transform 0.6s cubic-bezier(0.19, 1, 0.22, 1);
    height: 100%;
    width: 100%;
}

.carousel-item {
    min-width: 100%;
    height: 100%;
}

.carousel-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.carousel-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.8);
    border: none;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    color: var(--text-main);
    transition: all 0.2s;
}

.carousel-nav:hover {
    background: white;
    color: var(--primary);
}

.carousel-nav.prev {
    left: 1rem;
}

.carousel-nav.next {
    right: 1rem;
}

.carousel-dots {
    position: absolute;
    bottom: 1rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 0.5rem;
    z-index: 10;
}

.dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 0.3s;
}

.dot.active {
    background: white;
    transform: scale(1.2);
}

/* Standard Product Card (Premium) */
.product-card-premium {
    padding: 0 !important;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    position: relative;
    background: white;
    border: 1px solid rgba(0,0,0,0.04);
    border-radius: 24px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.03);
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    height: 100%;
}

.product-card-premium:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0,0,0,0.08);
    border-color: rgba(255,107,107,0.2);
}

.product-card-premium .image-container {
    position: relative;
    background: #f8fafc;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 220px;
    overflow: hidden;
}

.product-card-premium .image-container::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 60px;
    background: linear-gradient(to top, rgba(0,0,0,0.05), transparent);
    pointer-events: none;
}

.product-card-premium .image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.product-card-premium:hover .image-container img {
    transform: scale(1.12);
}

.product-card-premium .content-area {
    padding: 1.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    background: white;
    position: relative;
    z-index: 2;
}

.product-card-premium .badge-row {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0.85rem;
    flex-wrap: wrap;
}

.product-card-premium .product-title {
    font-size: 1.05rem;
    font-weight: 850;
    color: #1e293b;
    margin-bottom: 1rem;
    height: 2.6em;
    overflow: hidden;
    line-height: 1.3;
    transition: color 0.2s;
}

.product-card-premium:hover .product-title {
    color: var(--primary);
}

.product-card-premium .price-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
    padding-top: 1rem;
    border-top: 1px dashed #e2e8f0;
}

.product-card-premium .price-wrapper {
    display: flex;
    flex-direction: column;
}

.product-card-premium .current-price {
    font-size: 1.25rem;
    font-weight: 900;
    color: var(--primary);
}

.product-card-premium .old-price {
    font-size: 0.85rem;
    text-decoration: line-through;
    color: #94a3b8;
    margin-bottom: 2px;
}

.product-card-premium .cart-btn-icon {
    width: 42px;
    height: 42px;
    background: #fff0f0;
    color: var(--primary);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.product-card-premium .cart-btn-icon:hover {
    background: var(--primary);
    color: white;
    transform: scale(1.1) rotate(-5deg);
    box-shadow: 0 8px 15px rgba(255,107,107,0.3);
}

/* Brand Tag */
.product-card-premium .brand-tag {
    position: absolute;
    top: 16px;
    right: 16px;
    z-index: 10;
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(4px);
    color: #1e293b;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 900;
    text-transform: uppercase;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    letter-spacing: 0.5px;
    pointer-events: none;
    border: 1px solid rgba(255,255,255,0.5);
}

.thumb-scroll {
    display: flex;
    overflow-x: auto;
    gap: 0.8rem;
    margin-top: 1rem;
    padding-bottom: 0.5rem;
    scrollbar-width: none;
}

.thumb-nav-item {
    min-width: 80px;
    width: 80px;
    aspect-ratio: 1/1;
    border-radius: var(--radius-md);
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.2s;
}

.thumb-nav-item:hover,
.thumb-nav-item.active {
    border-color: var(--primary);
}

.thumb-nav-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Product Details */
.details-container {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 3rem;
    margin-bottom: 4rem;
}

.info-title {
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 900;
    line-height: 1.1;
    margin-bottom: 1rem;
}

.info-price {
    font-size: 2.5rem;
    font-weight: 900;
    color: var(--primary);
    margin-bottom: 2rem;
}

.spec-card {
    padding: 1rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    text-align: center;
    background: white;
}

.spec-card i {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--secondary);
}

@media (max-width: 900px) {
    .details-container {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

@media (max-width: 600px) {
    .details-container {
        gap: 1.5rem;
    }

    .product-image .carousel-wrapper,
    .main-gallery {
        height: 280px !important;
    }
}

/* ===== PROFILE ===== */
.profile-grid {
    display: grid;
    grid-template-columns: 350px 1fr;
    gap: 2rem;
    align-items: start;
}

.avatar-large {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    font-weight: 800;
}

.user-card-header {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* ===== CART ===== */
.cart-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 1rem;
}

.cart-row {
    background: white;
    box-shadow: var(--shadow-sm);
}

.cart-row td {
    padding: 1.5rem;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
    vertical-align: middle;
}

.cart-row td:first-child {
    border-left: 1px solid var(--border-color);
    border-radius: var(--radius-md) 0 0 var(--radius-md);
}

.cart-row td:last-child {
    border-right: 1px solid var(--border-color);
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
}

.cart-summary {
    background: white;
    padding: 2rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
}

@media (max-width: 900px) {

    /* Profile Grid - Stack vertically */
    .profile-grid {
        grid-template-columns: 1fr;
    }

    /* Details Container - Product/Pet view pages */
    .details-container {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    /* Info adjustments */
    .info-title {
        font-size: 1.75rem;
    }

    .info-price {
        font-size: 2rem;
        margin-bottom: 1.5rem;
    }

    /* Spec cards in grid */
    .spec-card {
        padding: 0.875rem;
    }

    /* Responsive Cart */
    .cart-table thead {
        display: none;
    }

    .cart-table,
    .cart-table tbody,
    .cart-row,
    .cart-row td {
        display: block;
        width: 100%;
    }

    .cart-row {
        margin-bottom: 1rem;
        border-radius: var(--radius-md);
        border: 1px solid var(--border-color);
    }

    .cart-row td {
        padding: 1rem;
        border: none;
        border-bottom: 1px dashed var(--border-color);
        text-align: right;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    .cart-row td::before {
        content: attr(data-label);
        font-weight: 700;
        color: var(--text-muted);
    }

    .cart-row td:last-child {
        border-bottom: none;
        justify-content: flex-end;
    }

    .cart-row td:first-child {
        display: block;
        text-align: left;
    }

    .cart-row td:first-child::before {
        display: none;
    }

    .cart-row td:first-child,
    .cart-row td:last-child {
        border-radius: 0;
        border-left: none;
        border-right: none;
    }

    /* Cart Summary - Make sticky on mobile */
    .cart-summary {
        position: sticky;
        bottom: 0;
        z-index: 100;
        margin-bottom: 0;
    }
}

/* Additional Mobile Optimizations for Very Small Screens */
@media (max-width: 600px) {

    /* Profile Avatar */
    .avatar-large {
        width: 80px;
        height: 80px;
        font-size: 2.5rem;
    }

    /* User Card Header */
    .user-card-header {
        flex-direction: column;
        text-align: center;
        gap: 0.75rem;
    }

    /* Info pricing */
    .info-price {
        font-size: 1.75rem;
    }

    /* Cart Summary */
    .cart-summary {
        padding: 1.5rem 1rem;
    }
}

/* ===== MODAL ===== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
}

.modal-content {
    background: white;
    border-radius: var(--radius-lg);
    padding: 2rem;
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
    animation: fadeInUp 0.3s;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-muted);
}

/* ============================================
   ADMIN REDESIGN SYSTEM
   Modern, Premium, and Responsive Admin UI
   ============================================ */

:root {
    --sidebar-width: 280px;
    --sidebar-bg: #1a1c23;
    --sidebar-hover: rgba(255, 255, 255, 0.05);
    --content-bg: #f4f7f6;
    --admin-primary: var(--coral, #FF6B6B);
    --admin-secondary: var(--teal, #2A9D8F);
    --admin-accent: var(--sunshine, #FFD93D);

    --card-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    --card-radius: 20px;
}

body.admin-page {
    background-color: var(--content-bg);
    margin: 0;
    padding-bottom: 0 !important;
    /* Remove bottom padding for bottom nav */
}

/* Hide main navbar and bottom navigation on admin pages */
body.admin-page .navbar,
body.admin-page .bottom-nav,
body.admin-page footer {
    display: none !important;
}

.admin-layout {
    display: flex;
    min-height: 100vh;
    max-width: 100vw;
    overflow-x: hidden;
}

/* Sidebar Styling */
.admin-sidebar {
    width: var(--sidebar-width);
    background: var(--sidebar-bg);
    color: white;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    height: 100vh;
    z-index: 1010;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 10px 0 30px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    padding: 0;
    /* Handled by internal sections */
}

.sidebar-content {
    flex: 1;
    overflow-y: auto;
    padding: 2.5rem 1.25rem 1.5rem;
}

/* Custom Scrollbar for Sidebar */
.sidebar-content::-webkit-scrollbar {
    width: 4px;
}

.sidebar-content::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}

.sidebar-footer {
    padding: 1.5rem 1.25rem 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.logout-link {
    color: #f87171 !important;
    background: rgba(248, 113, 113, 0.05);
}

.logout-link:hover {
    background: rgba(248, 113, 113, 0.1) !important;
}


.sidebar-close {
    display: none;
    position: absolute;
    top: 1.5rem;
    right: 1.25rem;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.2rem;
    transition: all 0.2s ease;
}

.sidebar-close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(90deg);
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 2.5rem;
    padding: 0 0.75rem;
    text-decoration: none;
    color: white;
}

.sidebar-brand i {
    font-size: 1.8rem;
    color: var(--admin-primary);
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: 14px;
    color: #9ea3b0;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.2s ease;
}

.sidebar-link:hover {
    background: var(--sidebar-hover);
    color: white;
}

.sidebar-link.active {
    background: var(--admin-primary);
    color: white;
    box-shadow: 0 8px 16px rgba(255, 107, 107, 0.3);
}

.sidebar-link i {
    font-size: 1.1rem;
    width: 20px;
    text-align: center;
}

/* Badge in sidebar */
.sidebar-link .badge {
    margin-left: auto;
    padding: 3px 8px;
    font-size: 0.75rem;
    font-weight: 800;
    border-radius: 8px;
    background: #FF6B6B;
    /* Direct coral for high visibility */
    color: white;
    box-shadow: 0 4px 10px rgba(255, 107, 107, 0.4);
    min-width: 20px;
    text-align: center;
}

.sidebar-link .badge-warning {
    background: #f59e0b;
    color: white;
    box-shadow: 0 4px 10px rgba(245, 158, 11, 0.4);
}

/* Content Area */
.admin-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    padding: 2.5rem 3rem;
    max-width: calc(100% - var(--sidebar-width));
}

.content-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 3rem;
}

.page-title h1 {
    font-size: clamp(1.5rem, 4vw, 2rem);
    font-weight: 800;
    letter-spacing: -0.04em;
    color: #1e293b;
    margin: 0;
}

.page-title p {
    color: #64748b;
    margin-top: 4px;
    font-weight: 500;
}

/* Header Actions */
.header-profile {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: white;
    padding: 8px 12px 8px 20px;
    border-radius: 16px;
    box-shadow: var(--card-shadow);
}

.profile-info {
    text-align: right;
}

.profile-name {
    font-weight: 800;
    font-size: 0.95rem;
    color: #1e293b;
}

.profile-status {
    font-size: 0.75rem;
    color: #10b981;
    font-weight: 700;
}

.profile-avatar {
    width: 44px;
    height: 44px;
    background: #f1f5f9;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    color: #1e293b;
    border: 2px solid white;
}

/* Dashboard Cards (Pulse Grid) */
.pulse-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.pulse-card {
    padding: 1.75rem;
    border-radius: 24px;
    background: white;
    border: 1px solid rgba(226, 232, 240, 0.6);
    box-shadow: var(--card-shadow);
    display: flex;
    flex-direction: column;
    gap: 10px;
    position: relative;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.pulse-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.08);
}

.pulse-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--accent-color, var(--admin-primary));
}

.pulse-icon {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    background: rgba(255, 107, 107, 0.1);
    color: var(--admin-primary);
    margin-bottom: 0.5rem;
}

.pulse-label {
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    color: #64748b;
    letter-spacing: 0.05em;
}

.pulse-value {
    font-size: 2.25rem;
    font-weight: 900;
    color: #0f172a;
    line-height: 1;
    margin: 4px 0;
}

.pulse-trend {
    font-size: 0.85rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Admin Cards */
.admin-card {
    background: white;
    border-radius: var(--card-radius);
    padding: 2rem;
    box-shadow: var(--card-shadow);
    border: 1px solid rgba(226, 232, 240, 0.6);
    margin-bottom: 2rem;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.card-title {
    font-size: 1.25rem;
    font-weight: 800;
    color: #1e293b;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.card-title i {
    color: var(--admin-primary);
}

/* Premium Table Improvements */
.premium-table-container {
    background: white;
    border-radius: 16px;
    overflow-x: auto;
    border: 1px solid #f1f5f9;
    -webkit-overflow-scrolling: touch;
}

.premium-table {
    width: 100%;
    border-collapse: collapse;
}

.premium-table thead tr {
    background: #f8fafc;
}

.premium-table th {
    padding: 1.25rem 1.5rem;
    text-align: left;
    font-size: 0.75rem;
    font-weight: 800;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 2px solid #f1f5f9;
}

.premium-table td {
    padding: 1.25rem 1.5rem;
    vertical-align: middle;
    border-bottom: 1px solid #f1f5f9;
}

.premium-table tbody tr {
    transition: background 0.2s ease;
}

.premium-table tbody tr:hover {
    background: #fcfdfe;
}

.pet-thumb {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    object-fit: cover;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

/* Custom Scrollbar for Sidebar */
.admin-sidebar::-webkit-scrollbar {
    width: 4px;
}

.admin-sidebar::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}

/* Responsive Overrides */
@media (max-width: 1200px) {
    .admin-content {
        padding: 2rem 1.5rem;
    }
}

@media (max-width: 768px) {
    .admin-content {
        padding: 1.5rem 1rem;
    }

    .pulse-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .pulse-card {
        padding: 1.25rem;
    }

    .pulse-value {
        font-size: 1.8rem;
    }
}

@media (max-width: 1024px) {
    .admin-sidebar {
        transform: translateX(-100%);
        width: 260px;
    }

    .admin-sidebar.open {
        transform: translateX(0);
    }

    .sidebar-close {
        display: flex;
    }

    .admin-content {
        margin-left: 0;
        max-width: 100%;
        padding: 1.5rem;
        overflow-x: hidden;
    }

    .mobile-admin-toggle {
        display: flex !important;
        align-items: center;
        gap: 8px;
        padding: 10px 16px;
        background: white;
        border: none;
        box-shadow: var(--card-shadow);
        border-radius: 12px;
        font-weight: 800;
        margin-bottom: 2rem;
        cursor: pointer;
    }

    .sidebar-overlay {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.4);
        backdrop-filter: blur(4px);
        z-index: 1000;
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
    }

    .sidebar-overlay.show {
        opacity: 1;
        visibility: visible;
    }
}

@media (max-width: 768px) {
    .content-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1.5rem;
    }

    .header-profile {
        width: 100%;
        justify-content: space-between;
    }

    /* Additional Mobile Optimizations */
    .page-title h1 {
        font-size: 1.5rem;
    }

    .page-title p {
        font-size: 0.85rem;
    }

    .admin-card {
        padding: 1.25rem;
        border-radius: 16px;
    }

    .card-title {
        font-size: 1rem;
    }

    /* Make tables scroll horizontally on mobile */
    .premium-table-container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .premium-table {
        min-width: 900px;
        /* Force horizontal scroll */
    }

    /* Smaller buttons on mobile */
    .btn {
        padding: 0.7rem 1rem;
        font-size: 0.85rem;
    }

    /* Stats cards single column */
    .pulse-grid,
    [style*="grid-template-columns"] {
        grid-template-columns: 1fr !important;
    }

    /* Reduce form grid to single column */
    .form-grid,
    form[style*="grid-template-columns"] {
        grid-template-columns: 1fr !important;
    }
}

/* Extra Small Devices (phones in portrait) */
@media (max-width: 480px) {
    .admin-content {
        padding: 1rem 0.75rem;
    }

    .content-header {
        gap: 1rem;
    }

    .mobile-admin-toggle {
        padding: 8px 12px;
        font-size: 0.85rem;
        margin-bottom: 1rem;
    }

    .profile-avatar {
        width: 36px;
        height: 36px;
        font-size: 0.9rem;
    }

    .profile-name {
        font-size: 0.85rem;
    }

    .profile-status {
        font-size: 0.7rem;
    }

    .pulse-card {
        padding: 1rem;
    }

    .pulse-value {
        font-size: 1.5rem;
    }

    .pulse-icon {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }

    .admin-card {
        padding: 1rem;
    }

    /* Smaller thumbnails */
    .pet-thumb {
        width: 40px;
        height: 40px;
    }

    /* Touch-friendly action buttons */
    .btn {
        min-height: 44px;
        min-width: 44px;
    }
}

/* Stats Cards Styling */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stats-card {
    background: white;
    padding: 1.5rem;
    border-radius: 20px;
    display: flex;
    align-items: center;
    gap: 1.25rem;
    box-shadow: var(--card-shadow);
    border: 1px solid rgba(226, 232, 240, 0.6);
    transition: transform 0.3s ease;
}

.stats-card:hover {
    transform: translateY(-5px);
}

.stats-icon {
    width: 54px;
    height: 54px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.stats-info h4 {
    font-size: 0.85rem;
    font-weight: 700;
    color: #64748b !important;
    margin: 0 !important;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.stats-info p {
    font-size: 1.75rem;
    font-weight: 900;
    color: #1e293b;
    margin: 0 !important;
    line-height: 1.2;
}

@media (max-width: 768px) {
    .stats-grid {
        grid-template-columns: 1fr !important;
        gap: 1rem;
    }

    .stats-card {
        padding: 1.25rem;
    }
}

.pulse-grid-secondary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

@media (max-width: 768px) {
    .pulse-grid-secondary {
        grid-template-columns: 1fr !important;
        gap: 1.5rem;
    }
}