#productList {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1.5rem;
    padding: 1.5rem 2rem;
}

.product-card {
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    width: 100%;
    max-width: 240px;
    margin: 0 auto;
    flex-direction: column;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.12);
}

.product-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-bottom: 1px solid #eee;
}

.product-card h3 {
    margin: 0.8rem 1rem 0.4rem;
    font-size: 1rem;
    color: #333;
    font-weight: 600;
}

.product-card .description {
    margin: 0 1rem 0.5rem;
    font-size: 0.85rem;
    color: #666;
    height: 40px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.product-card .seller,
.product-card .product-price,
.product-card .product-stock {
    margin: 0 1rem 0.3rem;
    font-size: 0.85rem;
    color: #555;
}

.product-card .product-price {
    color: #34a1eb;
    font-weight: bold;
}

.product-card .total-price {
    margin: 0.3rem 1rem;
    font-weight: bold;
    font-size: 0.9rem;
    text-align: left;
}

.product-card .cart-toggle-btn {
    margin: 0.8rem 1rem 1rem;
    background-color: #2ecc71;
    color: white;
    padding: 0.5rem;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: background-color 0.3s ease;
}

.cart-total-bar {
    text-align: right;
    margin-top: 15px;
    font-size: 18px;
}

.product-card .cart-toggle-btn:hover {
    background-color: #27ae60;
}

.modal-backdrop {
    position: absolute;
    width: 100%;
    height: 100%;
    z-index: 1;
}

#floating-cart-button {
  position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 1000;
}

.floating-cart-modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 9999;
    justify-content: center;
    align-items: center;
}

.floating-cart-content {
    background: #fff;
    border-radius: 14px;
    padding: 24px;
    width: 100%;
    max-width: 500px;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.25);
    display: flex;
    flex-direction: column;
    gap: 20px;
}


.floating-cart-content {
    position: relative;
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    z-index: 2;
    overflow: hidden;
}

.modal-close-btn {
    position: absolute;
    top: 12px;
    right: 16px;
    font-size: 22px;
    background: none;
    border: none;
    cursor: pointer;
}

#goToCartBtn {
    background-color: #4CAF50;
    color: white;
    border: none;
    border-radius: 50%;
    padding: 16px;
    width: 60px;
    height: 60px;
    font-size: 20px;
    cursor: pointer;
    box-shadow: 0 0 10px rgba(0,0,0,0.2);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s ease;
}

#goToCartBtn:hover {
    background-color: #388e3c;
}

.quantity-controls {
    display: inline-flex;
    align-items: center;
    background: #f3f3f3;
    border-radius: 6px;
    overflow: hidden;
}

.quantity-controls button {
    background: #4CAF50;
    color: white;
    border: none;
    padding: 6px 12px;
    font-size: 16px;
    cursor: pointer;
}

.quantity-controls span {
    padding: 0 14px;
    font-size: 15px;
}

.cart-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 1.1rem;
    padding-top: 12px;
    border-top: 1px solid #ddd;
}

#cart-quantity-badge {
    position: absolute;
    top: 6px;
    right: 6px;
    background-color: red;
    color: white;
    border-radius: 50%;
    padding: 2px 6px;
    font-size: 12px;
}

.cart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cart-header h2 {
    font-size: 1.5rem;
    font-weight: bold;
}

.close-cart-btn {
    background: none;
    border: none;
    font-size: 1.8rem;
    cursor: pointer;
}

.cart-items-container .cart-item {
    display: flex;
    gap: 15px;
    border-bottom: 1px solid #eee;
    padding: 12px 0;
    align-items: center;
}

.cart-items-scrollable {
    padding: 1rem;
    overflow-y: auto;
    flex-grow: 1;
    max-height: 300px;
}

.cart-item-details {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.cart-item-details p {
    margin: 3px 0;
}

.cart-item {
    display: flex;
    gap: 10px;
    padding: 10px 0;
    border-bottom: 1px solid #e0e0e0;
    align-items: center;
}

.floating-cart-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
}

.cart-item img {
    width: 70px;
    height: 70px;
    object-fit: cover;
    border-radius: 6px;
    border: 1px solid #ccc;
}


.product-add-btn {
    background-color: #4CAF50;
    color: white;
    border: none;
    padding: 8px 14px;
    margin-top: 10px;
    cursor: pointer;
    font-size: 14px;
    border-radius: 6px;
    transition: background-color 0.2s ease-in-out;
}

.product-add-btn:hover {
    background-color: #45a049;
}

.checkout-btn {
    background-color: #4CAF50;
    color: white;
    border: none;
    padding: 12px;
    font-size: 1rem;
    width: 50%;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.checkout-btn:hover {
    background-color: #0069d9;
}

.cart-product-box {
    display: flex;
    gap: 16px;
    align-items: flex-start;
    border: 1px solid #ddd;
    padding: 16px;
    border-radius: 12px;
    width: 100%;
    box-sizing: border-box;
    margin-bottom: 16px;
    background-color: #fafafa;
    transition: background-color 0.3s ease;
}

.cart-product-box:hover {
    background-color: #94e84a;
}

.cart-product-box:hover .quantity-controls button {
    background-color: #f542e6;
}

.cart-product-box img {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: 10px;
    border: 1px solid #ccc;
}

.cart-product-details {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.cart-product-details p {
    margin: 0;
    font-size: 0.95rem;
}

.cart-qty-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 6px;
}

.product-title-row {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 5px;
    gap: 10px;
}

.product-title-row p {
    margin: 0;
    font-weight: bold;
    flex-grow: 1;
    word-break: break-word;
}

.remove-btn {
    background: transparent;
    color: #e74c3c;
    font-size: 20px;
    border: none;
    cursor: pointer;
    padding: 0 6px;
    line-height: 1;
}

.remove-btn:hover {
    color: #c0392b;
}

.cart-item.fade-out {
  opacity: 0;
  transition: opacity 0.3s ease;
}

/*/BUTONES/*/
.animated-pay-btn {
  position: relative;
  padding: 12px 25px;
  font-size: 16px;
  color: #fff;
  background-color: #28a745;
  border: none;
  border-radius: 30px;
  cursor: pointer;
  overflow: hidden;
  transition: background-color 0.3s ease;
}

.animated-pay-btn.loading {
  background-color: #e32727;
  pointer-events: none;
}

.animated-pay-btn.success {
  background-color: #1e7e34;
}

.animated-pay-btn .progress {
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  width: 0%;
  background-color: rgba(255, 255, 255, 0.3);
  transition: width 2s linear;
  z-index: 0;
  border-radius: 30px;
}

.animated-pay-btn span {
  position: relative;
  z-index: 1;
}

.product-image-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 160px;
    overflow: hidden;
    background-color: #fff;
    padding: 8px;
}

.product-image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

@media (max-width: 768px) {
    .about-content {
        flex-direction: column;
        text-align: center;
    }

    .about-logo {
        margin: 0 auto 20px;
    }

    .about-text {
        text-align: center;
    }
}

