.topnav {
    overflow: hidden;
    padding-top: 20px;
    padding-left: 20px;
    background-color: navy;
    color: white;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.Shopping-List {
    margin-right: 5px;
    padding-right: 150px;
    overflow-wrap: break-word;
    min-width: 200px;
    float: right;
}

.Shopping-List:hover .shopping-detail {
    display: block !important;
}

.Shopping-List.open .shopping-detail {
    display: block !important;
}

.shopping-detail {
    text-overflow: ellipsis;
    padding-right: 20px;
    padding-bottom: 10px;
    overflow-wrap: break-word;
    display: none;
    position: absolute;
    box-shadow: 0px 8px 16px 0px rgba(0, 0, 0, 0.2);
    z-index: 1;
    background-color: lightgreen;
    color: darkgreen;
}

#cart-items {
    list-style: none;
    padding-left: 0;
    margin: 0;
}

.cart-item {
    padding: 8px 0;
    border-top: 1px solid rgba(0, 0, 0, 0.15);
}

.cart-row {
    margin: 4px 0;
}

/* Override Phase 1 float-based styling so quantity controls align well. */
#cart-items button {
    float: none !important;
    margin-left: 6px;
}

#cart-items input.cart-qty {
    float: none !important;
    width: 70px !important;
}

.shopping-title {
    padding-top: 10px;
    font-weight: bold;
    color: darkslateblue;
}

.shopping-detail button {
    float: right;
    background-color: royalblue;
    color: white;
    border: none;
    border-radius: 5px;
}

.shopping-detail input {
    float: right;
    width: 30px;
}

body {
    position: relative;
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    min-height: 600px;
}

section {
    display: grid;
    grid-template-columns: 20% 80%;
}

.mainpage {
    padding-top: 20px;
    padding-left: 20px;
    color: red;
}

.mainpage img {
    max-width: 50%;
}

.categories {
    padding-top: 20px;
    padding-left: 20px;
    width: 200px;
}

.categories-ul {
    padding-top: 20px;
    position: absolute;
}

.categories a {
    font-size: larger;
    text-decoration: none;
}

a.homepage:link,
a.homepage:visited {
    font-size: 40px;
    text-decoration: none;
    color: white;
}

.path {
    color: pink;
    width: auto;
    vertical-align: top;
    float: left;
    padding-bottom: 5px;
}

.path a {
    /*text-decoration: none;*/
    color: pink;
    font-size: large;
}

ul.product-list {
    margin: 0;
    padding: 0;
    list-style: none;
    overflow: auto;
}

ul.product-list li {
    padding-top: 30px;
    text-align: center;
    min-height: 20%;
    float: left;
}

ul.product-list img {
    max-width: 180px;
    max-height: 180px;
}

ul.product-list a {
    text-decoration: none;
}

ul.product-list button {
    border-radius: 5px;
    border: none;
    background-color: crimson;
    color: white;
    font-size: 10px;
}

ul.product-detail {
    margin: 0;
    padding: 0;
    list-style: none;
    overflow: auto;
}

ul.product-detail li {
    padding: 40px;
    font-size: x-large;
    min-height: 20%;
    float: left;
}

ul.product-detail img {
    max-width: 300px;
    max-height: 300px;
}

ul.product-detail button {
    border-radius: 8px;
    border: none;
    background-color: crimson;
    color: white;
    font-size: x-large;
}

footer {
    position: sticky;
    bottom: 0;
    top: 100%;
    text-align: center;
    width: 100%;
}

.container {
    border: 5px solid black;
}

.container div {
    border: 5px solid red;
}

/* ── Shop hero banner ─────────────────────────────────────────────── */
.shop-hero {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 16px 20px 10px;
    border-bottom: 1px solid #e9ecef;
    margin-bottom: 20px;
}
.shop-hero img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 10px;
    flex-shrink: 0;
}
.shop-hero h1 {
    font-size: 1.4rem;
    font-weight: 700;
    margin: 0 0 4px;
    color: #1a1d23;
}
.shop-cat-label {
    font-size: 0.88rem;
    color: #6c757d;
    margin: 0;
}

/* ── Product card grid ────────────────────────────────────────────── */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 16px;
    padding: 0 12px 24px;
}
.product-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    background: #fff;
    border: 1px solid #e2e6ea;
    border-radius: 10px;
    padding: 14px 10px 12px;
    transition: box-shadow .15s;
}
.product-card:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,.10);
}
.product-img-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 120px;
    margin-bottom: 10px;
}
.product-img-wrap img {
    max-width: 110px;
    max-height: 110px;
    object-fit: contain;
}
.product-name {
    font-size: 0.9rem;
    font-weight: 600;
    color: #212529;
    text-decoration: none;
    margin-bottom: 4px;
    line-height: 1.3;
}
.product-name:hover { color: #0d6efd; }
.product-price {
    font-size: 1rem;
    font-weight: 700;
    color: #28a745;
    margin-bottom: 10px;
}
.product-card .add-to-cart {
    margin-top: auto;
    width: 100%;
    padding: 6px 0;
    background: #dc3545;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    transition: background .15s;
}
.product-card .add-to-cart:hover { background: #b02a37; }

/* ── Phase 6 · social share bar on product page ─────────────────── */
.social-share {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid #e9ecef;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  font-size: 0.85rem;
}
.social-share-label {
  font-weight: 600;
  color: #6c757d;
  margin-right: 6px;
}

/* ── Phase 5 checkout message */
.checkout-msg { margin: 6px 0; font-size: 0.9rem; color: #333; }
.checkout-msg[data-kind='error'] { color: #b00020; }
.checkout-msg[data-kind='info']  { color: #004ba0; }

/* Test accounts box in footer */
footer { background: #f0f4ff; border-top: 2px solid #ccd; padding: 18px 24px; margin-top: 40px; font-size: 0.88rem; }
.test-accounts { margin-bottom: 12px; }
.test-accounts strong { display: block; margin-bottom: 4px; color: #333; }
.test-accounts table { border-collapse: collapse; margin-bottom: 10px; }
.test-accounts th, .test-accounts td { border: 1px solid #bbb; padding: 3px 10px; text-align: left; }
.test-accounts th { background: #dde3ff; }