:root {
    --primary: #081c54;
    --primary-dark: #3190b3;
    --secondary: #2e18b6;
    --accent: #f4a261;
    --dark: #1d3557;
    --light: #f1faee;
    --text-dark: #2d3748;
    --text-light: #718096;
    --border: #e2e8f0;
    --success: #38a169;
    --warning: #ecc94b;
    --danger: #e53e3e;
    --card-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    --card-hover-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

html {
    font-size: 14px;
    /* Base font size for mobile */
}

body {
    background-color: #f8f9fa;
    color: var(--text-dark);
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    -webkit-text-size-adjust: 100%;
    /* Prevent zoom on iOS */
}

.container {
    max-width: 95%;
    margin: 0 auto;
    /* padding: 0 12px; */
    width: 100%;
}

/* Header Styles - Mobile First */
.header {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-top {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px 0;
    flex-wrap: wrap;
    gap: 10px;
}

.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: white;
    flex-shrink: 0;
    min-width: fit-content;
}

.logo-icon {
    font-size: 24px;
    margin-right: 6px;
    font-weight: 800;
}

.logo-text {
    font-size: 18px;
    font-weight: 800;
    letter-spacing: -0.5px;
    white-space: nowrap;
}

/* Search Container - Improved Mobile Responsiveness */
.search-container {
    flex: 1;
    min-width: 0;
    /* Allow shrinking */
    margin: 0 8px;
    /* Default order for tablet/desktop */
}

.search-box {
    display: flex;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    min-width: 0;
}

.search-input {
    flex: 1;
    border: none;
    padding: 12px 14px;
    font-size: 14px;
    outline: none;
    min-width: 0;
    width: 100%;
}

.search-input::placeholder {
    color: #a0aec0;
    font-size: 14px;
}

.search-button {
    background: var(--secondary);
    color: white;
    border: none;
    padding: 0 16px;
    cursor: pointer;
    transition: background 0.2s;
    min-width: 50px;
    /* Better touch target */
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.search-button:hover {
    background: #238276;
}

.search-button i {
    font-size: 16px;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.action-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    transition: transform 0.2s;
    color: white;
    text-decoration: none;
    padding: 6px 8px;
    border-radius: 6px;
    min-width: 50px;
    /* Better touch target */
    min-height: 44px;
    justify-content: center;
    position: relative;
}

.action-item:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

.action-icon {
    font-size: 16px;
    margin-bottom: 2px;
}

.action-text {
    font-size: 11px;
    font-weight: 500;
    white-space: nowrap;
}

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

/* Navigation - Improved for mobile */
.nav-container {
    background: white;
    border-bottom: 1px solid var(--border);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    /* Smooth scrolling on iOS */
}

.nav-container::-webkit-scrollbar {
    display: none;
    /* Hide scrollbar */
}

.nav-menu {
    display: flex;
    list-style: none;
    padding: 8px 0;
    min-width: max-content;
    /* Allow horizontal scrolling */
}

.nav-item {
    margin-right: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    color: var(--text-dark);
    transition: color 0.2s;
    display: flex;
    align-items: center;
    padding: 8px 12px;
    border-radius: 6px;
    min-height: 40px;
    /* Better touch target */
    flex-shrink: 0;
    text-decoration: none;
}

.nav-item:hover {
    color: var(--primary);
    background-color: rgba(23, 71, 207, 0.05);
}

.nav-item.active {
    color: var(--primary);
    background-color: rgba(23, 71, 207, 0.1);
}

.nav-item i {
    margin-right: 6px;
    color: var(--secondary);
    font-size: 13px;
}

/* Breadcrumb */
.breadcrumb {
    padding: 16px 0;
    background: white;
    border-bottom: 1px solid var(--border);
    margin-bottom: 16px;
}

.breadcrumb-links {
    display: flex;
    align-items: center;
    list-style: none;
    font-size: 13px;
    flex-wrap: wrap;
    gap: 8px;
}

.breadcrumb-links li {
    display: flex;
    align-items: center;
}

.breadcrumb-links a {
    color: var(--text-light);
    text-decoration: none;
    transition: color 0.2s;
    font-size: 13px;
}

.breadcrumb-links a:hover {
    color: var(--primary);
}

.breadcrumb-links .separator {
    margin: 0 8px;
    color: var(--text-light);
}

.breadcrumb-links .current {
    color: var(--primary);
    font-weight: 600;
}

/* Main Content Wrapper */
.main-content {
    flex: 1;
    padding-bottom: 20px;
}

/* Cart Page Layout */
.cart-page {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
    flex-direction: column;
}

/* Cart Items Section */
.cart-items-section {
    flex: 1;
}

.cart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding: 0 4px;
}

.cart-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--dark);
}

.cart-items-count {
    color: var(--text-light);
    font-size: 14px;
}

.cart-items {
    background: white;
    border-radius: 8px;
    padding: 16px;
    box-shadow: var(--card-shadow);
    margin-bottom: 16px;
}

.cart-item {
    display: flex;
    padding: 16px 0;
    border-bottom: 1px solid var(--border);
    gap: 16px;
    flex-direction: column;
}

.cart-item:last-child {
    border-bottom: none;
}

.cart-item-image {
    width: 100px;
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border-radius: 6px;
    flex-shrink: 0;
    align-self: center;
}

.cart-item-image img {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
}

.cart-item-details {
    flex: 1;
    text-align: center;
}

.cart-item-category {
    color: var(--text-light);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.cart-item-title {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 8px;
    line-height: 1.4;
}

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

.cart-item-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-direction: column;
}

.quantity-controls {
    display: flex;
    align-items: center;
    border: 1px solid var(--border);
    border-radius: 6px;
    overflow: hidden;
    justify-content: center;
    max-width: 140px;
    margin: 0 auto;
}

.quantity-btn {
    background: white;
    border: none;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s;
    min-height: 44px;
    /* Better touch target */
}

.quantity-btn:hover {
    background: var(--light);
}

.quantity-input {
    width: 50px;
    height: 36px;
    border: none;
    text-align: center;
    font-weight: 600;
    background: white;
    min-height: 44px;
    /* Better touch target */
}

.remove-btn {
    background: none;
    border: 1px solid var(--border);
    color: var(--text-light);
    padding: 10px 16px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-size: 13px;
    min-height: 44px;
    /* Better touch target */
}

.remove-btn:hover {
    color: var(--danger);
    border-color: var(--danger);
}

/* Cart Summary Section */
.cart-summary-section {
    flex: 1;
}

.cart-summary {
    background: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: var(--card-shadow);
    position: static;
}

.summary-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
}

.summary-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    font-size: 14px;
}

.summary-label {
    color: var(--text-light);
}

.summary-value {
    font-weight: 600;
}

.summary-divider {
    height: 1px;
    background: var(--border);
    margin: 12px 0;
}

.summary-total {
    display: flex;
    justify-content: space-between;
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 16px;
}

.total-label {
    color: var(--dark);
}

.total-value {
    color: var(--primary);
}

.checkout-btn {
    background: var(--primary);
    color: white;
    border: none;
    padding: 14px;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    width: 100%;
    margin-bottom: 12px;
    box-shadow: 0 4px 12px rgba(23, 71, 207, 0.3);
    min-height: 44px;
    /* Better touch target */
}

.checkout-btn:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(23, 71, 207, 0.4);
}

.continue-shopping {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.2s;
    font-size: 14px;
    padding: 8px;
    border-radius: 6px;
    min-height: 44px;
    /* Better touch target */
}

.continue-shopping:hover {
    gap: 10px;
    background: var(--light);
}

/* Promo Code */
.promo-code {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
}

.promo-title {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 8px;
}

.promo-form {
    display: flex;
    gap: 8px;
    flex-direction: column;
}

.promo-input {
    flex: 1;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 14px;
    min-height: 44px;
    /* Better touch target */
}

.promo-btn {
    background: var(--secondary);
    color: white;
    border: none;
    padding: 12px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: background 0.2s;
    min-height: 44px;
    /* Better touch target */
}

.promo-btn:hover {
    background: #238276;
}

/* Empty Cart */
.empty-cart {
    background: white;
    border-radius: 8px;
    padding: 40px 20px;
    text-align: center;
    box-shadow: var(--card-shadow);
    margin: 20px 0;
}

.empty-cart-icon {
    font-size: 60px;
    color: var(--text-light);
    margin-bottom: 16px;
}

.empty-cart-title {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--dark);
}

.empty-cart-text {
    color: var(--text-light);
    margin-bottom: 24px;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
    font-size: 14px;
    line-height: 1.5;
}

.shop-now-btn {
    background: var(--primary);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    display: inline-block;
    box-shadow: 0 4px 12px rgba(23, 71, 207, 0.3);
    min-height: 44px;
    /* Better touch target */
}

.shop-now-btn:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(23, 71, 207, 0.4);
}

/* Security Badges */
.security-badges {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-top: 24px;
    flex-wrap: wrap;
}

.security-badge {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    color: var(--text-light);
    font-size: 11px;
}

.badge-icon {
    font-size: 20px;
    color: var(--success);
}

/* Notification */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: var(--success);
    color: white;
    padding: 12px 16px;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 10000;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    max-width: 300px;
    font-size: 14px;
}

.notification.error {
    background: var(--danger);
}

.notification.show {
    transform: translateX(0);
}

/* Footer - Mobile Optimized */
.footer {
    background: linear-gradient(135deg, #0f172a, #1e293b);
    color: white;
    padding: 30px 0 0;
    margin-top: auto;
}

.footer-main {
    padding-bottom: 25px;
}

.footer-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 25px;
}

.footer-column h3 {
    font-size: 16px;
    margin-bottom: 16px;
    position: relative;
    padding-bottom: 8px;
    font-weight: 700;
}

.footer-column h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 30px;
    height: 2px;
    background: var(--primary);
    border-radius: 2px;
}

.footer-about {
    max-width: 100%;
}

.footer-about .logo {
    margin-bottom: 12px;
    color: white;
}

.footer-about p {
    color: #cbd5e0;
    margin-bottom: 16px;
    line-height: 1.6;
    font-size: 13px;
}

.social-links {
    display: flex;
    gap: 8px;
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: white;
    text-decoration: none;
    transition: all 0.2s;
}

.social-link:hover {
    background: var(--primary);
    transform: translateY(-2px);
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 10px;
}

.footer-links a {
    text-decoration: none;
    color: #cbd5e0;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    font-size: 13px;
    padding: 4px 0;
}

.footer-links a:hover {
    color: white;
    transform: translateX(3px);
}

.footer-links a i {
    margin-right: 8px;
    width: 14px;
    text-align: center;
    color: var(--primary);
}

.contact-info {
    list-style: none;
}

.contact-info li {
    margin-bottom: 10px;
    display: flex;
    align-items: flex-start;
    color: #cbd5e0;
    font-size: 13px;
}

.contact-info li i {
    margin-right: 8px;
    color: var(--primary);
    margin-top: 2px;
    flex-shrink: 0;
}

.footer-bottom {
    background: rgba(0, 0, 0, 0.2);
    padding: 16px 0;
    border-top: 1px solid #2d3748;
}

.footer-bottom-content {
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: center;
    text-align: center;
}

.footer-bottom-links {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    justify-content: center;
}

.footer-bottom-links a {
    color: #cbd5e0;
    text-decoration: none;
    font-size: 12px;
    transition: color 0.2s;
}

.footer-bottom-links a:hover {
    color: white;
}

.copyright {
    color: #94a3b8;
    font-size: 12px;
}

.payment-methods {
    display: flex;
    gap: 6px;
    margin-top: 12px;
    flex-wrap: wrap;
    justify-content: center;
}

.payment-method {
    width: 36px;
    height: 24px;
    background: white;
    border-radius: 3px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 9px;
    font-weight: 700;
    color: var(--dark);
}

/* Newsletter */
.newsletter {
    margin-top: 12px;
}

.newsletter p {
    color: #cbd5e0;
    margin-bottom: 10px;
    font-size: 12px;
}

.newsletter-form {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.newsletter-input {
    padding: 10px 12px;
    border: none;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    font-size: 13px;
}

.newsletter-input::placeholder {
    color: #94a3b8;
}

.newsletter-button {
    background: var(--primary);
    color: white;
    border: none;
    padding: 10px 16px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
    font-weight: 600;
    min-height: 44px;
    /* Better touch target */
}

.newsletter-button:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
}

/* Mobile Styles */
@media (max-width: 768px) {
    .header-top {
        gap: 8px;
        padding: 8px 0;
    }

    .logo {
        flex: 1;
        min-width: auto;
    }

    .logo-icon {
        font-size: 22px;
    }

    .logo-text {
        font-size: 16px;
    }

    .search-container {
        order: 3;
        /* Move search to bottom on mobile */
        margin: 8px 0 0;
        width: 100%;
        flex: 0 0 100%;
    }

    .search-box {
        border-radius: 10px;
    }

    .search-input {
        padding: 14px 16px;
        font-size: 16px;
        /* Prevent zoom on iOS */
    }

    .search-input::placeholder {
        font-size: 16px;
    }

    .search-button {
        padding: 0 20px;
        min-width: 60px;
    }

    .header-actions {
        gap: 4px;
    }

    .action-item {
        min-width: 44px;
        padding: 4px 6px;
    }

    .action-text {
        font-size: 10px;
    }

    .action-icon {
        font-size: 14px;
    }

    /* Mobile navigation improvements */
    .nav-container {
        padding: 0 8px;
    }

    .nav-menu {
        padding: 6px 0;
    }

    .nav-item {
        font-size: 12px;
        padding: 6px 10px;
        margin-right: 6px;
        min-height: 36px;
    }

    .nav-item i {
        font-size: 12px;
        margin-right: 4px;
    }

    .cart-item {
        text-align: center;
    }

    .cart-item-image {
        align-self: center;
    }

    .cart-item-actions {
        justify-content: center;
    }

    .security-badges {
        flex-wrap: wrap;
    }

    .footer-container {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .footer-bottom-content {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }

    .footer-bottom-links {
        justify-content: center;
    }
}

/* Small Mobile Styles */
@media (max-width: 480px) {
    .logo-text {
        font-size: 14px;
    }

    .logo-icon {
        font-size: 20px;
        margin-right: 4px;
    }

    .header-actions {
        gap: 2px;
    }

    .action-item {
        min-width: 40px;
        padding: 4px;
    }

    .action-text {
        font-size: 9px;
    }

    .search-input {
        padding: 12px 14px;
    }

    .search-button {
        padding: 0 16px;
        min-width: 50px;
    }

    .cart-item-image {
        width: 80px;
        height: 80px;
    }

    .empty-cart {
        padding: 30px 16px;
    }

    .empty-cart-icon {
        font-size: 50px;
    }
}

/* Tablet Styles */
@media (min-width: 769px) and (max-width: 1024px) {
    .search-container {
        margin: 0 12px;
    }

    .search-input {
        padding: 11px 14px;
        font-size: 15px;
    }

    .search-button {
        padding: 0 18px;
    }

    .cart-page {
        flex-direction: row;
    }

    .cart-summary-section {
        flex: 0 0 350px;
    }

    .cart-summary {
        position: sticky;
        top: 100px;
    }

    .cart-item {
        flex-direction: row;
        text-align: left;
    }

    .cart-item-details {
        text-align: left;
    }

    .cart-item-actions {
        justify-content: flex-start;
        flex-direction: row;
    }

    .quantity-controls {
        margin: 0;
    }

    .footer-container {
        grid-template-columns: 2fr 1fr 1fr;
        gap: 30px;
    }

    .newsletter-form {
        flex-direction: row;
    }
}

/* Desktop Styles */
@media (min-width: 1025px) {
    html {
        font-size: 16px;
    }

    .search-container {
        max-width: 500px;
        margin: 0 20px;
    }

    .cart-page {
        flex-direction: row;
    }

    .cart-summary-section {
        flex: 0 0 350px;
    }

    .cart-summary {
        position: sticky;
        top: 100px;
    }

    .cart-item {
        flex-direction: row;
        text-align: left;
    }

    .cart-item-details {
        text-align: left;
    }

    .cart-item-actions {
        justify-content: flex-start;
        flex-direction: row;
    }

    .quantity-controls {
        margin: 0;
    }

    .promo-form {
        flex-direction: row;
    }

    .footer-container {
        grid-template-columns: 2fr 1fr 1fr 1fr;
    }

    .footer-bottom-content {
        flex-direction: row;
        justify-content: space-between;
        text-align: left;
    }
}

/* Large Desktop */
@media (min-width: 1200px) {
    .container {
        padding: 0 15px;
    }
}

.search-suggestions {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    margin-top: 5px;
    max-height: 400px;
    overflow-y: auto;
    z-index: 1000;
}

.suggestion-category {
    padding: 10px 0;
    border-bottom: 1px solid #e2e8f0;
}

.suggestion-category:last-child {
    border-bottom: none;
}

.suggestion-title {
    padding: 8px 16px;
    font-size: 12px;
    font-weight: 600;
    color: #718096;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.suggestion-item {
    display: flex;
    align-items: center;
    padding: 10px 16px;
    color: black;
    cursor: pointer;
    transition: background 0.2s ease;
    gap: 10px;
}

.suggestion-item:hover {
    background: #f7fafc;
}

.suggestion-item i {
    width: 16px;
    color: #718096;
}

.suggestion-item.correction i {
    color: #3182ce;
}

.suggestion-item.popular i {
    color: #e53e3e;
}

.suggestion-item.category i {
    color: #38a169;
}

.suggestion-hint {
    margin-left: auto;
    font-size: 12px;
    color: #718096;
    background: #f7fafc;
    padding: 2px 6px;
    border-radius: 4px;
}

.suggestion-loading {
    padding: 20px;
    text-align: center;
    color: #718096;
}

.suggestion-loading i {
    margin-right: 8px;
}

mark {
    background: #fed7d7;
    color: #c53030;
    padding: 1px 2px;
    border-radius: 2px;
}