/* Amazon Box Gallery Styles */
.amg-gallery-wrapper {
    max-width: 1000px;
    margin: 40px auto;
    font-family: "Yu Gothic", "YuGothic", "Hiragino Kaku Gothic ProN", "Hiragino Kaku Gothic Pro", "Meiryo", sans-serif;
    color: #333;
    line-height: 1.6;
    /* For forcing independence in some themes */
    padding: 0 10px;
}

/* For Cocoon: Expand to full width if the user sets 'No Sidebar' */
#main .amg-gallery-wrapper {
    width: 100%;
}

.amg-gallery-title {
    text-align: center !important;
    font-size: 26px !important;
    margin: 40px 0 30px 0 !important;
    font-weight: 600 !important;
    /* Reset theme-specific decorations (like Cocoon's wavy borders) */
    background: none !important;
    border: none !important;
    padding: 0 !important;
    box-shadow: none !important;
    color: #333 !important;
}

.amg-gallery-title::before,
.amg-gallery-title::after {
    display: none !important;
}

/* Nav Section */
.amg-nav-section {
    text-align: center;
    margin-bottom: 40px;
}

.amg-button {
    display: inline-block;
    text-decoration: none;
    background: transparent;
    border: 1px solid #333;
    padding: 10px 25px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
    border-radius: 4px;
}

.amg-button:hover {
    background: #f7f7f7;
    transform: translateY(-1px);
}

.amg-button.primary {
    background: #333;
    color: #fff;
}

.amg-form {
    max-width: 400px;
    margin: 20px auto;
    text-align: left;
    padding: 20px;
    background: #fff;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    border-radius: 8px;
}

.amg-form-group {
    margin-bottom: 15px;
}

.amg-form-group label {
    display: block;
    font-size: 13px;
    margin-bottom: 5px;
}

.amg-form-group input[type="text"],
.amg-form-group textarea {
    width: 100%;
    border: 1px solid #eee;
    padding: 10px;
    border-radius: 4px;
    font-size: 14px;
}

.amg-file-label {
    display: block;
    padding: 15px;
    border: 2px dashed #eee;
    text-align: center;
    cursor: pointer;
    border-radius: 4px;
}

.amg-file-label:hover {
    background: #fafafa;
}

.amg-file-label input {
    display: none;
}

.amg-preview img {
    max-width: 100%;
    margin-top: 10px;
    border-radius: 4px;
}

/* Gallery Grid */
.amg-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
}

.amg-card {
    background: #fff;
    border-radius: 0;
    overflow: hidden;
    transition: transform 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.amg-card:hover {
    transform: translateY(-5px);
}

.amg-card-image img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    display: block;
}

.amg-card-content {
    padding: 15px;
}

.amg-card-caption {
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 10px;
}

.amg-card-meta {
    font-size: 11px;
    color: #999;
}

.amg-empty {
    text-align: center;
    grid-column: 1 / -1;
    padding: 50px;
    color: #999;
}

.amg-date-inputs {
    display: flex;
    gap: 10px;
}

.amg-date-inputs select {
    flex: 1;
    padding: 10px;
    border: 1px solid #eee;
    border-radius: 4px;
    background: #fff;
}

.amg-tag {
    display: inline-block;
    background: #f7f7f7;
    padding: 2px 8px;
    border-radius: 3px;
    margin-bottom: 5px;
    font-weight: bold;
    color: #555;
}

/* LINE Banner */
.amg-line-banner {
    background: #06C755;
    color: #fff;
    padding: 15px 20px;
    border-radius: 12px;
    margin-bottom: 40px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    text-decoration: none;
    box-shadow: 0 4px 15px rgba(6, 199, 85, 0.2);
    transition: transform 0.2s;
}

.amg-line-banner:hover {
    transform: scale(1.01);
}

.amg-line-text {
    font-weight: bold;
    font-size: 15px;
}

.amg-line-sub {
    font-size: 11px;
    opacity: 0.9;
    margin-top: 2px;
}

.amg-line-icon {
    font-size: 24px;
    margin-right: 15px;
}

/* Success View */
.amg-success-view {
    text-align: center;
    padding: 40px 20px;
    max-width: 450px;
    margin: 40px auto;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

.amg-button.x-share {
    background: #000;
    color: #fff;
    border: none;
    font-weight: bold;
}

.amg-message {
    font-size: 13px;
    margin-top: 10px;
    text-align: center;
}