/* Container */
.mcm-search-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Page Adjustments */
body.mcm-search-page .entry-title,
body.mcm-search-page .page-title,
body.mcm-search-page h1.entry-title {
    display: none !important;
}

body.mcm-search-page .site-content,
body.mcm-search-page .entry-content,
body.mcm-search-page #content {
    padding-top: 10px !important;
    margin-top: 0 !important;
}

body.mcm-search-page .mcm-search-bar {
    margin-top: 20px;
}

/* Search Bar */
.mcm-search-bar {
    margin-bottom: 40px;
    text-align: center;
}

.mcm-search-bar input {
    width: 100%;
    max-width: 600px;
    padding: 15px 20px;
    font-size: 18px;
    border: 2px solid #e1e1e1;
    border-radius: 50px;
    outline: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.mcm-search-bar input:focus {
    border-color: #000;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.1);
}

/* Grid */
.mcm-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 30px;
}

/* Card Item */
.mcm-card-item {
    background: #fff;
    border-radius: 12px;
    padding: 15px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transition: transform 0.2s ease;
    display: flex;
    flex-direction: column;
}

.mcm-card-item:hover {
    transform: translateY(-5px);
}

/* Image */
.mcm-card-image {
    position: relative;
    padding-bottom: 140%;
    /* Aspect ratio de carta Magic */
    margin-bottom: 15px;
    border-radius: 8px;
    overflow: hidden;
    background: #f5f5f5;
}

.mcm-card-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity 0.3s ease;
}

/* Info */
.mcm-card-info {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.mcm-card-title {
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 15px 0;
    text-align: center;
    line-height: 1.4;
    color: #333;
    min-height: 44px;
    /* 2 linhas */
}

/* Selectors */
.mcm-card-selectors {
    margin-bottom: 15px;
}

.mcm-selector-group {
    margin-bottom: 10px;
}

.mcm-selector-group select {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    background-color: #fff;
    cursor: pointer;
}

.mcm-selector-group select:disabled {
    background-color: #f9f9f9;
    color: #999;
    cursor: not-allowed;
}

/* Price */
.mcm-card-price {
    text-align: center;
    font-size: 18px;
    font-weight: 700;
    color: #e53935;
    margin-bottom: 15px;
    min-height: 27px;
}

.mcm-card-price del {
    color: #999;
    font-size: 14px;
    margin-right: 5px;
}

/* Actions */
.mcm-card-actions {
    margin-top: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.mcm-quantity {
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #ddd;
    border-radius: 6px;
    overflow: hidden;
    width: 100px;
    margin: 0 auto;
}

.mcm-quantity button {
    background: #f5f5f5;
    border: none;
    width: 30px;
    height: 30px;
    cursor: pointer;
    font-weight: bold;
    color: #555;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mcm-quantity button:hover {
    background: #e0e0e0;
}

.mcm-quantity input {
    width: 40px;
    height: 30px;
    border: none;
    text-align: center;
    font-size: 14px;
    -moz-appearance: textfield;
}

.mcm-quantity input::-webkit-outer-spin-button,
.mcm-quantity input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.mcm-add-to-cart {
    width: 100%;
    padding: 12px;
    background: #ccc;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 13px;
    cursor: not-allowed;
    transition: background 0.3s ease;
}

.mcm-add-to-cart.active {
    background: #4caf50;
    /* Verde sucesso */
    cursor: pointer;
}

.mcm-add-to-cart.active:hover {
    background: #43a047;
}

.mcm-add-to-cart.loading {
    background: #4caf50 url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24"><path fill="%23fff" d="M12,4V2A10,10 0 0,0 2,12H4A8,8 0 0,1 12,4Z"><animateTransform attributeName="transform" type="rotate" from="0 12 12" to="360 12 12" dur="1s" repeatCount="indefinite"/></path></svg>') no-repeat center center;
    color: transparent;
    pointer-events: none;
}

/* Responsive */
@media (max-width: 600px) {
    .mcm-cards-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }

    .mcm-card-item {
        padding: 10px;
    }

    .mcm-card-title {
        font-size: 14px;
    }

    .mcm-card-price {
        font-size: 16px;
    }
}