.tcd-wrapper { display: flex; background-color: #181715; color: #ffffff; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; min-height: 100vh; width: 100%; box-sizing: border-box; }
.tcd-wrapper * { box-sizing: border-box; }
.tcd-main { flex: 1; padding: 24px 32px; max-width: calc(100% - 360px); }
.tcd-search-bar { position: relative; margin-bottom: 20px; }
.tcd-search-icon { position: absolute; left: 18px; top: 50%; transform: translateY(-50%); pointer-events: none; }
#tcd-search-input { width: 100%; background-color: #21201e; border: 1px solid #4a4845; border-radius: 30px; padding: 13px 20px 13px 48px; color: #ffffff; font-size: 15px; outline: none; transition: border-color 0.2s; }
#tcd-search-input:focus { border-color: #f36f21; }
.tcd-cat-nav-wrapper { position: sticky; top: 0; z-index: 30; background-color: #181715; padding: 12px 0; margin-bottom: 16px; }
.tcd-cat-nav { display: flex; gap: 10px; overflow-x: auto; scrollbar-width: none; }
.tcd-cat-nav::-webkit-scrollbar { display: none; }
.tcd-cat-pill { display: inline-block; padding: 8px 16px; border-radius: 20px; font-size: 12px; font-weight: 800; letter-spacing: 0.5px; text-decoration: none !important; color: #ffffff !important; background-color: transparent; white-space: nowrap; transition: all 0.2s ease; }
.tcd-cat-pill:hover { background-color: #2b2927; }
.tcd-cat-pill.active { background-color: #ffffff; color: #181715 !important; }
.tcd-category-section { margin-bottom: 36px; scroll-margin-top: 70px; }
.tcd-category-title { font-size: 20px; font-weight: 800; color: #ffffff; margin: 0 0 16px 0; letter-spacing: 0.4px; }
.tcd-products-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }

/* Tarjeta horizontal estilo Just Eat */
.tcd-card { background-color: #232220; border: 1px solid #33312e; border-radius: 14px; padding: 16px 18px; display: flex; justify-content: space-between; align-items: stretch; gap: 14px; transition: border-color 0.2s; }
.tcd-card:hover { border-color: #524f4b; }
.tcd-card-info { flex: 1; display: flex; flex-direction: column; justify-content: space-between; }
.tcd-card-header { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.tcd-card-title { font-size: 15px; font-weight: 800; color: #ffffff; margin: 0; line-height: 1.25; }
.tcd-info-badge { display: inline-flex; align-items: center; justify-content: center; width: 17px; height: 17px; border-radius: 50%; border: 1.5px solid #cfcdc9; color: #cfcdc9; font-size: 11px; font-weight: 700; cursor: help; flex-shrink: 0; }
.tcd-card-price { font-size: 15px; font-weight: 700; color: #f36f21; margin-bottom: 6px; }
.tcd-card-desc { font-size: 13px; color: #b5b2ad; margin: 0 0 8px 0; line-height: 1.35; }

/* Botón Cambiar opciones (Variaciones / BDP Connector) */
.tcd-options-wrap { margin-top: auto; padding-top: 4px; }
.tcd-options-link-btn { display: inline-flex; align-items: center; justify-content: center; height: 30px; padding: 0 14px; border-radius: 20px; background-color: #2c2a28; border: 1px solid #f36f21; color: #f36f21 !important; font-size: 12px; font-weight: 700; text-decoration: none !important; transition: all 0.2s ease; }
.tcd-options-link-btn:hover { background-color: #f36f21; color: #ffffff !important; }
.tcd-out-of-stock { font-size: 12px; color: #8c8984; font-weight: 600; }

/* Columna derecha de la tarjeta: Controles flotantes ENCIMA de la foto */
.tcd-card-media-col { position: relative; width: 116px; flex-shrink: 0; display: flex; flex-direction: column; align-items: flex-end; justify-content: flex-end; padding-top: 14px; }

.tcd-floating-controls { position: absolute; top: -4px; right: -4px; z-index: 10; display: flex; align-items: center; gap: 5px; background-color: rgba(24, 23, 21, 0.92); backdrop-filter: blur(4px); padding: 3px; border-radius: 24px; border: 1px solid #45423e; box-shadow: 0 4px 10px rgba(0, 0, 0, 0.45); }

.tcd-card-qty-selector { display: inline-flex; align-items: center; height: 28px; padding: 0 2px; }
.tcd-card-qty-btn { background: none; border: none; color: #ffffff; font-size: 15px; font-weight: 700; width: 22px; height: 22px; display: flex; align-items: center; justify-content: center; cursor: pointer; border-radius: 50%; transition: background-color 0.15s, color 0.15s; padding: 0; }
.tcd-card-qty-btn:hover { background-color: #2c2a28; color: #f36f21; }
.tcd-card-qty-input { width: 22px; background: transparent !important; border: none !important; color: #ffffff !important; text-align: center; font-size: 12px; font-weight: 700; padding: 0 !important; margin: 0 !important; -moz-appearance: textfield; pointer-events: none; }
.tcd-card-qty-input::-webkit-outer-spin-button,
.tcd-card-qty-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

/* Botón circular del carrito encima de la foto */
.tcd-add-cart-btn { width: 32px; height: 32px; border-radius: 50%; background-color: #f36f21; border: none; color: #ffffff !important; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; padding: 0; transition: background-color 0.2s, transform 0.15s; flex-shrink: 0; text-decoration: none !important; }
.tcd-add-cart-btn:hover { background-color: #d95d14; transform: scale(1.08); }
.tcd-add-cart-btn.added { background-color: #28a745; }

/* Contenedor de imagen del producto */
.tcd-card-image { width: 108px; height: 88px; background-color: #ffffff; border-radius: 10px; overflow: hidden; display: flex; align-items: center; justify-content: center; }
.tcd-card-image img { width: 100% !important; height: 100% !important; object-fit: cover; display: block; }

/* Cesta lateral fija */
.tcd-sidebar { width: 360px; background-color: #232220; border-left: 1px solid #33312e; flex-shrink: 0; }
.tcd-cart-box { position: sticky; top: 0; padding: 24px 20px; height: 100vh; display: flex; flex-direction: column; }
.tcd-cart-heading { text-align: center; font-size: 20px; font-weight: 800; color: #ffffff; margin: 0 0 20px 0; }
.tcd-delivery-toggle { display: flex; background-color: #32302d; border-radius: 30px; padding: 4px; margin-bottom: 24px; }
.tcd-toggle-btn { flex: 1; background: transparent; border: none; border-radius: 26px; padding: 8px 10px; color: #b5b2ad; cursor: pointer; display: flex; flex-direction: column; align-items: center; transition: background-color 0.2s, color 0.2s; }
.tcd-toggle-btn.active { background-color: #4a4743; color: #ffffff; }
.tcd-toggle-title { font-size: 13px; font-weight: 700; }
.tcd-toggle-sub { font-size: 11px; opacity: 0.8; }
#tcd-mini-cart-content { flex: 1; display: flex; flex-direction: column; overflow-y: auto; }
.tcd-empty-cart { margin: auto; text-align: center; padding: 40px 10px; }
.tcd-empty-icon { margin-bottom: 14px; }
.tcd-empty-cart h3 { font-size: 20px; font-weight: 800; color: #ffffff; margin: 0 0 6px 0; }
.tcd-empty-cart p { font-size: 14px; color: #b5b2ad; margin: 0; }
.tcd-cart-items { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 12px; }
.tcd-cart-item { display: flex; justify-content: space-between; align-items: center; background-color: #2b2927; padding: 12px; border-radius: 10px; gap: 10px; }
.tcd-cart-item-info { display: flex; flex-direction: column; gap: 4px; }
.tcd-cart-item-name { font-size: 13px; font-weight: 700; color: #ffffff; }
.tcd-cart-item-price { font-size: 13px; color: #f36f21; font-weight: 600; }
.tcd-cart-qty-controls { display: flex; align-items: center; gap: 8px; background-color: #181715; padding: 4px 8px; border-radius: 20px; }
.tcd-qty-btn { background: none; border: none; color: #f36f21; font-size: 16px; font-weight: 800; cursor: pointer; padding: 0 4px; }
.tcd-qty-val { font-size: 13px; font-weight: 700; min-width: 16px; text-align: center; }
.tcd-cart-footer { border-top: 1px solid #383633; padding-top: 16px; margin-top: 16px; }
.tcd-cart-total-row { display: flex; justify-content: space-between; font-size: 16px; margin-bottom: 14px; }
.tcd-checkout-btn { display: block; width: 100%; background-color: #f36f21; color: #ffffff !important; text-align: center; font-weight: 800; font-size: 15px; padding: 14px; border-radius: 30px; text-decoration: none !important; transition: background-color 0.2s; }
.tcd-checkout-btn:hover { background-color: #d95d14; }

@media (max-width: 1024px) {
    .tcd-wrapper { flex-direction: column; }
    .tcd-main { max-width: 100%; padding: 16px; }
    .tcd-products-grid { grid-template-columns: 1fr; }
    .tcd-sidebar { width: 100%; border-left: none; border-top: 1px solid #33312e; }
    .tcd-cart-box { position: static; height: auto; }
}
