.tabs-products, .tabs-videos {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
    align-items: center;
      justify-content: center;

} 

.product-card {
    position: relative;
    width: 100%;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.product-item {
    position: relative;
    display: block;
    width: 100%;
    overflow: hidden;
    border-radius: 14px;
    text-decoration: none;
    background: #222;
}

/* Se houver apenas um item, ou o último item for ímpar */
.products-grid > .product-card:only-child,
.products-grid > .product-card:last-child:nth-child(odd) {
    grid-column: 1 / -1;
}


.product-item img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    display: block;
    transition: transform .3s ease;
}

.product-item:hover img {
    transform: scale(1.05);
}

.product-overlay {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 12px;
    background: linear-gradient(
        to top,
        rgba(0,0,0,.85) 0%,
        rgba(0,0,0,.55) 45%,
        rgba(0,0,0,0) 100%
    );
}

.product-name {
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.product-price {
    color: #fff;
    font-size: 13px;
    font-weight: 500;
}

/* Desktop */
@media (min-width: 768px) {
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .product-item img {
        height: 220px;
    }
}

.product-actions {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 20;
    display: flex;
    gap: 8px;
    background: #030303;
    padding: 8px;
    border-radius: 8px;
}

.btn-product-edit,
.btn-product-delete,
.btn-product-up,
.btn-product-down {
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 50%;
    cursor: pointer;

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

    background: #fff;
    box-shadow: 0 3px 10px rgba(0,0,0,.15);
}

.btn-product-edit:hover,
.btn-product-delete:hover,
.btn-product-up:hover,
.btn-product-down:hover {
    transform: scale(1.05);
}


.btn-video-delete {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 100;

    width: 34px;
    height: 34px;

    border: none;
    border-radius: 50%;

    background: rgba(0,0,0,.7);
    color: #fff;

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

    cursor: pointer;

    transition: .2s;
}

.btn-video-delete:hover {
    background: #e53935;
}

.products-modal, .products-modal-edit, .videos-modal, .categories-order-modal, .link-modal-edit, .new-link-modal, .category-link-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
}

.products-modal-overlay, .videos-modal-overlay, .categories-order-modal-overlay, .link-modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.774);
    backdrop-filter: blur(3px);
}

.products-modal-content,
.videos-modal-content,
.categories-order-content,
.link-modal-content{
    position: relative;
    z-index: 2;

    width: calc(100% - 30px);
    max-width: 500px;

    margin: 80px auto;

    padding: 24px;

    max-height: calc(90vh - 60px);
    overflow-y: auto;

    background: rgba(20,20,24,.96);

    border: 1px solid rgba(255,255,255,.08);
    border-radius: 24px 0 0 24px;

    box-shadow:
        0 20px 60px rgba(0,0,0,.55),
        inset 0 1px 0 rgba(255,255,255,.05);

    backdrop-filter: blur(20px);

    color: #fff;
}

.products-modal-header,
.videos-modal-header,
.categories-order-title,
.link-modal-header{
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.products-modal-header h3,
.videos-modal-header h3,
.categories-order-title h3,
.link-modal-header h3{
    margin: 0;
    font-size: 20px;
    font-weight: 700;
    color: #fff;
}

.btn-close-modal{
    width: 42px;
    height: 42px;

    border: 1px solid rgba(255,255,255,.08);
    border-radius: 50%;

    background: rgba(255,255,255,.05);
    color: #fff;

    cursor: pointer;

    transition: .25s;
}

.btn-close-modal:hover{
    background: rgba(255,255,255,.12);
    transform: rotate(90deg);
}

.products-modal-content label,
.videos-modal-content label,
.categories-order-content label,
.link-modal-content label{
    display: block;

    margin-top: 18px;
    margin-bottom: 8px;

    font-size: 14px;
    font-weight: 600;

    color: rgba(255,255,255,.8);
}

.products-modal-content input,
.videos-modal-content input,
.categories-order-content input,
.link-modal-content input{
    width: 100%;
    height: 50px;

    padding: 0 16px;
    box-sizing: border-box;

    border: 1px solid rgba(255,255,255,.08);
    border-radius: 14px;

    background: rgba(255,255,255,.04);

    color: #fff;
    font-size: 15px;

    transition: .2s;
}

.link-modal-content textarea{
    width: 100%;
    height: 50px;

    padding: 14px 16px;
    box-sizing: border-box;

    border: 1px solid rgba(255,255,255,.08);
    border-radius: 14px;

    background: rgba(255,255,255,.04);

    color: #fff;
    font-size: 15px;

    transition: .2s;
}

.link-modal-content textarea:focus{
    outline: none;

    border-color: #5b8cff;

    background: rgba(255,255,255,.06);

    box-shadow:
        0 0 0 4px rgba(91,140,255,.15);
}

.products-modal-content input::placeholder,
.videos-modal-content input::placeholder,
.categories-order-content input::placeholder,
.link-modal-content input::placeholder{
    color: rgba(255,255,255,.4);
}

.products-modal-content input:focus,
.videos-modal-content input:focus,
.categories-order-content input:focus,
.link-modal-content input:focus{
    outline: none;

    border-color: #5b8cff;

    background: rgba(255,255,255,.06);

    box-shadow:
        0 0 0 4px rgba(91,140,255,.15);
}

.products-modal-content input[type="file"],
.videos-modal-content input[type="file"],
.categories-order-content input[type="file"],
.link-modal-content input[type="file"]{
    height: auto;
    padding: 14px;
}

.btn-save-product, .btn-save-product-edit, .btn-save-video, .btn-save-order, .btn-save-link, .btn-add-category{
    width: 100%;
    height: 52px;

    margin-top: 24px;

    border: 0;
    border-radius: 16px;

    background: linear-gradient(
        135deg,
        #4f7cff,
        #6a5cff
    );

    color: #fff;
    font-size: 15px;
    font-weight: 700;

    cursor: pointer;

    transition: .25s;
}

.btn-save-product:hover,
.btn-save-product-edit:hover,
.btn-save-video:hover,
.btn-save-order:hover,
.btn-save-link:hover,
.btn-add-category:hover{
    transform: translateY(-2px);

    box-shadow:
        0 12px 30px rgba(79,124,255,.35);
}

.products-modal-content::-webkit-scrollbar,
.videos-modal-content::-webkit-scrollbar,
.categories-order-content::-webkit-scrollbar,
.link-modal-content::-webkit-scrollbar{
    width: 8px;
}

.products-modal-content::-webkit-scrollbar-track,
.videos-modal-content::-webkit-scrollbar-track,
.categories-order-content::-webkit-scrollbar-track,
.link-modal-content::-webkit-scrollbar-track{
    background: transparent;
}

.products-modal-content::-webkit-scrollbar-thumb,
.videos-modal-content::-webkit-scrollbar-thumb,
.categories-order-content::-webkit-scrollbar-thumb,
.link-modal-content::-webkit-scrollbar-thumb{
    background: rgba(255,255,255,.15);
    border-radius: 999px;
}
@media (max-width: 768px) {

    .products-modal-content, .videos-modal-content, .categories-order-content, .link-modal-content {
        position: fixed;

        top: 42%;
        left: 10px;
        right: 10px;

        transform: translateY(-50%);

        width: auto;
        max-height: 80vh;

        box-sizing: border-box;
    }

}


.product-image-preview {
    text-align: center;
}

.product-image-preview img {
    max-width: 100%;
    width: 180px;
    height: 120px;
    object-fit: cover;
    border-radius: 12px;
}


.video-type-options, .product-type-options {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
    margin-top: 0;
}

.video-type-label, .product-type-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    user-select: none;
}

.video-type-label input[type="radio"], .product-type-label input[type="radio"] {
    width: 14px;
    height: 14px;
    accent-color: #5d7df7; /* cor da bolinha */
    cursor: pointer;
}

.categories-order-title{
    text-align:center;
    font-size:18px;
    font-weight:700;

    margin-bottom:20px;
}

.category-item{
    display:flex;
    align-items:center;
    justify-content:space-between;

    padding:12px 14px;

    margin-bottom:12px;

    border-radius:14px;

    background:rgba(127,127,127,.08);
}

.category-buttons{
    display:flex;
    gap:8px;
}

.category-buttons button{
    width:32px;
    height:32px;

    border:none;
    border-radius:50%;

    cursor:pointer;
}


.videos-divider, .category-divider{
    width:max-content;
    margin:35px auto 25px;

    padding:10px 22px;

    border-radius:999px;

    background: rgba(0, 0, 0, 0.582);
    backdrop-filter:blur(12px);

    border:1px solid rgba(255,255,255,.12);

    font-size:15px;
    font-weight:700;
    letter-spacing:.8px;

    color:#fff;
}



.videos-section{
    margin-bottom: 40px;
}


.videos-grid{
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 24px;
}

.video-item{
    position: relative;
    flex: 0 0 auto;
}

/* Card base */
.video-card{
    position: relative;
    display: block;

    overflow: hidden;
    border-radius: 18px;
    background: #111;
}

.video-card iframe{
    width: 100%;
    height: 100%;
    border: 0;

    /* impede interação */
    pointer-events: none;
}

.video-click-layer{
    position: absolute;
    inset: 0;
    z-index: 10;
}

/* YouTube */
.video-item-youtube .video-card,
.video-card-youtube{
    width: min(100%, 720px);
    aspect-ratio: 16 / 9;
}

/* TikTok e Instagram */
.video-item-tiktok .video-card,
.video-item-instagram .video-card,
.video-card-tiktok,
.video-card-instagram{
    width: 180px;
    aspect-ratio: 9 / 16;
}

/* Mobile */
@media (max-width:768px){

    .videos-grid{
        gap: 16px;
    }

    .video-item-tiktok .video-card,
    .video-item-instagram .video-card,
    .video-card-tiktok,
    .video-card-instagram{
        width: 140px;
    }

}

.category-item{
    display: flex;
    justify-content: space-between;
    align-items: center;

    padding: 14px 18px;

    border-radius: 14px;

    background: rgba(255,255,255,.05);

    margin-bottom: 12px;
}

.category-name{
    font-weight: 600;
}

.category-buttons{
    display: flex;
    gap: 8px;
}

.btn-order-up,
.btn-order-down{
    width: 38px;
    height: 38px;

    border: 0;
    border-radius: 12px;

    cursor: pointer;
}


button.disabled {
    opacity: .3;
    pointer-events: none;
}



.category-help {
  margin-bottom: 16px;
}

.btn-category-help, .btn-category-help-edit, .btn-category-help-new {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid #d9dee8;
  background: #ffffff;
  color: #2f3645;
  border-radius: 8px;
  padding: 9px 12px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background .2s ease, border-color .2s ease, color .2s ease;
}

.btn-category-help:hover,
.btn-category-help-edit:hover,
.btn-category-help-new:hover {
  background: #f6f8fb;
  border-color: #c8d0dd;
}

.category-help-content,
.category-help-content-edit,
.category-help-content-new {
  margin-top: 12px;
  border: 1px solid #dfe5ee;
  background: #f8fafc;
  border-radius: 8px;
  padding: 14px 16px;
  color: #3f4654;
  font-size: 14px;
  line-height: 1.5;
}

.category-help-content p,
.category-help-content-edit p,
.category-help-content-new p {
  margin: 0 0 10px;
}

.category-help-content p:last-child,
.category-help-content-edit p:last-child,
.category-help-content-new p:last-child {
  margin-bottom: 0;
}

.category-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  list-style: none;
  padding: 0;
  margin: 0 0 16px;
}

.category-item-name {
  min-width: 0;
  color: #ffffff;
  font-size: 14px;
  font-weight: 700;
  word-break: break-word;
}

.category-item-actions {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.btn-category-action {
  width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  border: 1px solid #d9dee8;
  background: #f8fafc;
  color: #344054;
  border-radius: 8px;
  cursor: pointer;
  transition: background .2s ease, border-color .2s ease, color .2s ease, transform .15s ease;
}

.btn-category-action:hover:not(:disabled) {
  background: #eef4ff;
  border-color: #b7c8ff;
  color: #2454d6;
  transform: translateY(-1px);
}

.btn-category-action:disabled {
  opacity: .38;
  cursor: not-allowed;
}

.btn-category-remove{
    color: #ff0000;
}

.btn-category-remove:hover:not(:disabled) {
  background: #fff1f2;
  border-color: #fecdd3;
  color: #e11d48;
}


.category-add-row input:focus {
  border-color: #4f7cff;
  box-shadow: 0 0 0 3px rgba(79, 124, 255, .14);
}

.btn-add-category {
  height: 42px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 0;
  background: #2454d6;
  color: #ffffff;
  border-radius: 8px;
  padding: 0 14px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: background .2s ease, transform .15s ease;
}

.btn-add-category:hover {
  background: #1d43ad;
  transform: translateY(-1px);
}

@media (max-width: 520px) {
  .category-item {
    align-items: flex-start;
  }

  .category-add-row {
    flex-direction: column;
    align-items: stretch;
  }

  .btn-add-category {
    justify-content: center;
  }
}

.link-category-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 14px;
  color: #e8ecf3;
  font-size: 13px;
  font-weight: 700;
}

.link-category-field select {
  width: 100%;
  min-height: 44px;
  border: 1px solid rgba(148, 163, 184, .28);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(30, 41, 59, .96), rgba(15, 23, 42, .96));
  color: #f8fafc;
  padding: 0 42px 0 12px;
  font-size: 14px;
  font-weight: 600;
  outline: none;
  cursor: pointer;
  appearance: none;
  transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;

  background-image:
    linear-gradient(45deg, transparent 50%, #cbd5e1 50%),
    linear-gradient(135deg, #cbd5e1 50%, transparent 50%),
    linear-gradient(180deg, rgba(30, 41, 59, .96), rgba(15, 23, 42, .96));
  background-position:
    calc(100% - 20px) 19px,
    calc(100% - 14px) 19px,
    0 0;
  background-size:
    6px 6px,
    6px 6px,
    100% 100%;
  background-repeat: no-repeat;
}

.link-category-field select:hover {
  border-color: rgba(96, 165, 250, .65);
}

.link-category-field select:focus {
  border-color: #60a5fa;
  box-shadow: 0 0 0 3px rgba(96, 165, 250, .18);
}

.link-category-field select option {
  background: #0f172a;
  color: #f8fafc;
}