/* GiftTree Mobile Styles */

/* Mobile Header */
.mobile-header {
    background: white;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.mobile-top-bar {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    gap: 12px;
}

.menu-toggle {
    background: none;
    border: none;
    font-size: 20px;
    color: var(--text-dark);
    padding: 8px;
    cursor: pointer;
}

.back-btn {
    background: none;
    border: none;
    font-size: 20px;
    color: var(--text-dark);
    padding: 8px;
    cursor: pointer;
}

.mobile-logo {
    flex: 1;
    font-size: 24px;
    font-weight: 700;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.mobile-logo a {
    display: inline-flex;
    align-items: center;
    max-width: 100%;
}

.mobile-logo img {
    max-height: 40px;
    width: auto;
    max-width: 150px;
    object-fit: contain;
}

.header-actions {
    display: flex;
    gap: 12px;
}

.header-btn {
    background: none;
    border: none;
    font-size: 18px;
    color: var(--text-dark);
    padding: 8px;
    position: relative;
    cursor: pointer;
}

.cart-badge {
    position: absolute;
    top: 2px;
    right: 2px;
    background: var(--primary-color);
    color: white;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    font-size: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Mobile Search */
.mobile-search {
    padding: 0 16px 12px;
}

.mobile-search-bar {
    width: 100%;
    background: #f5f5f5;
    border: none;
    border-radius: 25px;
    padding: 10px 16px 10px 40px;
    font-size: 14px;
    position: relative;
}

.mobile-search-icon {
    position: absolute;
    left: 28px;
    top: 50%;
    transform: translateY(-50%);
    color: #999;
    font-size: 16px;
}

/* Location Bar */
.location-bar {
    background: var(--pink-gradient);
    color: white;
    padding: 8px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 13px;
}

/* Mobile Menu Drawer */
.mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.mobile-menu-overlay.active {
    opacity: 1;
    visibility: visible;
}

.mobile-menu-drawer {
    position: fixed;
    top: 0;
    left: -300px;
    width: 300px;
    height: 100%;
    background: white;
    z-index: 2001;
    transition: left 0.3s ease;
    overflow-y: auto;
}

.mobile-menu-drawer.active {
    left: 0;
}

.mobile-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background: var(--pink-gradient);
    color: white;
}

.mobile-menu-header h3 {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
}

.close-menu {
    background: none;
    border: none;
    color: white;
    font-size: 20px;
    cursor: pointer;
}

.mobile-menu-content {
    padding: 0;
}

.mobile-menu-item {
    border-bottom: 1px solid #f0f0f0;
}

.mobile-menu-link {
    display: flex;
    align-items: center;
    padding: 16px 20px;
    color: var(--text-dark);
    text-decoration: none;
    transition: background 0.3s;
}

.mobile-menu-link:hover {
    background: #f8f9fa;
}

.mobile-menu-link i:first-child {
    width: 24px;
    color: var(--primary-color);
    margin-right: 16px;
}

.mobile-menu-link span {
    flex: 1;
    font-size: 16px;
}

.mobile-menu-link i:last-child {
    color: #ccc;
}

.mobile-menu-divider {
    height: 8px;
    background: #f8f9fa;
    margin: 10px 0;
}

/* Mobile Dropdown Styles */
.mobile-submenu {
    display: none;
    background: #f8f9fa;
    padding: 0;
    overflow: hidden;
    transition: all 0.3s ease;
}

.mobile-submenu.active {
    display: block;
}

.mobile-submenu-section {
    padding: 15px 20px;
    border-bottom: 1px solid #e0e0e0;
}

.mobile-submenu-section:last-child {
    border-bottom: none;
}

.mobile-submenu-section h5 {
    color: var(--primary-color);
    font-size: 14px;
    font-weight: 600;
    margin: 0 0 10px 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.mobile-submenu-section a {
    display: block;
    padding: 8px 0;
    color: var(--text-dark);
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s;
    border-left: 3px solid transparent;
    padding-left: 10px;
}

.mobile-submenu-section a:hover {
    color: var(--primary-color);
    border-left-color: var(--primary-color);
}

.mobile-chevron {
    transition: transform 0.3s ease;
}

.mobile-chevron.rotated {
    transform: rotate(90deg);
}

/* Category Pills Mobile */
.category-pills {
    background: white;
    padding: 16px 0;
    overflow-x: auto;
    white-space: nowrap;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.category-pills::-webkit-scrollbar {
    display: none;
}

.pill-container {
    display: flex;
    gap: 12px;
    padding: 0 16px;
}

.category-pill {
    background: white;
    border: 1.5px solid #e0e0e0;
    border-radius: 20px;
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-dark);
    white-space: nowrap;
    transition: all 0.3s;
    flex-shrink: 0;
    cursor: pointer;
}

.category-pill.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* Mobile Hero Slider */
.mobile-slider {
    background: white;
    margin-bottom: 8px;
    position: relative;
    overflow: hidden;
    height: 250px;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    margin: 16px;
}

.slider-container {
    display: flex;
    transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    height: 100%;
}

.slide {
    min-width: 100%;
    height: 100%;
    background: var(--pink-gradient);
    display: flex;
    align-items: center;
    padding: 0 30px;
    color: white;
    position: relative;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    border-radius: 16px;
    overflow: hidden;
}

.slide::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(233, 30, 99, 0.7) 0%, rgba(255, 96, 144, 0.5) 100%);
    z-index: 1;
}

.slide-content {
    position: relative;
    z-index: 2;
    animation: slideInUp 0.8s ease-out;
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.slide-1 {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    background-blend-mode: overlay;
}

.slide-2 {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    background-blend-mode: overlay;
}

.slide-3 {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    background-blend-mode: overlay;
}

.slide-4 {
    background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
    background-blend-mode: overlay;
}

.slide-content h2 {
    font-size: 32px;
    font-weight: 800;
    margin-bottom: 12px;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.4);
    line-height: 1.1;
    letter-spacing: -0.5px;
}

.slide-content p {
    font-size: 16px;
    opacity: 0.95;
    margin-bottom: 20px;
    text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.4);
    line-height: 1.4;
    font-weight: 400;
}

.slide-btn {
    background: white;
    color: var(--primary-color);
    border: none;
    border-radius: 30px;
    padding: 12px 28px;
    font-size: 14px;
    font-weight: 700;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.slide-btn:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
    background: linear-gradient(45deg, #fff 0%, #f8f9fa 100%);
}

.slider-dots {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 12px;
    z-index: 3;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    cursor: pointer;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.dot.active {
    background: white;
    width: 32px;
    border-radius: 8px;
    border-color: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.dot:hover {
    background: rgba(255, 255, 255, 0.8);
    transform: scale(1.2);
}

/* Mobile Quick Actions Grid */
.quick-actions {
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    padding: 32px 16px;
    margin-bottom: 8px;
    position: relative;
}

.quick-actions::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #E91E63 0%, #FF6090 50%, #4CAF50 100%);
}

.actions-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.action-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: var(--text-dark);
    transition: transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    padding: 8px;
    border-radius: 16px;
}

.action-item:hover {
    transform: translateY(-5px) scale(1.05);
    color: var(--primary-color);
}

.action-icon {
    width: 70px;
    height: 70px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    background: linear-gradient(135deg, #E91E63 0%, #FF6090 100%);
    color: white;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(233, 30, 99, 0.3);
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    position: relative;
}

.action-icon::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.2) 0%, rgba(255,255,255,0) 100%);
    border-radius: 20px;
}

.action-item:hover .action-icon {
    transform: rotate(5deg) scale(1.1);
    box-shadow: 0 12px 32px rgba(233, 30, 99, 0.4);
}

.action-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 20px;
}

.action-label {
    font-size: 13px;
    text-align: center;
    color: var(--text-dark);
    font-weight: 600;
    transition: color 0.3s ease;
}

.action-item:hover .action-label {
    color: var(--primary-color);
}

/* Mobile Product Cards */
.products-scroll {
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding: 0 24px;
}

.products-scroll::-webkit-scrollbar {
    display: none;
}

.products-row {
    display: flex;
    gap: 20px;
}

.product-card-mobile {
    background: white;
    border: none;
    border-radius: 20px;
    overflow: hidden;
    flex-shrink: 0;
    width: 160px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    position: relative;
    text-decoration: none;
    color: inherit;
}

.product-card-mobile:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.18);
}

.product-card-mobile::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(233, 30, 99, 0.05) 0%, rgba(255, 96, 144, 0.05) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: 20px;
    z-index: 1;
}

.product-card-mobile:hover::before {
    opacity: 1;
}

.product-image {
    width: 100%;
    height: 160px;
    object-fit: cover;
    background: #f5f5f5;
    transition: transform 0.3s ease;
    position: relative;
    z-index: 2;
}

.product-card-mobile:hover .product-image {
    transform: scale(1.05);
}

.product-info {
    padding: 16px;
    position: relative;
    z-index: 3;
}

.product-name {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 6px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--text-dark);
}

.product-price {
    font-size: 16px;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 12px;
}

.add-btn {
    width: 100%;
    background: linear-gradient(135deg, var(--primary-color) 0%, #FF6090 100%);
    color: white;
    border: none;
    border-radius: 12px;
    padding: 10px;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    box-shadow: 0 4px 12px rgba(233, 30, 99, 0.3);
    cursor: pointer;
}

.add-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(233, 30, 99, 0.4);
    background: linear-gradient(135deg, #FF6090 0%, var(--primary-color) 100%);
}

/* Mobile Bottom Navigation */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    padding: 8px 0;
}

.nav-items {
    display: flex;
    justify-content: space-around;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 8px;
    text-decoration: none;
    color: #999;
    font-size: 11px;
}

.nav-item.active {
    color: var(--primary-color);
}

.nav-item i {
    font-size: 20px;
}

/* Mobile Sticky Bottom */
.sticky-bottom {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    padding: 16px;
}

/* Mobile Filter Modal */
.filter-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 2000;
    display: none;
    opacity: 0;
    transition: all 0.3s ease;
}

.filter-modal.active {
    display: flex;
    opacity: 1;
}

.filter-content {
    background: white;
    margin-top: auto;
    border-radius: 20px 20px 0 0;
    max-height: 80vh;
    overflow-y: auto;
    width: 100%;
}

/* Mobile Responsive Adjustments */
@media (max-width: 480px) {
    .mobile-logo {
        font-size: 20px;
    }
    
    .actions-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .product-card-mobile {
        width: 120px;
    }
    
    .slide-content h2 {
        font-size: 22px;
    }
    
    .slide-content p {
        font-size: 14px;
    }
}

/* Tablet Mobile Styles */
@media (min-width: 768px) and (max-width: 991px) {
    .actions-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    .products-row {
        flex-wrap: nowrap;
    }

    .product-card-mobile {
        width: 180px;
    }
    
    .mobile-slider {
        height: 250px;
    }
}

/* Additional Mobile Overflow Prevention */
@media (max-width: 768px) {
    /* Ensure all mobile elements fit within viewport */
    .mobile-header,
    .mobile-search,
    .location-bar,
    .category-pills,
    .mobile-slider,
    .quick-actions,
    .products-scroll,
    .mobile-footer,
    .bottom-nav {
        max-width: 100vw;
        overflow-x: hidden;
    }
    
    /* Prevent horizontal scroll on slider */
    .slider-container {
        max-width: 100%;
    }
    
    .slide {
        max-width: 100vw;
    }
    
    .slide-content {
        max-width: 100%;
        padding: 0 20px;
    }
    
    .slide-content h2,
    .slide-content p {
        word-wrap: break-word;
        overflow-wrap: break-word;
    }
    
    /* Product cards responsiveness */
    .product-card-mobile {
        max-width: 160px;
        flex-shrink: 0;
    }
    
    /* Menu drawer responsiveness */
    .mobile-menu-drawer {
        max-width: 85vw;
    }
    
    /* Ensure action icons don't overflow */
    .action-icon {
        max-width: 70px;
        max-height: 70px;
    }
    
    .action-label {
        max-width: 100%;
        word-wrap: break-word;
        text-align: center;
    }
}

/* Very small mobile devices */
@media (max-width: 360px) {
    .mobile-logo {
        font-size: 18px;
    }
    
    .mobile-logo img {
        max-height: 32px;
        max-width: 120px;
    }
    
    .mobile-site-logo {
        height: 32px !important;
        max-width: 120px !important;
    }
    
    .mobile-drawer-logo {
        height: 28px !important;
        max-width: 100px !important;
    }
    
    .actions-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 16px;
    }
    
    .action-icon {
        width: 60px;
        height: 60px;
        font-size: 24px;
    }
    
    .action-label {
        font-size: 11px;
    }
    
    .product-card-mobile {
        width: 140px;
    }
    
    .slide-content h2 {
        font-size: 24px;
    }
    
    .slide-content p {
        font-size: 13px;
    }
    
    .slide-btn {
        padding: 10px 20px;
        font-size: 12px;
    }
}