* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
    font-family: Arial, Helvetica, sans-serif;
    color: #111;
    background: #f6f6f6;
}

/* ─── Navbar (category links) ─── */
.navbar {
    width: 100%;
    background-color: #00d4ff;
    padding: 0 16px;
}

.navList {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px;
}

.navLink {
    display: block;
    padding: 10px 14px;
    color: #111;
    text-decoration: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
}

.navLink:hover { background: rgba(0, 0, 0, 0.10); }
.navLink.active {
    background: rgba(0, 0, 0, 0.18);
    font-weight: 700;
}

/* ─── Top bar ─── */
.topBar {
    position: sticky;
    top: 0;
    z-index: 10;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: #fff;
    border-bottom: 1px solid #eaeaea;
}

.brand { font-weight: 700; }
.brandLink { color: inherit; text-decoration: none; }

.topBarRight { display: flex; align-items: center; gap: 12px; }
.userInfo { font-size: 13px; display: flex; align-items: center; gap: 8px; }
.userInfo .uName { font-weight: 600; }
.userInfo .uLink { color: #111; text-decoration: none; font-size: 12px; padding: 4px 10px; border: 1px solid #ddd; border-radius: 6px; }
.userInfo .uLink:hover { background: #f0f0f0; }

.cart span {
    display: inline-block;
    min-width: 22px;
    text-align: center;
    padding: 2px 8px;
    border-radius: 999px;
    background: #111;
    color: #fff;
    margin-left: 6px;
    font-size: 12px;
}

/* ─── Product grid ─── */
.productCon {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    padding: 16px;
    min-height: 300px;
}

.product {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.06);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.product:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 26px rgba(0, 0, 0, 0.10);
    border-color: #ddd;
}

.productImag {
    width: 100%;
    height: 180px;
    object-fit: cover;
    display: block;
}

.productInformation {
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.productName {
    margin: 0;
    font-weight: 600;
    line-height: 1.3;
}

.productPrice {
    margin: 0;
    font-weight: 700;
}

.addToCart {
    margin-top: 4px;
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid #111;
    background: #111;
    color: #fff;
    cursor: pointer;
    transition: transform 0.05s ease, opacity 0.2s ease;
}
.addToCart:hover { opacity: 0.92; }
.addToCart:active { transform: scale(0.98); }

.emptyMsg {
    grid-column: 1 / -1;
    text-align: center;
    color: #888;
    padding: 60px 0;
    font-size: 16px;
}

/* ─── Responsive ─── */
@media (max-width: 1024px) {
    .productCon { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 768px) {
    .productCon { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 480px) {
    .productCon { grid-template-columns: repeat(1, minmax(0, 1fr)); }
}

/* ─── Breadcrumb bar ─── */
.breadcrumbBar {
    padding: 10px 16px;
    border-bottom: 1px solid #eee;
    background: #fff;
    font-size: 14px;
}
.breadcrumbBar a { color: #111; text-decoration: none; }
.breadcrumbBar a:hover { text-decoration: underline; }
.breadcrumbBar .sep { margin: 0 8px; color: #888; }

/* ─── Product link style ─── */
.productLink { color: inherit; text-decoration: none; }
.productLink:hover { text-decoration: underline; }

/* ─── Cart hover panel ─── */
.cart { position: relative; }

.cartToggle {
    border: 0;
    background: transparent;
    cursor: pointer;
    font: inherit;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.cartPanel {
    position: absolute;
    right: 0;
    top: calc(100% + 10px);
    width: 320px;
    background: #fff;
    border: 1px solid #e6e6e6;
    border-radius: 14px;
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.14);
    padding: 14px;
    z-index: 999;
    opacity: 0;
    transform: translateY(-6px);
    pointer-events: none;
    transition: opacity .15s ease, transform .15s ease;
}

.cart:hover .cartPanel,
.cart:focus-within .cartPanel {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.cartPanel__title { font-weight: 700; margin-bottom: 10px; }

.cartItems {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 300px;
    overflow-y: auto;
}

.cartItem {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 10px;
    border: 1px solid #f0f0f0;
    border-radius: 12px;
    background: #fafafa;
}

.cartItem__info {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cartItem__name { font-size: 13px; line-height: 1.2; max-width: 170px; }
.cartItem__price { font-size: 12px; color: #555; white-space: nowrap; }

.cartItem__controls {
    display: flex;
    align-items: center;
    gap: 4px;
}

.cartItem__btn {
    width: 28px;
    height: 28px;
    border: 1px solid #ddd;
    border-radius: 6px;
    background: #fff;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #333;
    padding: 0;
    line-height: 1;
}
.cartItem__btn:hover { background: #f0f0f0; }
.cartItem__del { color: #e74c3c; border-color: #f5c6cb; margin-left: auto; }
.cartItem__del:hover { background: #fde8e8; }

.cartItem__input {
    width: 48px;
    padding: 4px 6px;
    border-radius: 6px;
    border: 1px solid #ddd;
    text-align: center;
    font-size: 13px;
}

.cartEmpty {
    text-align: center;
    color: #999;
    padding: 16px 0;
    font-size: 13px;
}

.cartTotal {
    padding: 8px 0;
    font-weight: 700;
    font-size: 15px;
    text-align: right;
}

.checkoutBtn {
    width: 100%;
    margin-top: 4px;
    padding: 10px 12px;
    border-radius: 12px;
    border: 1px solid #111;
    background: #111;
    color: #fff;
    cursor: pointer;
}

/* ─── Footer ─── */
.siteFooter {
    text-align: center;
    padding: 20px 16px;
    font-size: 13px;
    color: #999;
    border-top: 1px solid #eee;
    background: #fff;
    margin-top: 24px;
}
