html {
    font-size: 16px;
    scroll-behavior: smooth;
}

/* Tablet and larger */
@media (max-width: 1024px) {
    html {
        font-size: 15px;
    }
}

/* Tablet */
@media (max-width: 768px) {
    html {
        font-size: 14px;
    }
    
    body {
        padding: 8px;
        font-size: 15px;
    }
    .container, .container-header {
        max-width: 100vw;
        padding: 0 8px;
    }
    header {
        font-size: 1rem;
        padding: 10px 0;
    }
    nav {
        flex-direction: column;
        gap: 10px;
    }
    .shop-detail-container, .shop-card, .service-card {
        max-width: 100vw;
        margin: 10px auto;
        padding: 10px;
        border-radius: 8px;
    }
    .shop-detail-header {
        flex-direction: column;
        gap: 10px;
        align-items: center;
    }
    .shop-detail-img {
        width: 90vw;
        height: auto;
        max-width: 320px;
        max-height: 220px;
    }
    .shop-detail-info {
        padding: 15px 10px;
    }
    .services-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    .service-card {
        padding: 12px 6px;
    }
    .service-icon {
        width: 48px;
        height: 48px;
        font-size: 1.3rem;
    }
    .add-to-cart-btn {
        font-size: 0.9rem;
        padding: 8px 10px;
    }
    footer {
        font-size: 0.9rem;
        padding: 12px 8px;
    }
    .footer-content {
        flex-direction: column;
        gap: 12px;
    }
    .section-title {
        font-size: 1.1rem;
    }
    h1, h2, h3 {
        font-size: 1.2rem;
    }
    img, video {
        max-width: 100%;
        height: auto;
    }
}
:root {
    --primary: #0F4C7A;
    --secondary: #1A5F99;
    --accent: #00A8E8;
    --light: #E8F4F8;
    --dark: #0A2E47;
    --mid-dark: #0F4C7A;
    --medium: #00A8E8;
    --warning: #f59e0b;
    --danger: #ef4444;
    --card-bg: #ffffff;
    --card-accent: #00A8E8;
    --card-hover: #E8F4F8;
    --text-light: #0F4C7A;
    --gradient-1: linear-gradient(135deg, #0A2E47 0%, #0F4C7A 100%);
    --gradient-2: linear-gradient(135deg, #0F4C7A 0%, #00A8E8 100%);
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

/* Base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: #f8f8f8;
    color: var(--dark);
    line-height: 1.6;
    overflow-x: hidden; /* ADDED: Prevent horizontal overflow on mobile */
}

/* Container */
.container {
    width: 100%;
    max-width: 1300px;
    margin: 0 auto;
    padding: 0 15px;
}

.container-header {
    max-width: 1300px;
    padding-left: 0 !important;
}

/* Header */
header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    color: var(--dark);
    box-shadow: var(--shadow-md);
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: nowrap;
    padding: 14px 0;
    gap: 16px;
    position: relative;
}

.logo {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.logo h1 {
    font-size: 1.4rem;
    font-weight: 800;
    margin-left: 3px;
    letter-spacing: -0.5px;
    color: var(--primary);
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.logo img {
    height: 64px;
    width: auto;
    margin-right: 12px;
    max-width: 64px; /* Keeps logo size proportional */
}

/* Hamburger Menu Button */
.hamburger-menu {
    display: none;
    flex-direction: column;
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px 0;
    gap: 5px;
    flex-shrink: 0;
    margin-left: auto;
    margin-right: 16px;
    z-index: 101;
}

.hamburger-menu span {
    width: 28px;
    height: 3px;
    background: var(--primary);
    border-radius: 2px;
    transition: all 0.3s ease;
    display: block;
}

.hamburger-menu.active span:nth-child(1) {
    transform: rotate(45deg) translate(8px, 8px);
}

.hamburger-menu.active span:nth-child(2) {
    opacity: 0;
}

.hamburger-menu.active span:nth-child(3) {
    transform: rotate(-45deg) translate(8px, -8px);
}

.nav-flex {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-grow: 1;
    justify-content: flex-end;
}

.nav-links {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 0;
}

.nav-links li {
    padding: 0;
    margin: 0 2px;
}

.nav-links a {
    text-decoration: none;
    color: var(--medium);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 7px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 0.95rem;
    background: transparent;
}

.nav-links a:hover {
    background: var(--accent);
    color: white;
    transform: translateY(-1px);
}

/* Cart Icon */
.nav-cart-icon {
    position: relative;
    font-size: 1.5rem;
    color: var(--primary);
    text-decoration: none;
    margin: 0 15px;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    cursor: pointer;
}

.nav-cart-icon:hover {
    color: var(--accent);
    transform: scale(1.1);
}

.nav-cart-icon .cart-count {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #ef4444;
    color: white;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: bold;
}

/* Mobile Header Section Styles */
.mobile-header-section {
    display: none;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex: 1;
    padding: 0 10px;
}

.mobile-profile-icon {
    display: flex;
    align-items: center;
}

.mobile-profile-btn {
    background: none;
    border: none;
    font-size: 1.4rem;
    color: var(--primary);
    cursor: pointer;
    padding: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.3s;
}

.mobile-profile-btn:hover {
    color: var(--accent);
}

.mobile-search-section {
    flex: 1;
    display: flex;
    align-items: center;
}

.search-container {
    position: relative;
    width: 100%;
}

.search-input {
    width: 100%;
    padding: 8px 32px 8px 12px;
    border: 1.5px solid var(--light);
    border-radius: 6px;
    font-size: 0.9rem;
    background: var(--light);
    color: var(--primary);
    transition: all 0.3s;
}

.search-input:focus {
    outline: none;
    border-color: var(--accent);
    background: white;
}

.search-input::placeholder {
    color: #999;
}

.search-icon {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--primary);
    font-size: 0.9rem;
    pointer-events: none;
}

.mobile-cart-section {
    display: flex;
    align-items: center;
}

.mobile-cart-btn {
    position: relative;
    font-size: 1.3rem;
    color: var(--primary);
    cursor: pointer;
    padding: 6px;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.3s;
}

.mobile-cart-btn:hover {
    color: var(--accent);
}

.mobile-cart-btn .cart-count {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #ef4444;
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.65rem;
    font-weight: bold;
}

/* Hide mobile cart icon on desktop */
.mobile-cart-icon {
    display: none;
}

/* Auth Buttons Styling */
.auth-buttons {
    display: flex;
    gap: 10px;
    align-items: center;
}

.auth-btn {
    padding: 8px 18px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    border-radius: 6px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
    border: none;
}

.login-btn {
    background: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
}

.login-btn:hover {
    background: var(--primary);
    color: white;
}

.register-btn {
    background: var(--primary);
    color: #fff;
    border: none;
    padding: 8px 20px;
    border-radius: 20px;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.3s, color 0.3s;
    font-size: 1rem;
    margin-right: 24px;
}

.register-btn:hover {
    background: var(--secondary);
}

.logout-btn {
    background: var(--danger);
    color: #fff;
    border: none;
    padding: 8px 20px;
    border-radius: 20px;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.3s, color 0.3s;
    font-size: 1rem;
    margin-right: 24px;
}

.logout-btn:hover {
    background: #802c23;
}

/* User Profile Dropdown */
.user-profile-dropdown {
    position: relative;
    margin-right: 15px;
}

.profile-trigger {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: var(--gradient-1);
    border: none;
    border-radius: 8px;
    color: white;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 0.95rem;
    box-shadow: var(--shadow-md);
}

.profile-trigger:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.profile-trigger i.fa-user-circle {
    font-size: 1.3rem;
    color: white;
}

.profile-trigger i.fa-chevron-down {
    font-size: 0.8rem;
    transition: transform 0.3s;
}

.user-profile-dropdown.active .profile-trigger i.fa-chevron-down {
    transform: rotate(180deg);
}

.profile-dropdown-menu {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    background: white;
    border-radius: 12px;
    box-shadow: var(--shadow-xl);
    min-width: 280px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px) scale(0.95);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1000;
    border: 1px solid rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.user-profile-dropdown.active .profile-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.profile-header {
    padding: 20px;
    background: var(--gradient-1);
    color: white;
    display: flex;
    align-items: center;
    gap: 15px;
}

.profile-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: rgba(255,255,255,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.profile-info {
    flex: 1;
    min-width: 0;
}

.profile-name {
    font-weight: 700;
    font-size: 1rem;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.profile-email {
    font-size: 0.85rem;
    opacity: 0.9;
    margin-bottom: 6px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.profile-role {
    margin-top: 6px;
}

.role-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.role-badge.role-admin {
    background: rgba(231,76,60,0.2);
    color: #e74c3c;
}

.role-badge.role-seller {
    background: rgba(243,156,18,0.2);
    color: #f39c12;
}

.role-badge.role-customer {
    background: rgba(255,255,255,0.3);
    color: white;
}

.profile-menu-divider {
    height: 1px;
    background: #e4eef1;
    margin: 8px 0;
}

.profile-menu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    color: var(--medium);
    text-decoration: none;
    transition: all 0.2s;
    font-size: 0.95rem;
}

.profile-menu-item:hover {
    background: var(--light);
    color: var(--primary);
}

.profile-menu-item.logout-item {
    color: var(--danger);
}

.profile-menu-item.logout-item:hover {
    background: rgba(231,76,60,0.1);
    color: var(--danger);
}

.profile-menu-item i {
    width: 20px;
    text-align: center;
    font-size: 1rem;
}

@media (max-width: 768px) {
    .logout-btn {
        font-size: 0.97rem;
        padding: 7px 10px;
        margin-right: 0;
        width: 100%;
        box-sizing: border-box;
        text-align: center;
    }
    
    .user-profile-dropdown {
        margin-right: 0;
        width: 100%;
    }
    
    .profile-trigger {
        width: 100%;
        justify-content: center;
    }
    
    .profile-dropdown-menu {
        right: auto;
        left: 0;
        width: 100%;
        min-width: auto;
    }
}

@media (max-width: 500px) {
    .logout-btn {
        font-size: 0.89rem;
        padding: 5px 7px;
        margin-right: 0;
        width: 100%;
        box-sizing: border-box;
        text-align: center;
    }
}

/* Hero Section */
.hero {
    background: var(--gradient-1);
    color: white;
    padding: 100px 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at top right, rgba(255, 255, 255, 0.1) 0%, transparent 50%);
    pointer-events: none;
}

.hero .container {
    max-width: 850px;
    position: relative;
    z-index: 1;
}

.hero h2 {
    font-size: 2.5rem;
    margin-bottom: 20px;
    color: white;
    font-weight: 800;
    letter-spacing: -1px;
}

.hero p {
    font-size: 1.1rem;
    max-width: 700px;
    margin: 0 auto 30px;
    opacity: 0.95;
    font-weight: 500;
}

.btn {
    display: inline-block;
    padding: 12px 28px;
    background: var(--gradient-2);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 0.95rem;
    letter-spacing: 0.5px;
    box-shadow: var(--shadow-lg);
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-xl);
}

.section-title {
    text-align: center;
    margin: 50px 0 30px;
    color: var(--dark);
    position: relative;
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: -0.5px;
}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background: var(--gradient-1);
    margin: 12px auto 0;
    border-radius: 2px;
}

/* Shop Cards */
.shops {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    margin-top: 30px;
    margin-bottom: 50px;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

.shop-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    width: 100%;
    color: var(--text-light);
    border: 1px solid rgba(0, 0, 0, 0.06);
}

.shop-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
    border-color: var(--accent);
}

.shop-img {
    height: 220px;
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
}

.shop-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: #f0f9ff;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.shop-card:hover .shop-img img {
    transform: scale(1.05);
}

.shop-content {
    padding: 16px 18px;
}

.shop-content h3 {
    color: var(--primary);
    font-size: 1.1rem;
    margin-bottom: 10px;
    font-weight: 700;
}

.shop-info {
    display: flex;
    align-items: center;
    gap: 7px;
    color: var(--text-light);
    margin: 6px 0;
    font-size: 0.9rem;
    font-weight: 500;
}

.rating {
    color: var(--warning);
}

.shop-content p {
    font-size: 0.9rem;
    color: var(--medium);
    margin-bottom: 12px;
    line-height: 1.5;
}

/* Modern CTA and rating badge */
.shop-content .btn {
    display: inline-block;
    padding: 10px 18px;
    background: var(--gradient-1);
    color: white;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 700;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 0.9rem;
    box-shadow: var(--shadow-md);
}

.shop-content .btn:hover { 
    transform: translateY(-2px); 
    box-shadow: var(--shadow-lg);
}

.shop-img { position: relative; }
.rating-badge {
    position: absolute;
    left: 12px;
    top: 12px;
    background: white;
    color: var(--primary);
    padding: 8px 12px;
    border-radius: 8px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    box-shadow: var(--shadow-lg);
    font-size: 0.9rem;
    border: none;
}
.rating-badge i { color: var(--warning); }

/* Footer */
footer {
    background: var(--dark);
    color: white;
    padding: 40px 0 15px;
    margin-top: 40px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 18px;
}

.footer-section h3 {
    margin-bottom: 12px;
    font-size: 1rem;
    font-weight: 700;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 6px;
    font-size: 0.9rem;
}

.footer-section a {
    color: #ddd;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-section a:hover {
    color: var(--secondary);
}

.social-links {
    display: flex;
    gap: 10px;
    margin-top: 8px;
}

.social-links a {
    display: inline-block;
    width: 32px;
    height: 32px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    text-align: center;
    line-height: 32px;
    transition: background 0.3s;
}

.social-links a:hover {
    background: var(--primary);
}

.copyright {
    text-align: center;
    padding-top: 13px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.95rem;
}

/* Responsive Design */
@media (max-width: 1100px) {
    .container-header {
        max-width: 100vw;
    }
    .container,
    .hero .container,
    .shops,
    .services {
        max-width: 100vw !important;
    }
}

@media (max-width: 1000px) {
    .shops {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 900px) {
    .header-row {
        flex-direction: column;
        gap: 7px;
        align-items: stretch;
    }
    .logo {
        justify-content: center;
    }
    .nav-flex {
        justify-content: center;
    }
    .shops,
    .services {
        max-width: 100vw;
    }
}

@media (max-width: 768px) {
    .header-row {
        flex-direction: column;
        gap: 7px;
        align-items: stretch;
    }
    .logo {
        justify-content: center;
    }
    .nav-flex {
        flex-direction: column;
        gap: 7px;
        align-items: stretch;
    }
    .nav-links {
        justify-content: center;
        margin-bottom: 7px;
    }
    .nav-links a {
        font-size: 0.97rem;
        padding: 6px 8px;
    }
    .login-btn {
        font-size: 0.97rem;
        padding: 7px 10px;
    }
    .hero h2 {
        font-size: 1.3rem;
    }
    .hero p {
        font-size: 1rem;
    }
    .shops {
        grid-template-columns: 1fr;
        gap: 24px;
        max-width: 100%;
        margin-left: auto;
        margin-right: auto;
    }
    .shop-card {
        width: 100%;
    }
    .services {
        grid-template-columns: 1fr;
        gap: 14px;
        max-width: 100vw;
    }
    .map-overlay {
        position: relative;
        top: 0;
        left: 0;
        margin-bottom: 12px;
    }
    .footer-content {
        gap: 10px;
    }
}

@media (max-width: 700px) {
    .shops {
        grid-template-columns: 1fr;
        gap: 24px;
    }
    .shop-card {
        max-width: 99vw;
    }
}

@media (max-width: 500px) {
    .container {
        padding: 0 8px;
    }
    .header-row {
        padding: 6px 0;
    }
    .logo h1 {
        font-size: 1rem;
    }
    .nav-links a {
        font-size: 0.89rem;
        padding: 5px 3px;
    }
    .login-btn {
        font-size: 0.89rem;
        padding: 5px 7px;
    }
    .footer-content {
        grid-template-columns: 1fr;
    }
    .shops,
    .services {
        max-width: 100vw;
    }
    .shop-card {
        max-width: 99vw;
    }
}
/* --- Service Section Aesthetic --- */
.services-section {
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    padding: 70px 0 50px;
    min-height: auto;
}

.section-title {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 18px;
    letter-spacing: -0.5px;
    color: var(--dark);
    font-weight: 800;
    position: relative;
}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background: var(--gradient-1);
    border-radius: 2px;
    margin: 12px auto 0;
}

/* Services grid */
.services-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
    max-width: 1100px;
    margin: 0 auto;
    padding: 30px 12px 0;
}

/* Service Card */
.service-card {
    background: white;
    border-radius: 12px;
    box-shadow: var(--shadow-md);
    padding: 30px 24px;
    text-align: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(0, 0, 0, 0.05);
    position: relative;
    overflow: hidden;
}

.service-card:hover {
    background: white;
    transform: translateY(-6px);
    box-shadow: var(--shadow-xl);
    border-color: var(--accent);
}

.service-icon {
    font-size: 2.8rem;
    color: white;
    background: var(--gradient-1);
    border-radius: 12px;
    width: 70px;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 18px;
    box-shadow: var(--shadow-lg);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.service-card:hover .service-icon {
    transform: scale(1.1) rotate(-5deg);
    box-shadow: var(--shadow-xl);
}

.service-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--dark);
    letter-spacing: -0.5px;
}

.service-desc {
    color: var(--text-light);
    font-size: 0.95rem;
    margin-bottom: 0;
    min-height: auto;
    line-height: 1.6;
}

/* Responsive Design - Tablet and Desktop */
@media (max-width: 1024px) {
    .container {
        padding: 0 20px;
    }
    
    .header-row {
        flex-wrap: wrap;
    }
    
    .logo h1 {
        font-size: 1.2rem;
    }
    
    .nav-flex {
        gap: 12px;
    }
    
    .shop-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
}

@media (max-width: 900px) {
    .services-grid {
        grid-template-columns: 1fr 1fr;
        gap: 18px;
    }
    
    .hero h2 {
        font-size: 2rem;
    }
    
    .hero p {
        font-size: 0.95rem;
    }
}

@media (max-width: 768px) {
    .header-row {
        padding: 10px 0;
        gap: 8px;
        flex-wrap: wrap;
    }
    
    /* Hide logo on mobile */
    .logo {
        display: none;
    }
    
    /* Show mobile header section */
    .mobile-header-section {
        display: flex;
    }
    
    /* Hide desktop nav on mobile */
    .nav-flex {
        position: fixed;
        top: 80px;
        left: 0;
        right: 0;
        background: white;
        flex-direction: column;
        gap: 0;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
        z-index: 99;
        padding: 0;
    }
    
    .nav-flex.active {
        max-height: 100vh;
        overflow-y: auto;
        padding: 16px 0;
    }
    
    .logo img {
        max-width: 50px;
        height: auto;
    }
    
    .logo h1 {
        font-size: 1rem;
    }
    
    /* Show hamburger menu on mobile */
    .hamburger-menu {
        display: flex;
    }
    
    /* Show mobile cart icon on mobile */
    .mobile-cart-icon {
        display: flex !important;
        margin: 0;
        padding: 0;
        font-size: 1.3rem;
        margin-right: 12px;
    }
    
    .mobile-cart-icon .cart-count {
        position: absolute;
        top: -5px;
        right: -5px;
        width: 22px;
        height: 22px;
        font-size: 0.7rem;
    }
    
    /* Mobile nav menu */
    .nav-flex {
        position: fixed;
        top: 80px;
        left: 0;
        right: 0;
        background: white;
        flex-direction: column;
        gap: 0;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
        z-index: 99;
        padding: 0;
    }
    
    .nav-flex.active {
        max-height: 100vh;
        overflow-y: auto;
        padding: 16px 0;
    }
    
    .nav-links {
        flex-direction: column;
        width: 100%;
    }
    
    .nav-links li {
        margin: 0;
        border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    }
    
    .nav-links a {
        padding: 14px 20px;
        font-size: 0.95rem;
        border-radius: 0;
        margin: 0;
        width: 100%;
    }
    
    .nav-flex .nav-cart-icon {
        display: none !important;
    }
    
    .nav-flex .nav-cart-icon .cart-count {
        position: absolute;
        top: 8px;
        right: 20px;
        background: #ef4444;
        color: white;
        border-radius: 50%;
        width: 22px;
        height: 22px;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 0.65rem;
        font-weight: bold;
    }
    
    .nav-flex a, .nav-flex button {
        padding: 8px 12px;
        font-size: 0.9rem;
    }
    
    /* Profile dropdown in mobile menu */
    .user-profile-dropdown {
        position: fixed;
        z-index: 1000;
        top: 80px;
        right: 0;
        left: 0;
        width: 100%;
        display: block !important;
    }
    
    .user-profile-dropdown .profile-trigger {
        display: none !important;
        width: 100%;
        padding: 14px 20px;
        border: none;
        background: transparent;
        color: var(--medium);
        font-weight: 600;
        align-items: center;
        gap: 7px;
        font-size: 0.95rem;
        cursor: pointer;
        border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    }
    
    .profile-dropdown-menu {
        position: fixed;
        top: 100px;
        right: 0;
        left: 0;
        width: 100%;
        max-width: 100%;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
        background: white;
        opacity: 0;
        visibility: hidden;
        transform: translateY(-10px);
        transition: all 0.3s ease;
        z-index: 1001;
        pointer-events: none;
        max-height: 1000px;
        overflow-y: auto;
    }
    
    .user-profile-dropdown.active .profile-dropdown-menu {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
        pointer-events: auto;
    }
    
    /* Auth buttons in mobile menu */
    .auth-buttons {
        flex-direction: column;
        width: 100%;
        gap: 0;
        padding: 0;
    }
    
    .auth-btn {
        width: 100%;
        padding: 14px 20px;
        border-radius: 0;
        border: none;
        gap: 8px;
        justify-content: center;
    }
    
    .login-btn {
        border: 1px solid var(--primary);
        background: white;
    }
    
    .register-btn {
        background: var(--gradient-2);
        box-shadow: none;
    }
    
    .hero {
        padding: 60px 20px;
    }
    
    .hero h2 {
        font-size: 1.6rem;
        margin-bottom: 15px;
    }
    
    .hero p {
        font-size: 0.9rem;
        margin-bottom: 20px;
    }
    
    .hero-buttons {
        flex-wrap: wrap;
        gap: 10px;
    }
    
    .shop-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .shop-card {
        padding: 15px;
    }
    
    .shop-card h3 {
        font-size: 1.1rem;
    }
    
    .services-section {
        padding: 30px 0 15px 0;
    }
    
    .services-grid {
        grid-template-columns: 1fr;
        gap: 16px;
        padding: 10px 2px 0 2px;
    }
    
    .service-card {
        padding: 25px 10px 20px 10px;
    }
    
    .section-title {
        font-size: 1.3rem;
    }
    
    footer {
        padding: 25px 16px 12px;
        margin-top: 30px;
        font-size: 0.9rem;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 20px;
        margin-bottom: 12px;
    }
    
    .footer-section h3 {
        margin-bottom: 10px;
        font-size: 0.95rem;
    }
    
    .footer-section ul li {
        margin-bottom: 5px;
        font-size: 0.85rem;
    }
    
    .social-links a {
        width: 28px;
        height: 28px;
        line-height: 28px;
        font-size: 0.9rem;
    }
}

@media (max-width: 600px) {
    body {
        font-size: 15px;
    }
    
    .container {
        padding: 0 12px;
    }
    
    .header-row {
        padding: 8px 0;
        gap: 8px;
    }
    
    .logo {
        gap: 4px;
        flex-shrink: 1;
        min-width: 0;
    }
    
    .logo img {
        max-width: 45px;
        min-width: 45px;
    }
    
    .logo h1 {
        font-size: 1rem;
        margin: 0;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    
    /* Mobile nav menu for smaller phones */
    .nav-flex {
        padding: 0;
    }
    
    .nav-flex.active {
        padding: 12px 0;
    }
    
    .nav-links a {
        padding: 12px 16px;
        font-size: 0.9rem;
    }
    
    .nav-cart-icon {
        padding: 12px 16px;
        font-size: 1rem;
        display: flex;
        align-items: center;
        justify-content: flex-start;
        position: relative;
        width: 100%;
        border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    }
    
    .nav-cart-icon .cart-count {
        position: absolute;
        top: 6px;
        right: 16px;
        width: 20px;
        height: 20px;
        font-size: 0.6rem;
    }
    
    .auth-btn {
        padding: 12px 16px;
        font-size: 0.85rem;
    }
    
    .profile-trigger {
        padding: 12px 16px;
        font-size: 0.9rem;
    }
    
    .hero {
        padding: 40px 12px;
        border-radius: 8px;
    }
    
    .hero h2 {
        font-size: 1.3rem;
        margin-bottom: 10px;
    }
    
    .hero p {
        font-size: 0.85rem;
        margin-bottom: 15px;
    }
    
    .hero-buttons {
        flex-direction: column;
        gap: 8px;
    }
    
    .hero-buttons a, .hero-buttons button {
        padding: 10px 15px;
        font-size: 0.9rem;
        width: 100%;
    }
    
    .shop-card {
        padding: 12px;
    }
    
    .shop-card h3 {
        font-size: 1rem;
        margin-bottom: 8px;
    }
    
    .shop-card p {
        font-size: 0.85rem;
        margin-bottom: 8px;
    }
    
    .shop-info {
        font-size: 0.8rem;
        margin-bottom: 8px;
    }
    
    .services-section {
        padding: 20px 0 10px 0;
    }
    
    .services-grid {
        grid-template-columns: 1fr;
        gap: 12px;
        padding: 5px;
    }
    
    .service-card {
        padding: 20px 8px 15px 8px;
    }
    
    .service-icon {
        width: 60px;
        height: 60px;
    }
    
    .service-title {
        font-size: 0.95rem;
    }
    
    .service-desc {
        font-size: 0.85rem;
    }
    
    .section-title {
        font-size: 1.1rem;
        margin-bottom: 15px;
    }
    
    footer {
        padding: 16px 12px 10px;
        margin-top: 20px;
        font-size: 0.85rem;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 16px;
        margin-bottom: 10px;
    }
    
    .footer-section h3 {
        margin-bottom: 8px;
        font-size: 0.9rem;
    }
    
    .footer-section ul li {
        margin-bottom: 4px;
        font-size: 0.8rem;
    }
    
    .copyright {
        font-size: 0.75rem;
        padding-top: 10px;
    }
    
    .social-links a {
        width: 26px;
        height: 26px;
        line-height: 26px;
        font-size: 0.85rem;
    }

    /* Service Cards */
    .services-grid {
        grid-template-columns: 1fr;
    }

    .service-card {
        padding: 15px;
    }

    .service-icon {
        width: 50px;
        height: 50px;
        font-size: 1.5rem;
    }

    .service-price {
        margin: 10px 0;
    }

    .add-to-cart-btn {
        font-size: 0.85rem;
        padding: 8px 12px;
    }
}

/* Extra Mobile Responsiveness - Ultra Small Devices */
@media (max-width: 480px) {
    html {
        font-size: 15px;
    }
    
    body {
        padding: 4px;
        font-size: 15px;
    }
    
    .container, .container-header {
        padding: 0 4px;
        margin: 0;
    }
    
    header {
        padding: 8px 0;
    }
    
    .logo {
        margin-left: 4px !important;
    }
    
    .nav-links {
        gap: 6px;
    }
    
    .nav-links li a {
        font-size: 0.95rem;
        padding: 12px 16px;
    }
    
    h1 { font-size: 1.3rem; }
    h2 { font-size: 1.1rem; }
    h3 { font-size: 1rem; }
    h4 { font-size: 0.95rem; }
    
    .shop-detail-container {
        margin: 8px auto;
        padding: 8px;
    }
    
    .shop-detail-img {
        width: 100%;
        max-width: 280px;
        height: auto;
        max-height: 180px;
    }
    
    .shop-detail-info {
        padding: 8px;
    }
    
    .shop-detail-info h2 {
        font-size: 1.1rem;
        margin-bottom: 4px;
    }
    
    .shop-info {
        font-size: 0.9rem;
        margin-top: 2px;
    }
    
    .services-grid {
        grid-template-columns: 1fr;
        gap: 8px;
        padding: 0;
    }
    
    .service-card {
        padding: 10px 6px;
    }
    
    .service-icon {
        width: 44px;
        height: 44px;
        font-size: 1.2rem;
    }
    
    .service-card h4 {
        font-size: 0.95rem;
        margin: 6px 0;
    }
    
    .service-desc {
        font-size: 0.85rem;
    }
    
    .service-price {
        font-size: 0.9rem;
    }
    
    .add-to-cart-btn {
        font-size: 0.85rem;
        padding: 8px 12px;
        min-height: 40px;
    }
    
    button, .btn, input[type="submit"], input[type="button"] {
        padding: 10px 14px;
        font-size: 0.9rem;
        min-height: 44px;
    }
    
    .modal-content {
        padding: 12px;
    }
    
    form {
        padding: 8px;
    }
    
    .form-group {
        margin-bottom: 12px;
    }
    
    input, textarea, select {
        padding: 10px;
        font-size: 1rem;
    }
    
    label {
        font-size: 0.95rem;
    }
    
    table {
        font-size: 0.85rem;
    }
    
    th, td {
        padding: 8px 4px;
    }
    
    .footer-content {
        flex-direction: column;
        gap: 12px;
    }
    
    footer {
        padding: 14px 8px 8px;
        font-size: 0.8rem;
        margin-top: 15px;
    }
    
    .footer-section h3 {
        margin-bottom: 6px;
        font-size: 0.85rem;
    }
    
    .footer-section ul li {
        margin-bottom: 3px;
        font-size: 0.75rem;
    }
    
    .copyright {
        font-size: 0.7rem;
        padding-top: 8px;
    }
    
    .social-links {
        gap: 8px;
        margin-top: 6px;
    }
    
    .social-links a {
        width: 24px;
        height: 24px;
        line-height: 24px;
        font-size: 0.8rem;
    }
}

/* Tablet Responsiveness (480px - 768px) */
@media (max-width: 768px) and (min-width: 481px) {
    html {
        font-size: 14px;
    }
    
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    
    .shop-detail-header {
        flex-direction: column;
    }
    
    .shop-detail-img {
        max-width: 350px;
    }
}

/* Ensure all elements stay within viewport */
* {
    max-width: 100%;
}

/* Prevent overflow */
body, html {
    overflow-x: hidden;
}

/* Touch-friendly interface */
@media (max-width: 768px) {
    button, a, input[type="button"], input[type="submit"], .add-to-cart-btn {
        min-height: 44px;
        min-width: 44px;
        touch-action: manipulation;
    }
    
    /* Better spacing for touch */
    a {
        padding: 8px 4px;
        display: inline-block;
    }
}

/* Responsive text sizing */
@media (max-width: 480px) {
    .alert {
        font-size: 0.9rem;
        padding: 12px;
    }
    
    .section-title {
        font-size: 1.05rem;
        margin-bottom: 12px;
    }
    
    .page-title {
        font-size: 1.2rem;
    }
}

/* Responsive images */
img, video, iframe {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Cart responsiveness */
@media (max-width: 768px) {
    .cart-container {
        padding: 0 8px;
    }
    
    .cart-item {
        flex-direction: column;
        gap: 10px;
    }
    
    .cart-item-info {
        flex-direction: row;
        flex-wrap: wrap;
    }
    
    .cart-actions {
        flex-direction: column;
        gap: 8px;
    }
    
    .cart-summary {
        padding: 10px;
    }
}

/* Checkout responsiveness */
@media (max-width: 768px) {
    .checkout-form {
        padding: 0 8px;
    }
    
    .form-row {
        flex-direction: column;
    }
    
    .form-row .form-group {
        width: 100%;
    }
    
    .checkout-summary {
        padding: 10px;
        margin-top: 10px;
    }
}

/* Back to Home Container */
.back-home-container {
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    padding: 16px 0;
    border-bottom: 2px solid rgba(15, 76, 122, 0.1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.back-home-container .container {
    display: flex;
    justify-content: flex-start;
    align-items: center;
}

@media (max-width: 768px) {
    .back-home-container {
        padding: 12px 0;
    }
    
    .back-home-container .container {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .back-home-container {
        padding: 8px 0;
    }
}

/* Interactive link transitions */
.back-home-link {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    border-radius: 8px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: white;
    box-shadow: 0 2px 8px rgba(15, 76, 122, 0.1);
    border: 1px solid rgba(15, 76, 122, 0.2);
    font-size: 0.95rem;
}

.back-home-link:hover {
    background: var(--primary);
    color: white;
    transform: translateX(-4px);
    box-shadow: 0 4px 16px rgba(15, 76, 122, 0.25);
}

.back-home-link i {
    font-size: 1.1rem;
}

@media (max-width: 768px) {
    .back-home-link {
        padding: 12px 16px;
        font-size: 0.9rem;
        gap: 10px;
        width: 100%;
        justify-content: center;
        text-align: center;
    }
    
    .back-home-link i {
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .back-home-link {
        padding: 14px 12px;
        font-size: 0.88rem;
        gap: 8px;
        min-height: 44px;
        width: 100%;
        justify-content: center;
    }
    
    .back-home-link i {
        font-size: 1rem;
    }
}


.btn-primary-hero {
    background: var(--gradient-2);
    color: white;
    padding: 12px 24px;
    font-size: 0.95rem;
    font-weight: 600;
    border-radius: 8px;
    text-decoration: none;
    text-align: center;
    box-shadow: 0 4px 12px rgba(15, 76, 122, 0.3);
    transition: all 0.2s ease;
    display: inline-block;
    flex: 1;
}

.btn-primary-hero:hover {
    box-shadow: 0 6px 16px rgba(15, 76, 122, 0.4);
    transform: translateY(-2px);
}

.btn-secondary-hero {
    background: white;
    color: var(--primary);
    padding: 12px 24px;
    font-size: 0.95rem;
    font-weight: 600;
    border: 2px solid var(--primary);
    border-radius: 8px;
    text-decoration: none;
    text-align: center;
    transition: all 0.2s ease;
    display: inline-block;
    flex: 1;
}

.btn-secondary-hero:hover {
    background: var(--primary);
    color: white;
}
