/* Navbar */
.navbar {
    position: fixed;
    top: 0; left: 0; right: 0;
    height: 70px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 5%;
    z-index: 100;
}
.navbar .logo {
    font-size: 1.8rem;
    font-weight: 800;
    letter-spacing: 2px;
    background: linear-gradient(to right, #fff, var(--text-muted));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
.nav-links {
    display: flex;
    align-items: center;
    gap: 20px;
}
.rates-display {
    font-size: 0.9rem;
    color: var(--text-muted);
    background: rgba(255,255,255,0.05);
    padding: 5px 10px;
    border-radius: 20px;
}
.cart-btn {
    background: transparent;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    position: relative;
    color: white;
}
.badge {
    position: absolute;
    top: -5px; right: -10px;
    background: var(--accent);
    color: white;
    font-size: 0.7rem;
    padding: 2px 6px;
    border-radius: 10px;
    font-weight: bold;
}

/* Container */
.container {
    padding: 100px 5% 50px;
    min-height: 100vh;
}

/* Hero */
.hero {
    text-align: center;
    margin-bottom: 3rem;
}
.hero h1 {
    font-size: 3rem;
    margin-bottom: 0.5rem;
}
.hero h1 span {
    color: var(--accent);
}
.hero p {
    color: var(--text-muted);
    font-size: 1.2rem;
}

/* Products Grid */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
}
.product-card {
    border-radius: 16px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.4);
}
.product-image {
    width: 100%;
    height: 350px;
    object-fit: cover;
}
.product-info {
    padding: 1.5rem;
}
.product-title {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}
.product-price {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--accent);
    margin-bottom: 1rem;
}
.size-selector {
    display: flex;
    gap: 10px;
    margin-bottom: 1rem;
}
.size-btn {
    background: rgba(255,255,255,0.1);
    border: 1px solid var(--border-color);
    color: white;
    width: 40px; height: 40px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}
.size-btn.selected {
    background: var(--accent);
    border-color: var(--accent);
}

/* Sidebar Cart */
.sidebar {
    position: fixed;
    top: 0; right: -400px;
    width: 350px;
    height: 100vh;
    background: var(--bg-color);
    border-left: 1px solid var(--border-color);
    z-index: 200;
    transition: right 0.4s ease;
    display: flex;
    flex-direction: column;
}
.sidebar.open {
    right: 0;
}
.sidebar-header {
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
}
.close-btn {
    background: transparent;
    border: none;
    color: white;
    font-size: 2rem;
    cursor: pointer;
}
.cart-items {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}
.cart-item {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
    background: rgba(255,255,255,0.05);
    padding: 10px;
    border-radius: 8px;
}
.cart-item img {
    width: 60px; height: 60px;
    border-radius: 8px;
    object-fit: cover;
}
.cart-item-info {
    flex: 1;
}
.cart-item-title {
    font-size: 0.9rem;
    margin-bottom: 5px;
}
.cart-item-price {
    font-weight: bold;
    color: var(--accent);
}
.cart-footer {
    padding: 20px;
    border-top: 1px solid var(--border-color);
    background: rgba(0,0,0,0.2);
}
.totals p {
    display: flex;
    justify-content: space-between;
    margin: 5px 0;
    color: var(--text-muted);
}
.totals p:last-child {
    font-size: 1.2rem;
    color: white;
    font-weight: bold;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px dashed var(--border-color);
}
.overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.5);
    backdrop-filter: blur(5px);
    z-index: 150;
    display: none;
}
.overlay.active {
    display: block;
}

/* Modal */
.modal {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: 300;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
}
.modal.active {
    opacity: 1;
    pointer-events: auto;
}
.modal::before {
    content: '';
    position: absolute;
    top:0; left:0; right:0; bottom:0;
    background: rgba(0,0,0,0.7);
    backdrop-filter: blur(8px);
}
.modal-content {
    position: relative;
    width: 100%;
    max-width: 500px;
    padding: 30px;
    border-radius: 16px;
    max-height: 90vh;
    overflow-y: auto;
}
.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 20px;
}
.payment-summary {
    background: rgba(0,0,0,0.3);
    padding: 15px;
    border-radius: 8px;
    margin: 20px 0;
    text-align: center;
}
.payment-summary h1 {
    color: var(--success);
    margin: 10px 0;
}

/* Tracking Card */
.tracking-card {
    max-width: 600px;
    margin: 50px auto;
    padding: 40px;
    text-align: center;
    border-radius: 16px;
}
.status-indicator {
    margin: 30px 0;
}
#statusIcon {
    font-size: 4rem;
    margin-bottom: 20px;
}

/* Responsive Media Queries */
@media (max-width: 768px) {
    .navbar {
        padding: 0 15px;
    }
    .navbar .logo img {
        height: 45px !important;
    }
    .cart-sidebar {
        width: 100%;
        right: -100%;
    }
    .cart-sidebar.active {
        right: 0;
    }
    .modal-content {
        width: 95%;
        margin: 10% auto;
        padding: 20px;
    }
    .admin-layout {
        flex-direction: column;
    }
    .admin-sidebar {
        width: 100%;
        min-height: auto;
    }
}

/* Vertical Tablets & Medium Screens (3 products per row) */
@media (min-width: 520px) and (max-width: 1024px) {
    .products-grid {
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 1rem !important;
    }
}

/* Mobile Phones (< 520px - 2 products per row) */
@media (max-width: 519px) {
    .products-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 0.6rem !important;
    }
    .product-card .product-info {
        padding: 0.7rem !important;
    }
    .product-card .product-title {
        font-size: 0.95rem !important;
    }
}
