/* =========================
   HAPPY PENS CORE — FAVOURITES
========================= */

.hpc-favourite-button,
.hpc-favourite-login{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:10px;

  height:34px;
  min-height:34px;
  max-height:34px;

  padding:0 14px;
  margin:0;

  background:transparent;
  border:1.5px solid #B08A52;
  border-radius:4px;

  color:#B08A52;

  font-family:DM Sans,sans-serif;
  font-size:15px;
  font-weight:600;
  line-height:1;
  letter-spacing:.04em;
  text-transform:uppercase;
  text-decoration:none;

  cursor:pointer;
  white-space:nowrap;
}

.hpc-favourite-button::before{
  content:"♡";
  font-size:22px;
  line-height:1;
}

.hpc-favourite-button.active::before{
  content:"❤";
  color:#B23A48;
  font-size:22px;
}

.hpc-favourite-button:hover,
.hpc-favourite-login:hover{
  background:#B08A52;
  border-color:#B08A52;
  color:#FDFBF8;
}

.hpc-favourite-button:hover::before{
  color:#FDFBF8;
}

/* =========================
   HPC RECENT FAVOURITES
========================= */

.hpc-cabinet-mini-grid{
  display:grid;
  grid-template-columns:repeat(4, 1fr);
  gap:12px;
}

.hpc-cabinet-mini-card{
  display:block;
  text-decoration:none !important;
  color:#171411;
}

.hpc-cabinet-mini-card img{
  width:100%;
  aspect-ratio:4/3;
  object-fit:cover;
  border-radius:6px;
  margin-bottom:8px;
  display:block;
  background:#F5F2EE;
}

.hpc-cabinet-mini-card span{
  display:block;
  font-size:13px;
  line-height:1.25;
}

.hpc-cabinet-mini-card:hover span{
  color:#B08A52;
}

.hpc-cabinet-empty{
  padding:18px;
  border:1px dotted #B08A52;
  color:#5E5A55;
  font-size:14px;
}

@media(max-width:700px){
  .hpc-cabinet-mini-grid{
    grid-template-columns:repeat(2, 1fr);
  }
}

/* =========================
   HPC MOST LOVED PENS
========================= */

.hpc-mlp-page{
  background:transparent;
  padding:0;
}

/* Big first card */

.hpc-mlp-top-one{
  width:100%;
  margin:0 0 24px;

  display:grid;
  grid-template-columns:1.45fr 1fr;

  background:#fffaf3;
  border:1px solid rgba(169,120,40,.22);
  border-radius:12px;
  overflow:hidden;
  box-shadow:0 4px 14px rgba(0,0,0,.04);
}

.hpc-mlp-top-image{
  position:relative;
  display:block;
  aspect-ratio:16/9;
  overflow:hidden;
}

.hpc-mlp-top-image img{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
}

.hpc-mlp-top-info{
  padding:28px;
  display:flex;
  flex-direction:column;
}

.hpc-mlp-label{
  color:#9b6e21;
  text-transform:uppercase;
  letter-spacing:.11em;
  font-size:11px;
  margin-bottom:16px;
}

.hpc-mlp-top-info h2{
  margin:0 0 8px;
  color:#111;
  font-size:25px;
  line-height:1.18;
}

.hpc-mlp-top-info p{
  margin:0 0 auto;
  color:#62594c;
  font-size:13px;
  line-height:1.45;
}

.hpc-mlp-count{
  margin:22px 0 18px;
  color:#333;
  font-size:15px;
}

/* Grids */

.hpc-mlp-grid{
  width:100%;
  display:grid;
  gap:16px;
  align-items:stretch;
  margin:0 0 18px;
}

.hpc-mlp-grid-top{
  grid-template-columns:repeat(4, minmax(0, 1fr));
}

.hpc-mlp-grid-rest{
  grid-template-columns:repeat(5, minmax(0, 1fr));
}

/* Small cards */

.hpc-mlp-card{
  display:flex;
  flex-direction:column;
  height:100%;
  min-height:100%;

  background:#fffaf3;
  border:1px solid rgba(0,0,0,.05);
  border-radius:10px;
  overflow:hidden;
  box-shadow:0 3px 10px rgba(0,0,0,.035);
}

.hpc-mlp-card-image{
  position:relative;
  display:block;
  aspect-ratio:4/3;
  overflow:hidden;
  flex-shrink:0;
}

.hpc-mlp-card-image img{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
}

.hpc-mlp-card-body{
  display:flex;
  flex-direction:column;
  flex:1 1 auto;
  min-height:0;
  padding:14px 15px 16px;
}

.hpc-mlp-card-body h3{
  margin:0 0 7px;
  color:#111;
  font-size:16px;
  line-height:1.25;
}

.hpc-mlp-card-body h3 a{
  color:#111;
  text-decoration:none;
}

.hpc-mlp-card-body p{
  margin:0 0 14px;
  color:#62594c;
  font-size:13px;
  line-height:1.45;
}

.hpc-mlp-small-count{
  margin-top:auto;
  margin-bottom:10px;
  color:#333;
  font-size:13px;
}

.hpc-mlp-link{
  display:block;
  margin-top:0;
  padding-top:10px;

  border-top:1px solid rgba(169,120,40,.18);

  color:#9b6e21;
  text-transform:uppercase;
  letter-spacing:.07em;
  font-size:11px;
  font-weight:700;
  text-decoration:none;
}

/* Smaller rest rows */

.hpc-mlp-grid-rest .hpc-mlp-card-body{
  padding:12px 12px 14px;
}

.hpc-mlp-grid-rest .hpc-mlp-card-body h3{
  font-size:14px;
  line-height:1.22;
}

.hpc-mlp-grid-rest .hpc-mlp-card-body p{
  font-size:11px;
  line-height:1.4;
  margin-bottom:10px;
}

.hpc-mlp-grid-rest .hpc-mlp-small-count{
  font-size:11px;
}

.hpc-mlp-grid-rest .hpc-mlp-small-count strong{
  font-size:1.22em;
}

.hpc-mlp-grid-rest .hpc-mlp-link{
  font-size:10px;
}

/* Ribbons */

.hpc-mlp-ribbon,
.hpc-mlp-small-ribbon{
  position:absolute;
  top:0;
  left:0;
  z-index:2;

  display:flex;
  align-items:center;
  justify-content:center;

  background:linear-gradient(180deg,#c49a45,#9b6e21);
  color:#fff;

  font-family:Georgia,serif;
  text-align:center;

  border-radius:0 6px 6px 6px;
}

.hpc-mlp-ribbon{
  width:54px;
  height:54px;
  font-size:32px;
}

.hpc-mlp-small-ribbon{
  width:38px;
  height:38px;
  font-size:20px;
}

.hpc-mlp-grid-rest .hpc-mlp-small-ribbon{
  width:34px;
  height:34px;
  font-size:18px;
}

/* Heart / count */

.hpc-mlp-count strong,
.hpc-mlp-small-count strong{
  margin-right:8px;
  color:#111;
  font-size:1.35em;
}

.hpc-mlp-heart{
  display:inline-block;
  margin-right:8px;

  color:#b32828;
  font-family:Arial, Helvetica, sans-serif;
  font-size:1.55em;
  font-weight:900;
  line-height:.8;

  transform:scaleX(1.18);
  vertical-align:0;
}

.hpc-mlp-count span:last-child,
.hpc-mlp-small-count span:last-child{
  font-size:13px;
}

/* Locked / empty */

.hpc-mlp-locked{
  text-align:center;
  margin-top:24px;
}

.hpc-mlp-locked a{
  display:inline-block;
  padding:13px 34px;

  background:#111;
  color:#fff;

  border-radius:7px;
  text-decoration:none;
  text-transform:uppercase;
  letter-spacing:.07em;
  font-size:12px;
  font-weight:700;
}

.hpc-mlp-locked p{
  margin-top:12px;
  color:#6b5738;
  font-size:13px;
}

.hpc-mlp-empty{
  padding:22px;
  background:#fffaf3;
  border:1px solid rgba(169,120,40,.22);
  border-radius:10px;
  color:#62594c;
  text-align:center;
}

/* Responsive */

@media(max-width:1100px){
  .hpc-mlp-top-one{
    grid-template-columns:1fr;
  }

  .hpc-mlp-grid-top,
  .hpc-mlp-grid-rest{
    grid-template-columns:repeat(2, minmax(0, 1fr));
  }
}

@media(max-width:560px){
  .hpc-mlp-grid-top,
  .hpc-mlp-grid-rest{
    grid-template-columns:1fr;
  }

  .hpc-mlp-top-info{
    padding:22px;
  }
}

/* =========================
   HPC MY FAVOURITES GRID
========================= */

.hpc-fav-grid{
  display:grid;
  grid-template-columns:repeat(5, minmax(0, 1fr));
  gap:18px;
}

.hpc-fav-card{
  display:flex;
  flex-direction:column;
  height:100%;

  background:#FDFBF8;
  border:1px solid rgba(176,138,82,.28);
  border-radius:8px;
  overflow:hidden;

  transition:transform .2s ease, box-shadow .2s ease;
}

.hpc-fav-card:hover{
  transform:translateY(-2px);
  box-shadow:0 14px 28px rgba(0,0,0,.08);
}

.hpc-fav-image{
  display:block;
  aspect-ratio:16 / 9;
  overflow:hidden;
  background:#F3F0EB;
}

.hpc-fav-image img{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
}

.hpc-fav-body{
  display:flex;
  flex-direction:column;
  flex-grow:1;
  padding:12px 14px 14px;
}

.hpc-fav-body h3{
  margin:0 0 6px;
  font-size:15px;
  line-height:1.25;
}

.hpc-fav-body h3 a{
  color:#171411;
  text-decoration:none;
}

.hpc-fav-meta{
  display:flex;
  gap:6px;
  margin-bottom:10px;
  color:#9A713F;
  font-size:13px;
}

.hpc-fav-meta span + span:before{
  content:"•";
  margin-right:6px;
  color:#AFA49A;
}

.hpc-fav-note{
  width:100%;
  height:30px;
  margin-top:auto;
  margin-bottom:10px;
  padding:5px 8px;

  border:1px solid rgba(176,138,82,.35);
  border-radius:4px;

  background:#FAF8F5;
  color:#2A241F;

  font-size:13px;
}

.hpc-fav-note:focus{
  outline:none;
  border-color:#B08A52;
}

.hpc-fav-actions{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  margin-top:8px;
}

.hpc-fav-view,
.hpc-fav-remove{
  color:#8E6D36;
  font-size:13px;
  font-weight:600;
  text-decoration:none;
}

.hpc-fav-remove{
  color:#B3472E;
}

.hpc-fav-view:hover,
.hpc-fav-remove:hover{
  color:#171411;
}

.hpc-fav-empty{
  padding:28px;
  border:1px dotted #B08A52;
  background:#FDFBF8;
  text-align:center;
  color:#2A241F;
}

.hpc-fav-pagination{
  display:flex;
  justify-content:center;
  gap:8px;
  margin-top:34px;
}

.hpc-fav-pagination a,
.hpc-fav-pagination span{
  display:inline-flex;
  align-items:center;
  justify-content:center;

  min-width:36px;
  height:36px;

  border:1px solid #B08A52;
  color:#B08A52;
  text-decoration:none;

  font-size:14px;
}

.hpc-fav-pagination a:hover,
.hpc-fav-pagination .current{
  background:#B08A52;
  color:#FDFBF8;
}

@media(max-width:1200px){
  .hpc-fav-grid{
    grid-template-columns:repeat(4, minmax(0, 1fr));
  }
}

@media(max-width:900px){
  .hpc-fav-grid{
    grid-template-columns:repeat(3, minmax(0, 1fr));
  }
}

@media(max-width:700px){
  .hpc-fav-grid{
    grid-template-columns:repeat(2, minmax(0, 1fr));
  }
}

@media(max-width:480px){
  .hpc-fav-grid{
    grid-template-columns:1fr;
  }
}

.hpc-progress{
  margin-top:14px;
}

.hpc-progress-label{
  display:flex;
  align-items:baseline;
  justify-content:center;
  gap:4px;
  margin-bottom:10px;
  color:#171411;
  font-family:Arial,sans-serif;
  font-size:14px;
  font-weight:600;
}

.hpc-progress-label strong{
  font-family:"Libre Baskerville",serif;
  font-size:28px;
  line-height:1;
}

.hpc-progress-track{
  width:100%;
  max-width:220px;
  height:7px;
  margin:0 auto;
  background:rgba(176,138,82,.18);
  border-radius:999px;
  overflow:hidden;
}

.hpc-progress-fill{
  height:100%;
  background:#B08A52;
  border-radius:999px;
}

/* =========================
   HPC FAVOURITE LIMIT MESSAGE
========================= */

.hpc-favourite-limit-message{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:12px;

  padding:14px 16px;
  margin-top:24px;

  background:#FDFBF8;
  border:1px solid rgba(176,138,82,.28);
  border-radius:8px;

  color:#171411;
  font-size:14px;
}

.hpc-favourite-limit-message span{
  color:#5E5A55;
}

.hpc-favourite-limit-message a{
  display:inline-flex;
  align-items:center;
  justify-content:center;

  height:34px;
  min-height:34px;

  padding:0 14px;

  background:transparent;
  border:1.5px solid #B08A52;
  border-radius:4px;

  color:#B08A52;
  text-decoration:none !important;

  font-size:12px;
  font-weight:600;
  text-transform:uppercase;
  letter-spacing:.04em;

  transition:.2s ease;
}

.hpc-favourite-limit-message a:hover{
  background:#B08A52;
  border-color:#B08A52;
  color:#FDFBF8 !important;
}

/* =========================
   HPC FAVOURITE GROUPS
========================= */

.hpc-favourite-groups-tabs{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  margin:0 0 20px;
}

.hpc-favourite-group-tab-wrap{
  position:relative;
  display:flex;
  align-items:center;
  gap:6px;
}

.hpc-favourite-group-tab{
  display:flex;
  align-items:center;
  gap:8px;

  padding:8px 12px;

  background:#FDFBF8;
  border:1px solid rgba(176,138,82,.28);
  border-radius:6px;

  color:#171411;
  text-decoration:none !important;
  transition:.18s ease;
}

.hpc-favourite-group-tab:hover{
  border-color:#B08A52;
}

.hpc-favourite-group-tab.active{
  background:#B08A52;
  color:#FDFBF8;
}

.hpc-favourite-group-tab span{
  font-size:13px;
  font-weight:600;
}

.hpc-favourite-group-tab strong{
  font-size:12px;
}

.hpc-favourite-group-rename-open{
  width:28px;
  height:28px;

  background:transparent;
  border:1px solid rgba(176,138,82,.28);
  border-radius:4px;

  color:#8E6D36;
  cursor:pointer;
}

.hpc-favourite-group-rename-open:hover{
  border-color:#B08A52;
}

.hpc-favourite-group-rename{
  display:none;

  position:absolute;
  top:100%;
  left:0;
  z-index:20;

  margin-top:6px;
  padding:8px;

  background:#FDFBF8;
  border:1px solid rgba(176,138,82,.28);
  border-radius:6px;

  min-width:220px;

  box-shadow:0 8px 18px rgba(0,0,0,.08);
}

.hpc-favourite-group-tab-wrap.is-renaming .hpc-favourite-group-rename{
  display:flex;
  gap:6px;
}

.hpc-favourite-group-rename-input{
  flex:1;

  height:32px;
  padding:0 8px;

  background:#FAF8F5;
  border:1px solid rgba(176,138,82,.32);
  border-radius:4px;

  font-size:13px;
}

.hpc-favourite-group-rename-input:focus{
  outline:none;
  border-color:#B08A52;
}

.hpc-favourite-group-rename-save{
  height:32px;
  padding:0 10px;

  background:transparent;
  border:1px solid #B08A52;
  border-radius:4px;

  color:#B08A52;

  font-size:12px;
  font-weight:700;

  cursor:pointer;
}

.hpc-favourite-group-rename-save:hover{
  background:#B08A52;
  color:#FDFBF8;
}

/* Folder */

.hpc-favourite-group-checks{
  position:relative;
  margin:10px 0;
}

.hpc-favourite-group-toggle{
  width:100%;
  height:32px;

  background:#FAF8F5;
  border:1px solid rgba(176,138,82,.32);
  border-radius:4px;

  color:#8E6D36;
  font-size:13px;
  font-weight:600;

  cursor:pointer;
}

.hpc-favourite-group-toggle:hover{
  border-color:#B08A52;
}

.hpc-favourite-group-list{
  display:none;

  margin-top:8px;
  padding:8px;

  background:#FDFBF8;
  border:1px solid rgba(176,138,82,.24);
  border-radius:6px;
}

.hpc-favourite-group-checks.is-open .hpc-favourite-group-list{
  display:block;
}

.hpc-favourite-group-check{
  display:flex;
  align-items:center;
  gap:8px;

  padding:6px 4px;

  color:#5E5A55;
  font-size:13px;
}

.hpc-favourite-group-check input{
  accent-color:#B08A52;
}

/* =========================
   FAVOURITE GROUP RENAME BUTTON FIX
========================= */

.hpc-favourite-group-rename-save{
  min-width:64px;
  width:auto;
  white-space:nowrap;
  flex-shrink:0;
  line-height:1;
  text-align:center;
}

.hp-pen-actions .hpc-action-limit{
  display:flex;
  flex-direction:column;
  align-items:stretch;
  gap:6px;
  width:100%;
}

.hp-pen-actions .hpc-action-limit .hpc-favourite-button{
  width:100%;
}

.hp-pen-actions .hpc-action-button-disabled{
  cursor:not-allowed;
  opacity:.72;
  white-space:nowrap;
  pointer-events:none;
}

.hp-pen-actions .hpc-action-upgrade{
  display:block;
  width:100%;
  max-width:none;
  font-family:DM Sans,sans-serif;
  font-size:12px;
  font-weight:600;
  line-height:1.2;
  text-align:center;
  color:#8a6a3f;
  text-decoration:none;
}

.hp-pen-actions .hpc-action-upgrade:hover{
  color:#171411;
  text-decoration:underline;
  text-underline-offset:3px;
}

/* CPT Pen Hero: distinguish two identically styled limit notices. */
.hp-pen-actions .hpc-favourite-limit-inline .hpc-favourite-button::before{
  content:"♡";
  font-size:20px;
  line-height:1;
}
.hp-pen-actions .hpc-collection-limit-inline .hpc-collection-button::before{
  content:"▣";
  font-size:19px;
  line-height:1;
}
.hp-pen-actions .hpc-favourite-limit-inline .hpc-favourite-button,
.hp-pen-actions .hpc-collection-limit-inline .hpc-collection-button{
  gap:8px;
}