/* MAC Agro Frontend Theme Optimization
 * Consistent spacing, typography and surfaces across public and authenticated pages.
 * Deliberately avoids changing page content, routes, forms or business logic.
 */
:root {
  --mac-green-900:#174a2a;
  --mac-green-800:#205b32;
  --mac-green-700:#2f7d42;
  --mac-green-100:#edf6ec;
  --mac-ink:#25372b;
  --mac-muted:#68776c;
  --mac-line:#e2eae2;
  --mac-surface:#fff;
  --mac-page:#f7f9f6;
  --mac-radius:14px;
  --mac-shadow:0 8px 26px rgba(25,65,38,.065);
  --mac-space-section:clamp(30px,4vw,58px);
}
html { scroll-behavior:smooth; }
body { color:var(--mac-ink); background:#fff; -webkit-font-smoothing:antialiased; }
body, body p, body li { line-height:1.65; }
img, video, iframe { max-width:100%; }
img { height:auto; }
.container { padding-left:18px; padding-right:18px; }
.container-full { padding-left:clamp(14px,2.2vw,30px); padding-right:clamp(14px,2.2vw,30px); }

/* Consistent vertical rhythm for standard theme sections. */
section.default-padding, .default-padding { padding-top:var(--mac-space-section); padding-bottom:var(--mac-space-section); }
section { scroll-margin-top:92px; }
section .row + .row { margin-top:10px; }
.section-heading, .mac-section-heading, .site-heading { margin-bottom:clamp(22px,3vw,34px); }
.section-heading h1, .section-heading h2, .mac-section-heading h2, .site-heading h2 { color:var(--mac-green-900); line-height:1.22; letter-spacing:-.025em; }
.section-heading p, .mac-section-heading p, .site-heading p { max-width:760px; color:var(--mac-muted); line-height:1.7; }

/* Shared cards and panels. */
.card, .panel, .well, .feature-item, .service-item, .product-item, .shop-item, .blog-item, .contact-form, .contact-info {
  border-color:var(--mac-line);
}
.card, .panel { border-radius:var(--mac-radius); overflow:hidden; }
.card { box-shadow:0 5px 20px rgba(25,65,38,.045); }
.card-header, .panel-heading { padding:14px 18px; background:#f4f8f3; border-color:var(--mac-line); color:var(--mac-green-900); }
.card-body, .panel-body { padding:clamp(16px,2.1vw,24px); }

/* Forms: clear labels, predictable heights and visible focus. */
.form-group { margin-bottom:18px; }
label { color:#34473a; font-weight:600; }
.form-control, select.form-control, textarea.form-control, input[type="text"], input[type="email"], input[type="tel"], input[type="number"], input[type="password"], input[type="date"], input[type="file"] {
  border-color:#d8e2d9; border-radius:9px; box-shadow:none; transition:border-color .16s ease,box-shadow .16s ease;
}
.form-control:focus, select.form-control:focus, textarea.form-control:focus, input:focus-visible, select:focus-visible, textarea:focus-visible {
  border-color:#5c9b67; box-shadow:0 0 0 3px rgba(47,125,66,.12); outline:0;
}
textarea.form-control { min-height:110px; }
.help-block, .form-text, .text-muted { color:var(--mac-muted); }

/* Buttons and action hierarchy. */
.btn { border-radius:8px; font-weight:650; line-height:1.35; padding:10px 16px; transition:transform .16s ease,box-shadow .16s ease,background-color .16s ease; }
.btn:focus-visible { outline:3px solid rgba(72,145,81,.35); outline-offset:2px; }
.btn-success, .btn-primary { box-shadow:0 3px 9px rgba(35,104,52,.12); }
.btn-success { background-color:var(--mac-green-700); border-color:var(--mac-green-700); }
.btn-success:hover, .btn-success:focus { background-color:var(--mac-green-800); border-color:var(--mac-green-800); }

/* Tables: spacing, horizontal overflow on smaller screens, clean headers. */
table { max-width:100%; }
.table { margin-bottom:0; color:#34473a; }
.table > thead > tr > th { background:#f2f7f1; color:#25472e; font-weight:700; border-bottom:1px solid #dce7dc; vertical-align:middle; }
.table > thead > tr > th, .table > tbody > tr > td, .table > tfoot > tr > td { padding:12px 14px; vertical-align:middle; border-color:#e6ece6; }
.table-striped > tbody > tr:nth-of-type(odd) { background:#fbfcfa; }
.table-responsive { border:1px solid var(--mac-line); border-radius:12px; margin-bottom:20px; }

/* Image and content behavior. */
figure { margin:0 0 20px; }
figure img, .img-thumbnail { border-radius:10px; }
.mac-cms-content, .entry-content, .post-content { overflow-wrap:anywhere; }
.mac-cms-content table { display:block; max-width:100%; overflow-x:auto; }
.breadcrumb-area { margin-bottom:0; }
.alert { border-radius:10px; padding:13px 16px; }
.pagination { display:flex; flex-wrap:wrap; gap:5px; }
.pagination > li > a, .pagination > li > span { border-radius:7px!important; margin:0 1px; }

/* Authenticated member workspace: one consistent content grid and spacing system. */
.mac-member-layout { gap:clamp(16px,2vw,26px); padding:clamp(82px,8vw,104px) clamp(14px,2.4vw,30px) 44px; background:var(--mac-page); }
.mac-member-sidebar { border-color:#e0e8e0; border-radius:15px; box-shadow:0 6px 22px rgba(25,65,38,.055); }
.mac-member-content { min-width:0; }
.mac-member-content > * { max-width:100%; }
.mac-member-content > .default-padding { padding:8px 0 32px!important; }
.mac-member-content > .default-padding > .container { max-width:none; padding-left:0; padding-right:0; }
.mac-member-content .mac-page-heading, .mac-member-content .marketplace-heading { display:flex; flex-wrap:wrap; justify-content:space-between; align-items:center; gap:12px 18px; margin:0 0 22px; padding:0 0 16px; border-bottom:1px solid var(--mac-line); }
.mac-member-content .mac-page-heading h1, .mac-member-content .mac-page-heading h2, .mac-member-content .marketplace-heading h1, .mac-member-content .marketplace-heading h2 { margin:0; color:var(--mac-green-900); font-weight:750; line-height:1.25; }
.mac-member-content .mac-account-page, .mac-member-content .mac-marketplace-page { min-width:0; }
.mac-member-content .card, .mac-member-content .panel, .mac-member-content .mac-account-card { background:#fff; border:1px solid var(--mac-line); border-radius:13px; box-shadow:0 4px 18px rgba(25,65,38,.045); }
.mac-member-content .card + .card, .mac-member-content .panel + .panel { margin-top:18px; }
.mac-member-content .row { row-gap:16px; }
.mac-member-content .form-group { margin-bottom:17px; }
.mac-member-content .table-responsive { margin-top:12px; }
.mac-member-content .empty-state, .mac-member-content .mac-empty-state { padding:clamp(24px,4vw,42px) 18px; text-align:center; background:#fff; border:1px dashed #d5e3d6; border-radius:13px; color:var(--mac-muted); }

/* Product grids use consistent card spacing without changing image dimensions defined per page. */
.row:has(> [class*="col-"]) { --mac-row-gap:18px; }
.mac-member-content .row:has(> [class*="col-"]) { row-gap:var(--mac-row-gap); }
.mac-member-content .marketplace-product-card, .mac-member-content .product-card { height:100%; border:1px solid var(--mac-line); border-radius:13px; overflow:hidden; background:#fff; box-shadow:0 4px 18px rgba(25,65,38,.045); }

@media (min-width:1200px) {
  .mac-member-layout { max-width:1600px; margin-left:auto; margin-right:auto; }
}
@media (max-width:991px) {
  .container { padding-left:16px; padding-right:16px; }
  section.default-padding, .default-padding { padding-top:36px; padding-bottom:36px; }
  .mac-member-layout { padding-top:88px; }
}
@media (max-width:767px) {
  .container, .container-full { padding-left:13px; padding-right:13px; }
  section.default-padding, .default-padding { padding-top:30px; padding-bottom:30px; }
  .section-heading, .mac-section-heading, .site-heading { margin-bottom:22px; }
  .mac-member-layout { padding:82px 12px 28px; gap:14px; }
  .mac-member-content > .default-padding { padding-top:4px!important; padding-bottom:24px!important; }
  .mac-member-content .mac-page-heading, .mac-member-content .marketplace-heading { align-items:flex-start; margin-bottom:17px; padding-bottom:13px; }
  .mac-member-content .table-responsive { border-radius:9px; }
  .table > thead > tr > th, .table > tbody > tr > td, .table > tfoot > tr > td { padding:10px 11px; }
  .btn { white-space:normal; }
}
@media (max-width:480px) {
  section.default-padding, .default-padding { padding-top:25px; padding-bottom:25px; }
  .mac-member-layout { padding-left:10px; padding-right:10px; }
  .mac-member-content .mac-page-heading h1, .mac-member-content .marketplace-heading h1 { font-size:23px; }
  .mac-member-content .card-body, .mac-member-content .panel-body { padding:15px; }
}
@media (prefers-reduced-motion:reduce) {
  html { scroll-behavior:auto; }
  *, *::before, *::after { transition-duration:.01ms!important; animation-duration:.01ms!important; }
}
