/* =========================================================
   EcoFeed Solutions – Product detail page
   Same palette / type / layout language as the other pages
   ========================================================= */

.detail-page {
    --green: #4CAF50;
    --green-deep: #2e7d32;
    --gold: #FFD700;
    --cream: #FBF4E4;
    --ink: #111;
    --muted: #4d4d4d;
    --line: #ddd5bf;
    --ease: cubic-bezier(.22, .8, .24, 1);
    font-family: 'DM Sans', system-ui, sans-serif;
    font-size: 16px;
    line-height: 1.65;
    color: var(--ink);
    background: #fff;
}

.detail-page *, .detail-page *::before, .detail-page *::after { box-sizing: border-box; }
.detail-page h1, .detail-page h2, .detail-page h3, .detail-page p { margin: 0; padding: 0; }
.detail-page a { color: inherit; text-decoration: none; }
.detail-page img { display: block; max-width: 100%; }
.detail-page .wrap { max-width: 1240px; margin: 0 auto; padding: 0 24px; }
.detail-page :focus-visible { outline: 3px solid var(--green); outline-offset: 3px; border-radius: 6px; }

/* ---------- Breadcrumb (sits under the floating header) ---------- */
.detail-top { padding-top: 128px; }

.breadcrumb { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 15px; color: var(--muted); margin-bottom: 28px; }
.breadcrumb a { font-weight: 500; transition: color .25s ease; }
.breadcrumb a:hover { color: var(--green-deep); }
.breadcrumb .sep { color: var(--line); }
.breadcrumb span.current { color: var(--ink); font-weight: 600; }

/* ---------- Product ---------- */
.product-section {
    display: grid;
    grid-template-columns: 1.05fr 1fr;
    gap: 64px;
    align-items: start;
    padding-bottom: clamp(56px, 8vw, 96px);
}

.product-gallery { position: sticky; top: 110px; }

.main-image {
    aspect-ratio: 1 / 1;
    overflow: hidden;
    border-radius: 14px;
    background: var(--cream);
}

.main-image img { width: 100%; height: 100%; object-fit: cover; }

.product-category { display: block; margin-bottom: 10px; color: var(--green-deep); font-weight: 700; }

.product-title {
    font-family: 'Bricolage Grotesque', sans-serif;
    font-weight: 800;
    font-size: clamp(34px, 4.6vw, 58px);
    line-height: 1;
    letter-spacing: -.035em;
    margin-bottom: 22px;
}

.product-price {
    font-family: 'Bricolage Grotesque', sans-serif;
    font-weight: 800;
    font-size: clamp(30px, 3.4vw, 42px);
    letter-spacing: -.02em;
    margin-bottom: 26px;
}

.price-negotiable {
    display: inline-block;
    padding: 6px 16px;
    border-radius: 8px;
    background: var(--gold);
    color: var(--ink);
    font: 600 18px 'DM Sans', sans-serif;
    letter-spacing: 0;
}

.product-description { font-size: 18px; color: var(--muted); margin-bottom: 32px; max-width: 56ch; }

.product-meta { border-top: 2px solid var(--ink); margin-bottom: 36px; }

.meta-item {
    display: grid;
    grid-template-columns: 150px 1fr;
    gap: 16px;
    padding: 16px 0;
    border-bottom: 1px solid var(--line);
}

.meta-item:empty { display: none; }
.meta-label { font-weight: 700; }

.btn-group { display: flex; flex-wrap: wrap; gap: 12px; }

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    height: 56px;
    padding: 0 34px;
    border-radius: 10px;
    border: 2px solid transparent;
    font: 600 17px 'DM Sans', sans-serif;
    transition: background .25s ease, color .25s ease, border-color .25s ease, transform .25s var(--ease);
}

.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--green); color: #fff; }
.btn-primary:hover { background: var(--gold); color: var(--ink); }
.btn-secondary { border-color: var(--ink); color: var(--ink); }
.btn-secondary:hover { background: var(--ink); color: #fff; }

/* ---------- Related products ---------- */
.related { background: var(--cream); padding: clamp(56px, 8vw, 96px) 0; }

.related h2 {
    font-family: 'Bricolage Grotesque', sans-serif;
    font-weight: 800;
    font-size: clamp(28px, 3.6vw, 44px);
    line-height: 1.05;
    letter-spacing: -.03em;
    margin-bottom: 36px;
}

.related-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 32px 24px; }

.related-card { display: flex; flex-direction: column; }

.related-card .rimg {
    aspect-ratio: 4 / 3;
    overflow: hidden;
    border-radius: 14px;
    background: #fff;
    margin-bottom: 16px;
}

.related-card .rimg img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease); }
.related-card:hover .rimg img { transform: scale(1.06); }

.related-card h3 {
    font-family: 'Bricolage Grotesque', sans-serif;
    font-weight: 700;
    font-size: 20px;
    line-height: 1.2;
    margin-bottom: 6px;
    transition: color .25s ease;
}

.related-card:hover h3 { color: var(--green-deep); }
.related-card .rprice { font-weight: 600; color: var(--muted); }

/* ---------- Responsive ---------- */
@media (max-width: 1000px) {
    .product-section { grid-template-columns: 1fr; gap: 36px; }
    .product-gallery { position: static; }
    .main-image { aspect-ratio: 4 / 3; }
    .related-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 600px) {
    .detail-page .wrap { padding: 0 18px; }
    .detail-top { padding-top: 104px; }
    .meta-item { grid-template-columns: 1fr; gap: 2px; }
    .btn-group .btn { width: 100%; }
    .product-description { font-size: 16px; }
    .related-grid { gap: 28px 16px; }
    .related-card h3 { font-size: 17px; }
}

@media (prefers-reduced-motion: reduce) {
    .detail-page * { transition-duration: .01ms !important; }
}