@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@600;700&family=DM+Sans:wght@300;400;500;600&display=swap');

:root {
  --green-deep: #00703C;
  --green-mid: #2d9b5a;
  --green-light: #54b666;
  --green-pale: #e6f5ec;
  --bg: #f2f5f3;
  --cart-bg: #1a2e22;
  --white: #ffffff;
  --ink: #0f1f14;
  --ink-soft: #3a4a40;
  --muted: #7a8c80;
  --border: #d8e8dc;
  --radius: 14px;
  --radius-lg: 22px;
  --shadow-card: 0 4px 20px rgba(0,112,60,0.09);
  --shadow-md: 0 8px 30px rgba(0,0,0,0.10);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  margin: 0;
  font-family: 'DM Sans', sans-serif;
  background: var(--bg);
  color: var(--ink);
}

svg { width: 30px; }

a { text-decoration: none; color: var(--ink-soft); }
button { cursor: pointer; font-family: 'DM Sans', sans-serif; }

/* ── MAIN CONTAINER ── */
.container {
  width: 960px;
  margin: auto;
  max-width: 92vw;
  text-align: center;
  padding-top: 14px;
  transition: 0.45s ease;
}

/* ── HEADER ── */
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 0;
  border-bottom: 1px solid var(--border);
  margin-bottom: 20px;
}

.branding {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-family: 'Playfair Display', serif;
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--green-deep);
  letter-spacing: -0.4px;
}

.branding img {
  height: 38px;
  width: 38px;
  object-fit: contain;
}

/* ── CART ICON ── */
.icon-cart {
  position: relative;
  cursor: pointer;
  padding: 8px;
  border-radius: 50%;
  transition: background 0.2s;
}

.icon-cart:hover {
  background: var(--green-pale);
}

.icon-cart span {
  position: absolute;
  background: var(--green-deep);
  width: 22px;
  height: 22px;
  display: flex;
  justify-content: center;
  align-items: center;
  border-radius: 50%;
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  top: 0;
  right: -4px;
  box-shadow: 0 2px 8px rgba(0,112,60,0.4);
}

/* ── SECTION TITLE ── */
.title {
  font-family: 'Playfair Display', serif;
  font-size: 1.9rem;
  font-weight: 700;
  color: var(--ink);
  margin: 32px 0 24px;
  text-align: left;
  letter-spacing: -0.5px;
  position: relative;
  padding-bottom: 12px;
}

.title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 40px;
  height: 3px;
  background: var(--green-deep);
  border-radius: 3px;
}

/* ── PRODUCT GRID ── */
.listProduct {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  text-align: left;
  margin-bottom: 40px;
}

.listProduct .item {
  background: var(--white);
  padding: 18px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-card);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.listProduct .item:hover {
  transform: translateY(-5px);
  box-shadow: 0 14px 36px rgba(0,112,60,0.14);
}

.listProduct .item img {
  width: 100%;
  height: 140px;
  object-fit: cover;
  border-radius: 10px;
  margin-bottom: 12px;
  filter: drop-shadow(0 8px 12px rgba(0,0,0,0.12));
}

.listProduct .item h2 {
  font-weight: 600;
  font-size: 0.97rem;
  color: var(--ink);
  margin-bottom: 4px;
}

.listProduct .item .price {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--green-deep);
  letter-spacing: 2px;
  margin-bottom: 10px;
}

.listProduct .item button {
  background: var(--green-deep);
  color: #fff;
  border: none;
  padding: 8px 16px;
  margin-top: 6px;
  border-radius: 30px;
  font-size: 0.83rem;
  font-weight: 600;
  transition: background 0.2s, transform 0.15s;
}

.listProduct .item button:hover {
  background: var(--green-light);
  transform: scale(1.04);
}

/* ── CART SIDEBAR ── */
.cartTab {
  width: 400px;
  max-width: 100%;
  background: var(--cart-bg);
  color: #eee;
  position: fixed;
  top: 0;
  right: -400px;
  bottom: 0;
  display: grid;
  grid-template-rows: 68px 1fr 70px;
  transition: right 0.4s cubic-bezier(0.4,0,0.2,1);
  z-index: 500;
  box-shadow: -8px 0 40px rgba(0,0,0,0.3);
}

.cartTab h1 {
  padding: 0 22px;
  margin: 0;
  font-family: 'Playfair Display', serif;
  font-weight: 600;
  font-size: 1.25rem;
  display: flex;
  align-items: center;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  color: #fff;
}

.cartTab .btn {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
}

.cartTab .btn a {
  display: block;
}

.cartTab .btn a button {
  width: 100%;
  height: 100%;
}

.cartTab button {
  background: var(--green-light);
  color: #fff;
  border: none;
  font-family: 'DM Sans', sans-serif;
  font-weight: 600;
  font-size: 0.88rem;
  cursor: pointer;
  letter-spacing: 0.3px;
  transition: background 0.2s;
}

.cartTab button:hover {
  background: var(--green-deep);
}

.cartTab .close {
  background: rgba(255,255,255,0.1);
  color: #ccc;
}

.cartTab .close:hover {
  background: rgba(255,255,255,0.18);
  color: #fff;
}

.listCart {
  overflow-y: auto;
  padding: 10px 0;
}

.listCart::-webkit-scrollbar { width: 4px; }
.listCart::-webkit-scrollbar-track { background: transparent; }
.listCart::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.15); border-radius: 4px; }

/* cart items */
.listCart .item {
  display: grid;
  grid-template-columns: 70px 1fr 70px;
  gap: 10px;
  padding: 12px 18px;
  text-align: left;
  align-items: center;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.listCart .item img {
  width: 100%;
  border-radius: 8px;
}

.listCart .quantity {
  display: flex;
  align-items: center;
  gap: 4px;
}

.listCart .quantity span {
  display: inline-flex;
  width: 24px;
  height: 24px;
  background: rgba(255,255,255,0.12);
  border-radius: 50%;
  justify-content: center;
  align-items: center;
  color: #eee;
  font-size: 0.85rem;
  cursor: pointer;
  transition: background 0.2s;
}

.listCart .quantity span:hover {
  background: var(--green-light);
}

.listCart .quantity span:nth-child(2) {
  background: transparent;
  color: #eee;
  cursor: auto;
  font-weight: 700;
  width: 28px;
}

body.activeTabCart .cartTab { right: 0; }
body.activeTabCart .container { transform: translateX(-220px); }

/* ── DETAIL PAGE ── */
.detail {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 50px;
  text-align: left;
  margin: 30px 0;
}

.detail .image {
  position: relative;
}

.detail .image img {
  width: 100%;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
}

.detail .image::before {
  position: absolute;
  width: 280px;
  height: 280px;
  content: '';
  background: radial-gradient(circle, rgba(84,182,102,0.2), transparent 70%);
  z-index: -1;
  border-radius: 50%;
  left: calc(50% - 140px);
  top: 30px;
}

.detail .name {
  font-family: 'Playfair Display', serif;
  font-size: 2.4rem;
  font-weight: 700;
  padding: 36px 0 0;
  margin: 0 0 10px;
  line-height: 1.15;
  color: var(--ink);
}

.detail .price {
  font-weight: 700;
  font-size: 1.4rem;
  color: var(--green-deep);
  letter-spacing: 4px;
  margin-bottom: 22px;
}

.detail .buttons {
  display: flex;
  gap: 14px;
  margin-bottom: 22px;
}

.detail .buttons button {
  background: #f0f5f2;
  border: 1.5px solid var(--border);
  padding: 13px 20px;
  border-radius: 40px;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--ink);
  transition: all 0.2s ease;
}



.detail .buttons button:hover {
  background: var(--green-pale);
  border-color: var(--green-light);
}

.detail .buttons svg { width: 14px; }

.detail .buttons span {
  background: var(--green-deep);
  width: 28px;
  height: 28px;
  display: flex;
  justify-content: center;
  align-items: center;
  border-radius: 50%;
  margin-left: 14px;
}

.detail .buttons button:nth-child(2) {
  background: var(--green-deep);
  color: #fff;
  border: none;
  display: flex;
  align-items: center;
  box-shadow: 0 6px 20px rgba(0,112,60,0.28);
}

.detail .buttons button:nth-child(2):hover {
  background: var(--green-mid);
  transform: translateY(-2px);
}

.detail .description {
  font-size: 0.93rem;
  font-weight: 400;
  color: var(--muted);
  line-height: 1.7;
}


/*  back button  */
.back-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;         
    height: 44px;
    background-color: #f0f0f0; 
    border-radius: 50%;    
    text-decoration: none; 
    color: #333;          
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
    transition: all 0.2s ease;
    margin-bottom: 20px;  
    margin-right: auto;
}

.back-btn svg {
    width: 24px;
    height: 24px;
}

.back-btn:hover {
    background-color: #54b666; 
    color: #fff;
    transform: scale(1.1);
}

/* ── RESPONSIVE ── */
@media only screen and (max-width: 992px) {
  .listProduct { grid-template-columns: repeat(3, 1fr); }
  .detail { grid-template-columns: 42% 1fr; }
}

@media only screen and (max-width: 767px) {
  .listProduct { grid-template-columns: repeat(2, 1fr); }
  .detail { text-align: center; grid-template-columns: 1fr; }
  .detail .image img { width: unset; height: 40vh; }
  .detail .name { font-size: 1.6rem; margin: 0; }
  .detail .buttons { justify-content: center; font-size: small; }
  .title { font-size: 1.5rem; }
}