/* User Pages Responsive Styles */

/* Large Desktop - Optimize for wide screens */
@media (min-width: 1400px) {
    .container {
        max-width: 1400px;
    }
}

/* Desktop - Standard desktop layout */
@media (max-width: 1200px) {
    .container {
        padding: 0 15px;
    }

    .nav-list {
        gap: 20px;
    }
}

/* Tablet - Responsive adjustments for tablet devices */
@media (max-width: 768px) {

    /* Hide header-top to save space on mobile */
    .header-top {
        display: none;
    }

    /* Header Adjustments */
    .header-main .container {
        flex-wrap: wrap;
        gap: 10px;
        justify-content: space-between;
    }

    /* 1. Hamburger on Left */
    .mobile-menu-toggle {
        display: flex;
        order: 1;
        flex-shrink: 0;
        margin-right: auto;
        position: relative;
        z-index: 15000;
        /* High priority on mobile */
    }

    /* 2. Logo in Center */
    .logo {
        order: 2;
        flex: 1;
        justify-content: center;
        text-align: center;
        white-space: nowrap;
    }

    /* 3. Icons (Actions) on Right */
    .header-actions {
        order: 3;
        flex-shrink: 0;
        gap: 15px;
        margin-left: auto;
        /* Ensure it sticks to right */
    }

    /* 4. Nav breaks to new line */
    .nav {
        order: 4;
        width: 100%;
        display: none;
        background: rgba(255, 255, 255, 0.05);
        padding: 15px 0;
        border-radius: 12px;
        margin-top: 10px;
    }

    .nav.active {
        display: block;
        animation: slideDown 0.3s ease-out;
        z-index: 10002;
        position: relative;
    }

    @keyframes slideDown {
        from {
            opacity: 0;
            transform: translateY(-10px);
        }

        to {
            opacity: 1;
            transform: translateY(0);
        }
    }

    .nav-list {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }



    /* Header Actions - Better spacing and touch targets */
    .header-actions {
        gap: 12px;
    }

    .header-actions a,
    .header-actions button {
        min-width: 44px;
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    /* User Dropdown - Better mobile positioning */
    .user-dropdown {
        right: 0;
        left: auto;
        min-width: 180px;
    }

    /* Dashboard and Content Areas */
    .hero .container {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 40px;
    }

    .hero-content h2 {
        font-size: 36px;
    }

    .hero-content p {
        font-size: 18px;
    }

    .hero-buttons {
        justify-content: center;
        flex-wrap: wrap;
    }

    /* Grids - Stack to 2 columns or single column */
    .features-grid,
    .quick-access-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 20px;
    }

    /* Profile Page - Stack sidebar */
    .profile-main-content {
        grid-template-columns: 1fr;
    }

    .profile-form-grid {
        grid-template-columns: 1fr;
    }

    /* Services Grid */
    .services-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 20px;
    }

    /* Cart Page */
    .cart-grid {
        grid-template-columns: 1fr;
    }

    /* Footer */
    .footer-content {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 30px;
    }

    .footer {
        padding: 30px 0 12px;
    }

    /* Contact Info */
    .contact-info span {
        margin-right: 10px;
        font-size: 12px;
    }

    .social-links a {
        margin-left: 10px;
        font-size: 14px;
    }

    /* Tabs - Stack vertically */
    .tabs {
        flex-direction: column;
    }

    .tab {
        width: 100%;
    }
}

/* Mobile - Optimized for mobile devices */
@media (max-width: 480px) {
    .container {
        padding: 0 10px;
    }

    /* Logo - Smaller on mobile */
    .logo h1 {
        font-size: 22px;
    }

    .logo i {
        font-size: 26px;
    }

    /* Hero Section */
    .hero {
        padding: 60px 0;
    }

    .hero-content h2 {
        font-size: 28px;
    }

    .hero-content p {
        font-size: 16px;
    }

    .hero-buttons {
        flex-direction: column;
        align-items: center;
        width: 100%;
    }

    .hero-buttons .btn {
        width: 100%;
        max-width: 300px;
    }

    /* Buttons */
    .btn {
        padding: 12px 24px;
        font-size: 14px;
    }

    /* Section Headers */
    .section-header h2 {
        font-size: 28px;
    }

    .section-header p {
        font-size: 16px;
    }

    /* Features and Quick Access */
    .features,
    .quick-access {
        padding: 60px 0;
    }

    .feature-card,
    .quick-access-card {
        padding: 30px 15px;
    }

    .feature-icon,
    .card-icon {
        width: 60px;
        height: 60px;
        font-size: 24px;
    }

    .feature-card h3,
    .quick-access-card h3 {
        font-size: 20px;
    }

    /* Footer */
    .footer {
        padding: 40px 0 20px;
    }

    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 20px;
    }

    /* Header Top - Stack contact info */
    .header-top .container {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }

    .contact-info span {
        display: block;
        margin-bottom: 5px;
    }

    .social-links {
        margin-top: 10px;
    }

    /* Header Actions */
    .header-actions {
        gap: 10px;
    }

    .wishlist-count,
    .cart-count {
        width: 18px;
        height: 18px;
        font-size: 10px;
    }

    /* Profile Page */
    .profile-container {
        padding: 0 1rem;
    }

    .profile-header-section h1 {
        font-size: 1.5rem;
    }

    .profile-name {
        font-size: 1.25rem;
    }

    .avatar {
        width: 100px;
        height: 100px;
        font-size: 2.5rem;
    }

    .form-section {
        padding: 1.5rem;
    }

    .form-actions {
        flex-direction: column;
    }

    .form-actions .btn {
        width: 100%;
        justify-content: center;
    }

    /* Services Page */
    .services-grid {
        grid-template-columns: 1fr;
    }

    .service-card {
        padding: 20px 15px;
    }

    /* Cart Page */
    .cart-item {
        flex-direction: column;
        align-items: flex-start;
    }

    .cart-item img {
        width: 100%;
        height: auto;
        max-height: 200px;
    }

    .cart-item-controls {
        width: 100%;
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }

    /* Payment Page */
    .payment-grid {
        grid-template-columns: 1fr;
    }

    .payment-form,
    .order-summary {
        width: 100%;
    }

    /* Settings Page */
    .settings-grid {
        grid-template-columns: 1fr;
    }
}

/* Small Mobile - Extra small devices */
@media (max-width: 360px) {
    .hero-content h2 {
        font-size: 24px;
    }

    .hero-content p {
        font-size: 14px;
    }

    .btn {
        padding: 10px 20px;
        font-size: 13px;
    }

    .feature-card,
    .quick-access-card,
    .service-card {
        padding: 20px 10px;
    }

    .feature-icon,
    .card-icon {
        width: 50px;
        height: 50px;
        font-size: 20px;
    }

    .feature-card h3,
    .quick-access-card h3,
    .service-card h3 {
        font-size: 18px;
    }

    .logo h1 {
        font-size: 20px;
    }

    .logo i {
        font-size: 24px;
    }

    .section-header h2 {
        font-size: 24px;
    }
}

/* Modal Responsive Styles */
@media (max-width: 768px) {

    .pet-modal,
    .product-modal,
    .service-modal {
        padding: 10px;
    }

    .pet-modal-content,
    .product-modal-content,
    .service-modal-content {
        max-width: 100%;
        max-height: 90vh;
        margin: 0;
        width: 95%;
    }

    .pet-modal-body,
    .product-modal-body,
    .service-modal-body {
        flex-direction: column;
        padding: 16px;
    }

    .pet-modal-image,
    .product-modal-image {
        width: 100%;
        max-width: none;
    }

    .pet-modal-footer,
    .product-modal-footer,
    .service-modal-footer {
        flex-direction: column;
    }

    .pet-modal-footer .btn,
    .product-modal-footer .btn,
    .service-modal-footer .btn {
        width: 100%;
    }
}

/* Landscape Mobile - Optimize for landscape orientation */
@media (max-height: 500px) and (orientation: landscape) {
    .hero {
        padding: 40px 0;
    }

    .hero .container {
        gap: 30px;
    }

    .hero-content h2 {
        font-size: 32px;
        margin-bottom: 15px;
    }

    .hero-content p {
        font-size: 16px;
        margin-bottom: 20px;
    }

    .features,
    .quick-access {
        padding: 40px 0;
    }

    .section-header {
        margin-bottom: 40px;
    }
}

/* Print Styles */
@media print {

    .header,
    .footer,
    .mobile-menu-toggle,
    .btn,
    .header-actions {
        display: none !important;
    }

    .hero,
    .features,
    .quick-access {
        padding: 20px 0;
        background: white !important;
    }

    .hero-content h2 {
        color: black !important;
        -webkit-text-fill-color: black !important;
    }

    .hero-content p {
        color: black !important;
    }

    .feature-card,
    .quick-access-card,
    .service-card {
        box-shadow: none;
        border: 1px solid #ddd;
    }
}

/* Notification Responsive */
@media (max-width: 640px) {
    .notification {
        left: 1rem;
        right: 1rem;
        top: 1rem;
        min-width: auto;
    }

    .notification-container {
        left: 1rem;
        right: 1rem;
        top: 1rem;
    }
}

/* Table Responsive - Horizontal scroll for tables */
@media (max-width: 768px) {
    .table-responsive {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    table {
        min-width: 600px;
    }

    /* Alternative: Card layout for tables on mobile */
    .table-card-mobile {
        display: block;
    }

    .table-card-mobile thead {
        display: none;
    }

    .table-card-mobile tbody,
    .table-card-mobile tr,
    .table-card-mobile td {
        display: block;
        width: 100%;
    }

    .table-card-mobile tr {
        margin-bottom: 15px;
        border: 1px solid #e5e7eb;
        border-radius: 8px;
        padding: 15px;
        background: white;
    }

    .table-card-mobile td {
        text-align: left;
        padding: 8px 0;
        border: none;
    }

    .table-card-mobile td:before {
        content: attr(data-label);
        font-weight: 600;
        display: inline-block;
        width: 120px;
        color: #6B7280;
    }
}