/* ============================================
   Lightweight Gift Registry - Modern Card UI
   ============================================ */

/* --- Registry Container --- */
.lgr-registry-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

/* --- Yobazar Theme: force edit page management buttons visible --- */
body.lgr-edit-registry-page .lgr-editor-registry-products .meta-wrapper-2 {
    display: block !important;
}

body.lgr-edit-registry-page .lgr-editor-registry-products .product-group-button-meta {
    display: flex !important;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

body.lgr-edit-registry-page .lgr-product-card .product-wrapper {
    display: flex;
    flex-direction: column;
}

body.lgr-edit-registry-page .lgr-product-card .meta-wrapper-2 {
    margin-top: auto;
}

/* --- My Account Gift Registry UX (Yobazar-aligned) --- */
.woocommerce-account .woocommerce-MyAccount-content .lgr-myaccount-registry {
    padding: 0;
    max-width: none;
}

.woocommerce-account .woocommerce-MyAccount-content .lgr-account-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin: 0 0 14px;
}

.woocommerce-account .woocommerce-MyAccount-content .lgr-account-title {
    margin: 0;
    font-size: 24px;
}

.woocommerce-account .woocommerce-MyAccount-content .lgr-account-subtitle {
    margin: 6px 0 0;
    color: #666;
}

.woocommerce-account .woocommerce-MyAccount-content .lgr-account-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0 0 18px;
}

.woocommerce-account .woocommerce-MyAccount-content .lgr-stat-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border: 1px solid #e5e5e5;
    border-radius: 999px;
    background: #fff;
    font-size: 12px;
    color: #666;
}

.woocommerce-account .woocommerce-MyAccount-content .lgr-stat-pill strong {
    color: #111;
}

.woocommerce-account .woocommerce-MyAccount-content .lgr-panel-card {
    background: #fff;
    border: 1px solid #ececec;
    border-radius: 12px;
    padding: 18px;
}

.woocommerce-account .woocommerce-MyAccount-content .lgr-registry-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.woocommerce-account .woocommerce-MyAccount-content .lgr-registry-card {
    margin: 0;
}

.woocommerce-account .woocommerce-MyAccount-content .lgr-registry-header {
    margin-bottom: 10px;
    padding-bottom: 8px;
}

.woocommerce-account .woocommerce-MyAccount-content .lgr-registry-header h3 {
    margin: 0;
    font-size: 18px;
}

.woocommerce-account .woocommerce-MyAccount-content .lgr-registry-actions-inline {
    gap: 8px;
    margin: 10px 0 8px;
}

.woocommerce-account .woocommerce-MyAccount-content .lgr-registry-actions-inline .button {
    padding: 6px 12px;
}

.woocommerce-account .woocommerce-MyAccount-content .lgr-registry-stats {
    gap: 12px;
    margin-top: 0;
    font-size: 13px;
    color: #666;
}

.woocommerce-account .woocommerce-MyAccount-content .lgr-optional-fields {
    margin-bottom: 18px;
    border: 1px dashed #d9d9d9;
    border-radius: 10px;
    padding: 10px 12px;
}

.woocommerce-account .woocommerce-MyAccount-content .lgr-optional-fields > summary {
    cursor: pointer;
    font-weight: 600;
    margin-bottom: 10px;
}

.woocommerce-account .woocommerce-MyAccount-content .lgr-registry-status {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    margin-left: auto;
    margin-right: 10px;
}

.woocommerce-account .woocommerce-MyAccount-content .lgr-status-attiva {
    background: #eef6ff;
    color: #1d4f91;
}

.woocommerce-account .woocommerce-MyAccount-content .lgr-status-completata {
    background: #e8f9ef;
    color: #1f7a44;
}

.woocommerce-account .woocommerce-MyAccount-content .lgr-status-vuota {
    background: #f2f2f2;
    color: #666;
}

/* --- Yobazar Public Registry Layout --- */
body.lgr-public-registry-page .lgr-public-registry {
    width: 100%;
}

body.lgr-public-registry-page .lgr-public-header {
    text-align: center;
    margin-bottom: 30px;
}

body.lgr-public-registry-page .lgr-public-title {
    margin: 0 0 8px;
}

body.lgr-public-registry-page .lgr-public-subtitle {
    color: #666;
    margin-bottom: 14px;
}

body.lgr-public-registry-page .lgr-public-actions .button {
    margin: 0;
}

body.lgr-edit-registry-page ul.products.lgr-products-grid,
body.lgr-public-registry-page ul.products.lgr-public-products {
    list-style: none;
}

body.lgr-edit-registry-page .lgr-products-grid .product-wrapper,
body.lgr-public-registry-page .lgr-public-products .product-wrapper {
    height: 100%;
    display: flex;
    flex-direction: column;
}

body.lgr-public-registry-page .lgr-gift-note,
body.lgr-edit-registry-page .lgr-gift-note-textarea {
    width: 100%;
    min-height: 64px;
    border: 1px solid #d5d5d5;
    border-radius: 8px;
    padding: 8px;
    resize: vertical;
}

body.lgr-public-registry-page .lgr-empty-registry,
body.lgr-edit-registry-page .lgr-empty-registry {
    text-align: center;
    padding: 28px;
    background: #f8f8f8;
    border-radius: 8px;
}

/* --- Public Registry Theme Integration (No Sidebar) --- */
body.lgr-public-registry-page #secondary,
body.lgr-public-registry-page .widget-area,
body.lgr-public-registry-page .sidebar,
body.lgr-public-registry-page .site-sidebar,
body.lgr-public-registry-page .content-sidebar,
body.lgr-public-registry-page aside {
    display: none !important;
}

body.lgr-public-registry-page #primary,
body.lgr-public-registry-page .content-area,
body.lgr-public-registry-page .site-content,
body.lgr-public-registry-page .site-main,
body.lgr-public-registry-page .main-content,
body.lgr-public-registry-page .container,
body.lgr-public-registry-page .container-fluid,
body.lgr-edit-registry-page #primary,
body.lgr-edit-registry-page .content-area,
body.lgr-edit-registry-page .site-content,
body.lgr-edit-registry-page .site-main,
body.lgr-edit-registry-page .main-content,
body.lgr-edit-registry-page .container,
body.lgr-edit-registry-page .container-fluid {
    width: 100%;
    max-width: 100%;
}

body.lgr-public-registry-page .lgr-public-page-wrap,
body.lgr-edit-registry-page .lgr-public-page-wrap {
    max-width: 1400px;
    margin: 0 auto;
    padding-top: 130px !important;
}

body.lgr-edit-registry-page .lgr-public-page-wrap {
    max-width: 1560px;
}

body.lgr-all-registries-page .lgr-all-registries-wrap {
    padding-top: 130px !important;
}

/* --- Registry Header --- */
.lgr-registry-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid #e5e5e5;
}

.lgr-registry-actions-inline {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.lgr-registry-actions-inline .button {
    margin: 0;
}

.lgr-registry-stats {
    display: flex;
    gap: 16px;
    margin-top: 8px;
    font-size: 14px;
    color: #475569;
    font-weight: 600;
}

/* --- Standalone Edit Page Theme-Based Product Cards --- */
body.lgr-edit-registry-page ul.products.lgr-editor-products-grid {
    margin: 0;
}

body.lgr-edit-registry-page ul.products.lgr-editor-products-grid li.product.lgr-editor-item,
body.lgr-edit-registry-page ul.products.lgr-editor-products-grid section.product.lgr-editor-item {
    position: relative;
}

body.lgr-edit-registry-page ul.products.lgr-editor-products-grid li.product .lgr-progress-wrapper,
body.lgr-edit-registry-page ul.products.lgr-editor-products-grid section.product .lgr-progress-wrapper,
body.lgr-edit-registry-page ul.products.lgr-editor-products-grid li.product .lgr-card-actions,
body.lgr-edit-registry-page ul.products.lgr-editor-products-grid section.product .lgr-card-actions,
body.lgr-edit-registry-page ul.products.lgr-editor-products-grid li.product .lgr-gift-note-field,
body.lgr-edit-registry-page ul.products.lgr-editor-products-grid section.product .lgr-gift-note-field,
body.lgr-edit-registry-page ul.products.lgr-editor-products-grid li.product .lgr-remove-product,
body.lgr-edit-registry-page ul.products.lgr-editor-products-grid section.product .lgr-remove-product {
    margin-left: 12px;
    margin-right: 12px;
}

body.lgr-edit-registry-page ul.products.lgr-editor-products-grid li.product .lgr-remove-product,
body.lgr-edit-registry-page ul.products.lgr-editor-products-grid section.product .lgr-remove-product {
    margin-bottom: 14px;
}

.lgr-registry-header h3 {
    margin: 0;
    font-size: 24px;
    font-weight: 600;
    color: #1a1a1a;
}

/* --- Create Form --- */
.lgr-create-form {
    background: #fff;
    padding: 32px;
    border-radius: 16px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
    margin-bottom: 32px;
    max-width: 600px;
}

.lgr-create-form h3 {
    margin: 0 0 24px;
    font-size: 22px;
    font-weight: 600;
    color: #1a1a1a;
}

.lgr-create-form .form-row {
    margin-bottom: 20px;
}

.lgr-create-form label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: #333;
    font-size: 14px;
}

.lgr-create-form input[type="text"],
.lgr-create-form input[type="email"] {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid #e5e5e5;
    border-radius: 10px;
    font-size: 15px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.lgr-create-form input[type="text"]:focus,
.lgr-create-form input[type="email"]:focus {
    border-color: #2271b1;
    box-shadow: 0 0 0 4px rgba(34, 113, 177, 0.1);
    outline: none;
}

.lgr-create-form .form-row-row {
    display: flex;
    gap: 16px;
    margin-bottom: 20px;
}

.lgr-create-form .form-row-row .form-row {
    flex: 1;
}

.lgr-create-form .button.lgr-create-btn {
    width: 100%;
    padding: 16px 24px;
    background: linear-gradient(135deg, #2271b1 0%, #1a4d80 100%);
    color: #fff;
    font-size: 16px;
    font-weight: 600;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.lgr-create-form .button.lgr-create-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(34, 113, 177, 0.3);
}

.lgr-create-form .button.lgr-create-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

/* --- Catalog Search (Edit Page) --- */
.lgr-catalog-search {
    margin-bottom: 20px;
    padding: 18px;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}

.lgr-registry-container-edit {
    max-width: 1560px;
}

.lgr-registry-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 18px;
    flex-wrap: wrap;
}

.lgr-edit-layout {
    display: grid;
    grid-template-columns: 320px minmax(0, 1fr);
    gap: 22px;
    align-items: start;
}

.lgr-catalog-sidebar {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 14px;
    align-self: start;
}

.lgr-catalog-sidebar-inner h4 {
    margin-top: 0;
}

.lgr-orderby-label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 6px;
    color: #475569;
}

.lgr-catalog-orderby {
    width: 100%;
    margin-bottom: 10px;
    border: 1px solid #dbe3ec;
    border-radius: 8px;
    padding: 8px 10px;
    background: #fff;
}

.lgr-catalog-categories {
    list-style: none;
    margin: 12px 0 0;
    padding: 0;
    max-height: 55vh;
    overflow: auto;
}

.lgr-catalog-categories li {
    margin-bottom: 6px;
}

body.lgr-edit-registry-page .lgr-catalog-categories,
body.lgr-edit-registry-page .lgr-catalog-categories li {
    list-style: none !important;
    margin-left: 0;
    padding-left: 0;
}

body.lgr-edit-registry-page .lgr-catalog-categories li::marker,
body.lgr-edit-registry-page .lgr-catalog-categories li::before {
    content: none !important;
}

.lgr-category-filter {
    width: 100%;
    text-align: left;
    border: 1px solid #dbe3ec;
    border-radius: 8px;
    background: #fff;
    padding: 9px 10px;
    cursor: pointer;
}

body.lgr-edit-registry-page .lgr-catalog-categories .lgr-category-filter {
    color: #1f2937 !important;
    font-weight: 500;
    background: #ffffff !important;
    border-color: #dbe3ec !important;
}

body.lgr-edit-registry-page .lgr-catalog-categories .lgr-category-filter:hover {
    color: #111827 !important;
}

body.lgr-edit-registry-page .lgr-catalog-categories .lgr-category-filter.active {
    color: #1e3a8a !important;
    font-weight: 600;
    background: #eff6ff !important;
    border-color: #2271b1 !important;
}

body.lgr-edit-registry-page .lgr-catalog-categories .lgr-category-filter * {
    color: inherit;
}

/* Remove bullets from all registry product grids */
ul.products.lgr-products-grid,
ul.products.lgr-public-products {
    list-style: none !important;
    margin-left: 0;
    padding-left: 0;
}

ul.products.lgr-products-grid > section,
ul.products.lgr-products-grid > li,
ul.products.lgr-public-products > li {
    list-style: none !important;
}

ul.products.lgr-products-grid > section::marker,
ul.products.lgr-products-grid > li::marker,
ul.products.lgr-public-products > li::marker,
ul.products.lgr-products-grid > section::before,
ul.products.lgr-products-grid > li::before,
ul.products.lgr-public-products > li::before {
    content: none !important;
}

.lgr-category-filter.active {
    border-color: #2271b1;
    background: #eff6ff;
}

.lgr-catalog-mobile-toggle {
    display: none;
    width: 100%;
    margin-bottom: 10px;
}

.lgr-edit-main {
    min-width: 0;
}

.lgr-catalog-results {
    margin-bottom: 22px;
}

.lgr-catalog-search h4 {
    margin: 0 0 10px;
    font-size: 17px;
    color: #0f172a;
}

#lgr-catalog-search {
    width: 100%;
    max-width: 520px;
    padding: 12px 14px;
    border: 2px solid #dbe3ec;
    border-radius: 10px;
    font-size: 15px;
}

#lgr-catalog-search:focus {
    outline: none;
    border-color: #2271b1;
    box-shadow: 0 0 0 3px rgba(34, 113, 177, 0.14);
}

#lgr-catalog-results {
    margin-top: 12px;
}


.lgr-catalog-result-card {
    width: 100%;
    margin: 0;
}

.lgr-catalog-result-card .product-wrapper {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.lgr-catalog-result-card .thumbnail-wrapper img {
    width: 100%;
    height: auto;
    object-fit: cover;
}

.lgr-catalog-meta {
    min-width: 0;
}

.lgr-catalog-meta .heading-title {
    margin-bottom: 6px;
}

.lgr-catalog-price {
    display: block;
    margin-bottom: 8px;
}

.lgr-catalog-meta a {
    color: #0f172a;
    text-decoration: none;
}

.lgr-catalog-meta a:hover {
    text-decoration: underline;
}

.lgr-catalog-badge {
    display: inline-block;
    margin: 6px 0;
    padding: 3px 8px;
    border-radius: 999px;
    background: #e7f3ff;
    color: #1d4f91;
    font-size: 11px;
    font-weight: 600;
}

.lgr-catalog-stock {
    font-size: 12px;
    color: #64748b;
}

.lgr-catalog-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 10px;
}

.lgr-catalog-qty {
    width: 74px;
    padding: 8px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
}

.lgr-catalog-load-more-wrap {
    text-align: center;
    margin-top: 12px;
}

@media (max-width: 640px) {
    .woocommerce-account .woocommerce-MyAccount-content .lgr-account-hero {
        flex-direction: column;
        align-items: flex-start;
    }

    .woocommerce-account .woocommerce-MyAccount-content .lgr-account-stats {
        width: 100%;
    }

    .woocommerce-account .woocommerce-MyAccount-content .lgr-registry-list {
        grid-template-columns: 1fr;
    }

    .lgr-catalog-actions {
        justify-content: flex-end;
    }
}

/* --- Social Share Section --- */
.lgr-social-share {
    margin-bottom: 24px;
    padding: 20px;
    background: #f9fafb;
    border-radius: 12px;
}

.lgr-social-share h4 {
    margin: 0 0 16px;
    font-size: 14px;
    font-weight: 600;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.lgr-social-buttons {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.lgr-social-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    border-radius: 8px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.lgr-social-btn.facebook {
    background: #1877f2;
    color: #fff;
}

.lgr-social-btn.facebook:hover {
    background: #1666d9;
}

.lgr-social-btn.twitter {
    background: #1da1f2;
    color: #fff;
}

.lgr-social-btn.twitter:hover {
    background: #1588d6;
}

.lgr-social-btn.email {
    background: #333;
    color: #fff;
}

.lgr-social-btn.email:hover {
    background: #1a1a1a;
}

.lgr-copy-link {
    padding: 10px 18px;
    background: #e5e5e5;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    color: #333;
    transition: background 0.2s ease;
}

.lgr-copy-link:hover {
    background: #d5d5d5;
}

/* --- Product Cards Grid --- */
.lgr-registry-products {
    margin-top: 24px;
}

.lgr-registry-products > h4,
.lgr-registry-products > h5 {
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 20px;
    color: #1a1a1a;
}

/* --- Single Product Card (inherits Yobazar theme styling) --- */
.lgr-product-card {
    position: relative;
}

.lgr-product-card.lgr-completed {
    border-color: #22c55e;
    background: linear-gradient(135deg, #fff 0%, #f0fdf4 100%);
}

/* --- Card Image (uses Yobazar thumbnail-wrapper) --- */
.lgr-product-card .thumbnail-wrapper {
    overflow: hidden;
}

.lgr-product-card .thumbnail-wrapper img {
    width: 100%;
    height: auto;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.lgr-product-card:hover .thumbnail-wrapper img {
    transform: scale(1.05);
}

/* --- Completed Badge Overlay --- */
.lgr-completed-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: #22c55e;
    color: #fff;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 4px 12px rgba(34, 197, 94, 0.4);
}

.lgr-completed-badge::before {
    content: "✓";
    font-size: 14px;
}

/* --- Purchased Overlay --- */
.lgr-product-card.lgr-completed .thumbnail-wrapper {
    position: relative;
}

.lgr-purchased-overlay {
    position: absolute;
    inset: 0;
    background: rgba(59, 130, 246, 0.78);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 2;
    pointer-events: none;
}

.lgr-purchased-check {
    font-size: 42px;
    color: #fff;
    line-height: 1;
    margin-bottom: 6px;
}

.lgr-purchased-label {
    font-size: 14px;
    font-weight: 600;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* --- Stock Status Badge --- */
.lgr-stock-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 12px;
}

.lgr-stock-status.in-stock {
    background: #dcfce7;
    color: #16a34a;
}

.lgr-stock-status.in-stock::before {
    content: "●";
    font-size: 8px;
}

.lgr-stock-status.out-of-stock {
    background: #fee2e2;
    color: #dc2626;
}

.lgr-stock-status.out-of-stock::before {
    content: "●";
    font-size: 8px;
}

/* --- Product Info --- */
.lgr-product-title {
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 8px;
    line-height: 1.4;
}

.lgr-product-title a {
    color: #1a1a1a;
    text-decoration: none;
    transition: color 0.2s ease;
}

.lgr-product-title a:hover {
    color: #2271b1;
}

.lgr-product-price {
    font-size: 18px;
    font-weight: 700;
    color: #2271b1;
    margin-bottom: 16px;
}

/* --- Progress Bar --- */
.lgr-progress-wrapper {
    margin: 16px 0;
}

.lgr-progress-bar {
    height: 8px;
    background: #e5e5e5;
    border-radius: 4px;
    overflow: hidden;
}

.lgr-progress-fill {
    width: var(--lgr-progress, 0%);
    height: 100%;
    border-radius: 4px;
    background: linear-gradient(90deg, #2271b1 0%, #34d399 100%);
    transition: width 0.5s ease;
}

.lgr-progress-fill.low {
    background: linear-gradient(90deg, #fbbf24 0%, #f59e0b 100%);
}

.lgr-progress-fill.complete {
    background: linear-gradient(90deg, #22c55e 0%, #16a34a 100%);
}

.lgr-progress-text {
    font-size: 13px;
    color: #666;
    margin: 8px 0 0;
    text-align: center;
}

/* --- Card Actions --- */
.lgr-card-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 16px;
    flex-wrap: wrap;
}

.lgr-qty-wrapper {
    display: flex;
    align-items: center;
    background: #f5f5f5;
    border-radius: 8px;
    overflow: hidden;
}

.lgr-qty-btn {
    width: 36px;
    height: 36px;
    border: none;
    background: #e5e5e5;
    color: #333;
    font-size: 18px;
    cursor: pointer;
    transition: background 0.2s ease;
}

.lgr-qty-btn:hover {
    background: #d5d5d5;
}

.lgr-card-actions input[type="number"] {
    width: 50px;
    height: 36px;
    border: none;
    text-align: center;
    font-size: 14px;
    font-weight: 600;
    background: transparent;
    -moz-appearance: textfield;
}

.lgr-card-actions input[type="number"]::-webkit-outer-spin-button,
.lgr-card-actions input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.lgr-card-actions .button {
    flex: 1;
    padding: 12px 20px;
    background: #2271b1;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.lgr-card-actions .button:hover {
    background: #1a5a8a;
    transform: translateY(-1px);
}

.lgr-card-actions .button:disabled {
    background: #94a3b8;
    cursor: not-allowed;
}

/* --- Gift Note --- */
.lgr-gift-note-field {
    margin-top: 16px;
}

.lgr-gift-note-field label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #666;
    margin-bottom: 6px;
}

.lgr-gift-note-field textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #e5e5e5;
    border-radius: 8px;
    font-size: 14px;
    resize: vertical;
    min-height: 60px;
    transition: border-color 0.2s ease;
    font-family: inherit;
}

.lgr-gift-note-field textarea:focus {
    border-color: #2271b1;
    outline: none;
}

/* --- Remove Button --- */
.lgr-remove-product {
    display: block;
    width: 100%;
    margin-top: 12px;
    padding: 8px;
    background: transparent;
    border: none;
    color: #dc2626;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    text-align: center;
    opacity: 0.7;
    transition: opacity 0.2s ease;
}

.lgr-remove-product:hover {
    opacity: 1;
    text-decoration: underline;
}

/* --- Completed Message --- */
.lgr-completed-message {
    margin-top: 16px;
    padding: 16px;
    background: #dcfce7;
    color: #16a34a;
    border-radius: 8px;
    text-align: center;
    font-weight: 600;
    font-size: 14px;
}

/* --- Empty Registry --- */
.lgr-empty-registry {
    text-align: center;
    padding: 60px 20px;
    background: #f9fafb;
    border-radius: 16px;
    border: 2px dashed #e5e5e5;
}

.lgr-empty-registry p {
    margin: 8px 0;
    color: #666;
    font-size: 16px;
}

.lgr-empty-registry p:first-child {
    font-size: 18px;
    font-weight: 600;
    color: #333;
}

/* --- Bulk Actions --- */
.lgr-bulk-actions {
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid #e5e5e5;
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

.lgr-bulk-actions .button {
    padding: 14px 28px;
    font-size: 15px;
    font-weight: 600;
    border-radius: 10px;
}

.lgr-bulk-actions .button.lgr-bulk-add-to-cart {
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
    color: #fff;
    border: none;
}

.lgr-bulk-actions .button.lgr-bulk-add-to-cart:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(34, 197, 94, 0.3);
}

/* --- Login Required --- */
.lgr-login-required {
    text-align: center;
    padding: 60px 20px;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
}

.lgr-login-required p {
    font-size: 18px;
    color: #666;
}

/* --- Responsive Design --- */
@media (max-width: 768px) {
    .lgr-registry-actions-inline {
        width: 100%;
    }

    .lgr-registry-actions-inline .button {
        width: 100%;
        text-align: center;
    }

    .lgr-registry-stats {
        flex-direction: column;
        gap: 4px;
    }

    .lgr-edit-layout {
        grid-template-columns: 1fr;
    }

    body.lgr-edit-registry-page ul.products.lgr-editor-products-grid li.product {
        width: 100%;
        float: none;
    }

    .lgr-catalog-mobile-toggle {
        display: block;
    }

    .lgr-catalog-sidebar-inner {
        display: none;
    }

    .lgr-catalog-sidebar-inner.is-open {
        display: block;
    }

    .lgr-registry-toolbar .button {
        width: 100%;
    }

    .lgr-card-actions {
        flex-direction: column;
    }
    
    .lgr-card-actions .button {
        width: 100%;
    }
    
    .lgr-create-form .form-row-row {
        flex-direction: column;
        gap: 0;
    }
    
    .lgr-social-buttons {
        flex-direction: column;
    }
    
    .lgr-social-btn {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .lgr-registry-container {
        padding: 12px;
    }
}

/* --- Success/Error Messages --- */
.lgr-success-message {
    background: #dcfce7;
    color: #16a34a;
    padding: 14px 18px;
    border-radius: 10px;
    margin-bottom: 16px;
    font-weight: 500;
}

.lgr-error-message {
    background: #fee2e2;
    color: #dc2626;
    padding: 14px 18px;
    border-radius: 10px;
    margin-bottom: 16px;
    font-weight: 500;
}

/* --- Add to Registry Buttons (Shop Pages) --- */
.lgr-add-btn-wrapper {
    margin: 12px 0;
}

.lgr-add-to-registry {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    transition: all 0.2s ease;
    cursor: pointer;
    border: none;
    font-weight: 500;
    font-size: 14px;
    border-radius: 8px;
}

.lgr-btn-style-button {
    background: linear-gradient(135deg, #2271b1 0%, #1a4d80 100%);
    color: #fff;
    box-shadow: 0 2px 8px rgba(34, 113, 177, 0.3);
}

.lgr-btn-style-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(34, 113, 177, 0.4);
}

.lgr-btn-style-button:hover {
    background: linear-gradient(135deg, #1e5d96 0%, #153d66 100%);
}

.lgr-btn-style-button.added {
    background: #22c55e;
}

.lgr-btn-style-link {
    background: transparent;
    color: #2271b1;
    text-decoration: underline;
    padding: 8px 0;
}

.lgr-btn-style-link:hover {
    color: #1a4d80;
}

/* --- Modal for Variations --- */
.lgr-modal {
    display: none;
    position: fixed;
    z-index: 99999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow-y: auto;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.lgr-modal-content {
    background: #fff;
    margin: 5% auto;
    padding: 28px;
    border-radius: 16px;
    max-width: 420px;
    position: relative;
    box-shadow: 0 24px 48px rgba(0, 0, 0, 0.2);
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from { transform: translateY(20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.lgr-modal-close {
    position: absolute;
    right: 16px;
    top: 12px;
    font-size: 28px;
    cursor: pointer;
    color: #999;
    transition: color 0.2s ease;
    line-height: 1;
}

.lgr-modal-close:hover {
    color: #333;
}

.lgr-modal-content h3 {
    margin: 0 0 24px;
    font-size: 20px;
    font-weight: 600;
}

.lgr-variation-form select,
.lgr-variation-form input[type="number"] {
    width: 100%;
    padding: 12px 14px;
    border: 2px solid #e5e5e5;
    border-radius: 8px;
    margin-bottom: 16px;
    font-size: 14px;
    transition: border-color 0.2s ease;
}

.lgr-variation-form select:focus,
.lgr-variation-form input[type="number"]:focus {
    border-color: #2271b1;
    outline: none;
}

.lgr-variation-form .button.lgr-confirm-variation {
    width: 100%;
    padding: 14px;
    background: #2271b1;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
    transition: background 0.2s ease;
}

.lgr-variation-form .button.lgr-confirm-variation:hover {
    background: #1a5a8a;
}

/* ============================================
   MODERN VARIATION MODAL - Card Style
   ============================================ */
.lgr-variation-modal-modern .lgr-modal-content {
    max-width: 700px;
}

.lgr-variation-header {
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid #e5e5e5;
}

.lgr-variation-header h3 {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
    color: #1a1a1a;
}

.lgr-variation-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 12px;
    margin-bottom: 24px;
}

.lgr-variation-card {
    position: relative;
    padding: 16px 12px;
    border: 2px solid #e5e5e5;
    border-radius: 12px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    background: #fff;
}

.lgr-variation-card:hover {
    border-color: #2271b1;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.lgr-variation-card.selected {
    border-color: #2271b1;
    background: #f0f7ff;
}

.lgr-variation-card.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: #f5f5f5;
}

.lgr-variation-card.disabled:hover {
    border-color: #e5e5e5;
    transform: none;
    box-shadow: none;
}

.lgr-variation-card .variation-name {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    margin-bottom: 4px;
}

.lgr-variation-card .variation-price {
    font-size: 13px;
    color: #2271b1;
    font-weight: 600;
    margin-bottom: 8px;
}

.lgr-variation-card .variation-stock {
    font-size: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

.lgr-variation-card .variation-stock.in-stock {
    color: #16a34a;
}

.lgr-variation-card .variation-stock.out-of-stock {
    color: #dc2626;
}

.lgr-variation-card .variation-check {
    display: none;
    position: absolute;
    top: 8px;
    right: 8px;
    width: 20px;
    height: 20px;
    background: #2271b1;
    color: #fff;
    border-radius: 50%;
    font-size: 12px;
    line-height: 20px;
    text-align: center;
}

.lgr-variation-card.selected .variation-check {
    display: block;
}

.lgr-variation-card .variation-image {
    width: 100%;
    height: 80px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 8px;
}

.lgr-variation-qty {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-bottom: 20px;
    padding: 16px;
    background: #f9fafb;
    border-radius: 10px;
}

.lgr-variation-qty label {
    font-weight: 600;
    color: #333;
}

.lgr-variation-qty .qty-controls {
    display: flex;
    align-items: center;
    gap: 8px;
}

.lgr-variation-qty .qty-btn {
    width: 36px;
    height: 36px;
    border: none;
    background: #e5e5e5;
    border-radius: 8px;
    font-size: 18px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.lgr-variation-qty .qty-btn:hover {
    background: #d5d5d5;
}

.lgr-variation-qty input {
    width: 60px;
    height: 36px;
    text-align: center;
    border: 2px solid #e5e5e5;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
}

.lgr-variation-actions {
    display: flex;
    gap: 12px;
}

.lgr-variation-actions .button {
    flex: 1;
    padding: 14px 20px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 14px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.lgr-variation-actions .lgr-confirm-variation {
    background: linear-gradient(135deg, #2271b1 0%, #1a4d80 100%);
    color: #fff;
    border: none;
}

.lgr-variation-actions .lgr-confirm-variation:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(34, 113, 177, 0.3);
}

.lgr-variation-actions .lgr-cancel-variation {
    background: #f5f5f5;
    color: #333;
    border: none;
}

.lgr-variation-actions .lgr-cancel-variation:hover {
    background: #e5e5e5;
}

/* Mobile responsive variation cards */
@media (max-width: 600px) {
    .lgr-variation-modal-modern .lgr-modal-content {
        margin: 10% auto;
        max-width: 95%;
    }
    
    .lgr-variation-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
    }
    
    .lgr-variation-card {
        padding: 12px 8px;
    }
    
    .lgr-variation-card .variation-image {
        height: 50px;
    }
    
    .lgr-variation-card .variation-name {
        font-size: 12px;
    }
}

/* ============================================
   THEME COMPATIBLE BUTTONS
   ============================================ */

/* Theme: Flatsome / UX Themes */
body.theme-flatsome .lgr-add-to-registry-btn.button,
body.ux-theme .lgr-add-to-registry-btn.button {
    padding: 8px 16px;
    font-size: 14px;
}

/* Theme: Avada */
body.theme-avada .lgr-add-to-registry-btn.fusion-button,
body.avada .lgr-add-to-registry-btn.fusion-button {
    padding: 10px 20px;
    font-size: 14px;
}

/* Theme: Divi */
body.divi-theme .lgr-add-to-registry-btn,
body.et-divi .lgr-add-to-registry-btn {
    padding: 10px 18px;
}

/* Theme: Astra */
body.astra-theme .lgr-add-to-registry-btn.button,
body.ast-container .lgr-add-to-registry-btn.button {
    padding: 8px 14px;
    font-size: 13px;
}

/* Theme: GeneratePress */
body.generatepress-theme .lgr-add-to-registry-btn.button {
    padding: 6px 12px;
    font-size: 13px;
}

/* Theme: OceanWP */
body.ocean-theme .lgr-add-to-registry-btn.button {
    padding: 8px 16px;
}

/* Storefront theme */
body.storefront .lgr-add-to-registry-btn.button {
    padding: 0.6em 1em;
    font-size: inherit;
}

/* Theme: Yobazar / Yokazar */
body.theme-yobazar .lgr-add-to-registry-btn.button,
body.yobazar .lgr-add-to-registry-btn.button,
body.theme-yokazar .lgr-add-to-registry-btn.button,
body.yokazar .lgr-add-to-registry-btn.button {
    padding: 0.7em 1.1em;
    border-radius: 8px;
}

/* ============================================
   SHOP BUTTON POSITIONS
   ============================================ */

/* Position: Below product (default) */
.lgr-position-below {
    display: block;
    margin-top: 12px;
}

/* Position: After add to cart (requires CSS adjustment) */
.lgr-position-after-cart {
    display: inline-block;
    margin-left: 8px;
}

/* Compact button style for shop grid */
.lgr-compact-btn {
    padding: 6px 12px !important;
    font-size: 12px !important;
}

.lgr-compact-btn .lgr-btn-icon {
    font-size: 14px;
}

/* ============================================
   SINGLE PRODUCT PAGE BUTTON
   ============================================ */

/* Position: After Add to Cart (default) */
.lgr-single-after-cart {
    display: flex;
    margin-top: 16px;
    gap: 12px;
    flex-wrap: wrap;
}

/* Position: With Price */
.lgr-single-with-price {
    margin: 8px 0;
}

/* Position: With Meta */
.lgr-single-with-meta {
    display: block;
    margin-top: 16px;
}

/* Position: Before Add to Cart */
.lgr-single-before-cart {
    display: flex;
    margin-bottom: 16px;
    order: -1;
}

/* ============================================
   NOTIFICATION TOASTS
   ============================================ */
.lgr-toast {
    position: fixed;
    bottom: 20px;
    right: 20px;
    padding: 16px 24px;
    border-radius: 10px;
    font-weight: 500;
    z-index: 99999;
    animation: slideInRight 0.3s ease;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.lgr-toast-success {
    background: #22c55e;
    color: #fff;
}

.lgr-toast-error {
    background: #dc2626;
    color: #fff;
}

.lgr-toast-info {
    background: #2271b1;
    color: #fff;
}

/* --- Checkout Shipping Choice --- */
.lgr-shipping-choice {
    background: #f8f9fa;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    padding: 16px 20px;
    margin-bottom: 20px;
}

.lgr-shipping-choice h3 {
    margin: 0 0 10px;
    font-size: 16px;
    font-weight: 600;
}

.lgr-shipping-radio {
    display: block;
    margin-bottom: 6px;
    cursor: pointer;
    font-weight: normal;
}

/* --- All Registries Page --- */
.lgr-all-registries-wrap {
    max-width: 1280px;
    margin: 0 auto;
    padding: 130px 20px 24px;
}

.lgr-all-registries-header h1 {
    font-size: 32px;
    margin-bottom: 22px;
}

.lgr-registry-list-card .product-wrapper {
    min-height: 220px;
}

.lgr-registry-card-title {
    margin-bottom: 14px;
}

.lgr-registry-open-btn {
    margin-top: 14px;
}
